CVE-2025-21846 acct: perform last write from workqueue
A local attacker can trigger a NULL pointer dereference in the Linux kernel accounting subsystem, causing a system crash.
- 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-21846?
CVE-2025-21846 is a medium-severity vulnerability in Linux kernel, published on 12 Mar 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:
acct: perform last write from workqueue
In [1] it was reported that the acct(2) system call can be used to trigger NULL deref in cases where it is set to write to a file that triggers an internal lookup. This can e.g., happen when pointing acc(2) to /sys/power/resume. At the point the where the write to this file happens the calling task has already exited and called exit_fs(). A lookup will thus trigger a NULL-deref when accessing current->fs.
Reorganize the code so that the the final write happens from the workqueue but with the caller's credentials. This preserves the (strange) permission model and has almost no regression risk.
This api should stop to exist though.
Weakness: CWE-476
Which versions are affected by CVE-2025-21846?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2025-21846?
Apply the vendor's patch.
Is CVE-2025-21846 being exploited?
There is no known exploitation of CVE-2025-21846 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as AZL-58532, AZL-58569, BELL-CVE-2025-21846, DEBIAN-CVE-2025-21846, GHSA-wg7v-626p-h26r, ROOT-OS-UBUNTU-2404-CVE-2025-21846 and 1 more.