CVE-2026-31532

can: raw: fix ro->uniq use-after-free in raw_rcv()

State
Published
Severity
7.8 High
Published
Apr 23, 2026
Updated
Oct 19, 2026
Reserved
Mar 9, 2026

Read the record on cve.org

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]

Scores

CVSSScoreVectorSource
3.17.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HLinux

Weaknesses

Affected Products

ProductVersions
LinuxLinux
  • 514ac99c64b22d83b52dfee3b8becaa69a92bc4a to before 1de30576a6dfeaaa27ef91fa272e6b9240b6fbd3Affected
  • 514ac99c64b22d83b52dfee3b8becaa69a92bc4a to before 64c8553decf5a5f2417bd54761ea0a832c56c4caAffected
  • 514ac99c64b22d83b52dfee3b8becaa69a92bc4a to before 3f43f12fde34737fba091b7e3ab391e14ddbb0beAffected
  • 514ac99c64b22d83b52dfee3b8becaa69a92bc4a to before 5e9cfffad898bbeaafd0ea608a6d267362f050fcAffected
  • 514ac99c64b22d83b52dfee3b8becaa69a92bc4a to before 572f0bf536ebc14f6e7da3d21a85cf076de8358eAffected
  • 514ac99c64b22d83b52dfee3b8becaa69a92bc4a to before 1a0f2de81f7fbdc538fc72d7d74609b79bc83cc0Affected
  • 514ac99c64b22d83b52dfee3b8becaa69a92bc4a to before 7201a531b9a5ed892bfda5ded9194ef622de8ffaAffected
  • 514ac99c64b22d83b52dfee3b8becaa69a92bc4a to before 34c1741254ff972e8375faf176678a248826fe3aAffected
  • 514ac99c64b22d83b52dfee3b8becaa69a92bc4a to before a535a9217ca3f2fccedaafb2fddb4c48f27d36dcAffected
LinuxLinux
  • 4.1Affected
  • before 4.1Not affected
  • 5.10.258 through 5.10.*Not affected
  • 5.15.209 through 5.15.*Not affected
  • 6.1.175 through 6.1.*Not affected
  • 6.6.136 through 6.6.*Not affected
  • 6.12.83 through 6.12.*Not affected
  • 6.18.24 through 6.18.*Not affected
  • 6.19.14 through 6.19.*Not affected
  • 7.0.1 through 7.0.*Not affected
  • 7.1 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.