CVE-2025-21726 padata: avoid UAF for reorder_work

High 7.8 Published Updated

A use-after-free vulnerability in the Linux kernel padata subsystem allows attackers to execute arbitrary code or escalate privileges.

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-21726?

CVE-2025-21726 is a high-severity use after free vulnerability in Linux kernel, published on 27 Feb 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:

padata: avoid UAF for reorder_work

Although the previous patch can avoid ps and ps UAF for _do_serial, it can not avoid potential UAF issue for reorder_work. This issue can happen just as below:

crypto_request crypto_request crypto_del_alg padata_do_serial ... padata_reorder // processes all remaining // requests then breaks while (1) { if (!padata) break; ... }

padata_do_serial // new request added list_add // sees the new request queue_work(reorder_work) padata_reorder queue_work_on(squeue->work) ...

<kworker context> padata_serial_worker // completes new request, // no more outstanding // requests

crypto_del_alg // free pd

<kworker context> invoke_padata_reorder // UAF of pd

To avoid UAF for 'reorder_work', get 'pd' ref before put 'reorder_work' into the 'serial_wq' and put 'pd' ref until the 'serial_wq' finish.

Weakness: CWE-416

Which versions are affected by CVE-2025-21726?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-21726?

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-21726 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2025-21726, DEBIAN-CVE-2025-21726, GHSA-4gxw-5w55-6f5h, ROOT-OS-UBUNTU-2404-CVE-2025-21726, UBUNTU-CVE-2025-21726.

Is CVE-2025-21726 in your software?

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

Check your SBOMs for free