CVE-2025-22057 net: decrease cached dst counters in dst_release

High 7.8 Published Updated

A use-after-free in the Linux kernel networking stack can cause a system crash when using Open vSwitch with tunnels and cached destinations.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-22057?

CVE-2025-22057 is a high-severity use after free vulnerability in Linux kernel, published on 16 Apr 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

In the Linux kernel, the following vulnerability has been resolved:

net: decrease cached dst counters in dst_release

Upstream fix ac888d58869b ("net: do not delay dst_entries_add() in dst_release()") moved decrementing the dst count from dst_destroy to dst_release to avoid accessing already freed data in case of netns dismantle. However in case CONFIG_DST_CACHE is enabled and OvS+tunnels are used, this fix is incomplete as the same issue will be seen for cached dsts:

Unable to handle kernel paging request at virtual address ffff5aabf6b5c000 Call trace: percpu_counter_add_batch+0x3c/0x160 (P) dst_release+0xec/0x108 dst_cache_destroy+0x68/0xd8 dst_destroy+0x13c/0x168 dst_destroy_rcu+0x1c/0xb0 rcu_do_batch+0x18c/0x7d0 rcu_core+0x174/0x378 rcu_core_si+0x18/0x30

Fix this by invalidating the cache, and thus decrementing cached dst counters, in dst_release too.

Which versions are affected by CVE-2025-22057?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-22057?

Apply the vendor's patch.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2025-22057 being exploited?

There is no known exploitation of CVE-2025-22057 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as AZL-69539, BELL-CVE-2025-22057, DEBIAN-CVE-2025-22057, GHSA-f6x4-fwp3-vv23, ROOT-OS-DEBIAN-11-CVE-2025-22057, ROOT-OS-DEBIAN-12-CVE-2025-22057 and 3 more.

Is CVE-2025-22057 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free