CVE-2026-31532
kernel: can: raw: fix ro->uniq use-after-free in raw_rcv()
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · April 23, 2026
Updated · October 15, 2026
Description
A flaw was found in the Linux kernel's Controller Area Network (CAN) raw socket implementation. A use-after-free vulnerability can occur due to a timing window during the unregistration of CAN receive filters, allowing a freed memory region to be accessed. This could lead to system instability or a denial of service (DoS).
Statement
A use-after-free flaw in the Linux kernel CAN raw socket implementation can occur when raw_release() frees the per-CPU ro->uniq storage before RCU-deferred receive callbacks have fully drained. A local attacker able to create raw CAN sockets and trigger CAN receive activity could race socket teardown with raw_rcv() and cause a kernel crash. The likely impact is denial of service, while privilege escalation would require additional, unproven control over per-CPU memory reuse. The issue appears more consistent with an RCU lifetime/race-condition bug leading primarily to denial of service, as exploitation depends on a narrow teardown race involving a percpu object rather than a generic reclaimable slab object, with no demonstrated privilege-escalation path or obvious controlled overwrite primitive in the relatively niche CAN raw socket subsystem.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
To mitigate this issue, prevent the can kernel module from loading if CAN functionality is not required. This can be achieved by blacklisting the module.
Create a file named /etc/modprobe.d/blacklist-can.conf with the following content:
blacklist can
install can /bin/true
After creating the file, regenerate the initramfs and reboot the system for the changes to take effect.
dracut -f -v
reboot
This mitigation may impact systems that rely on CAN interfaces for their operation.
CVSS / CWE
CVSS 3.1 · 7.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
CWE-366 · Race Condition within a Thread