CVE-2022-50569 xfrm: Update ipcomp_scratches with NULL when freed

High 7.8 Published Updated

A use-after-free or invalid memory access in the Linux kernel's IPComp module can cause a system crash when memory allocation fails.

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-2022-50569?

CVE-2022-50569 is a high-severity vulnerability in Linux, published on 22 Oct 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:

xfrm: Update ipcomp_scratches with NULL when freed

Currently if ipcomp_alloc_scratches() fails to allocate memory ipcomp_scratches holds obsolete address. So when we try to free the percpu scratches using ipcomp_free_scratches() it tries to vfree non existent vm area. Described below:

static void * __percpu *ipcomp_alloc_scratches(void) { ... scratches = alloc_percpu(void *); if (!scratches) return NULL; ipcomp_scratches does not know about this allocation failure. Therefore holding the old obsolete address. ... }

So when we free,

static void ipcomp_free_scratches(void) { ... scratches = ipcomp_scratches; Assigning obsolete address from ipcomp_scratches

if (!scratches) return;

for_each_possible_cpu(i) vfree(*per_cpu_ptr(scratches, i)); Trying to free non existent page, causing warning: trying to vfree existent vm area. ... }

Fix this breakage by updating ipcomp_scrtches with NULL when scratches is freed

Which versions are affected by CVE-2022-50569?

How do I fix CVE-2022-50569?

Apply the vendor's patch.

Is CVE-2022-50569 being exploited?

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

Sources

Also known as DEBIAN-CVE-2022-50569, GHSA-h9qx-33jg-gh24, UBUNTU-CVE-2022-50569.

Is CVE-2022-50569 in your software?

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

Check your SBOMs for free