CVE-2026-31532 can: raw: fix ro->uniq use-after-free in raw_rcv()
A use-after-free in the Linux kernel CAN raw socket implementation allows attackers to potentially execute 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-2026-31532?
CVE-2026-31532 is a high-severity use after free vulnerability in Linux kernel, published on 23 Apr 2026. 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:
can: raw: fix ro->uniq use-after-free in raw_rcv()
raw_release() unregisters raw CAN receive filters via can_rx_unregister(), but receiver deletion is deferred with call_rcu(). This leaves a window where raw_rcv() may still be running in an RCU read-side critical section after raw_release() frees ro->uniq, leading to a use-after-free of the percpu uniq storage.
Move free_percpu(ro->uniq) out of raw_release() and into a raw-specific socket destructor. can_rx_unregister() takes an extra reference to the socket and only drops it from the RCU callback, so freeing uniq from sk_destruct ensures the percpu area is not released until the relevant callbacks have drained.
[mkl: applied manually]
Weakness: CWE-416
Which versions are affected by CVE-2026-31532?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2026-31532?
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-2026-31532 being exploited?
There is no known exploitation of CVE-2026-31532 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as AZL-83538, BELL-CVE-2026-31532, DEBIAN-CVE-2026-31532, GHSA-7w6x-pfmg-76xx, ROOT-OS-DEBIAN-11-CVE-2026-31532, ROOT-OS-DEBIAN-12-CVE-2026-31532 and 4 more.