can: raw: fix ro->uniq use-after-free in raw_rcv()
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel 6.18.24, Kernel 6.19.14, Kernel 6.12.83 and 14 more.
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]
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Linux | Kernel | >=4.1 <=6.6.136, >=6.18 <6.18.24, >=6.19 <6.19.14, >=6.7 <6.12.83, >=7.0 <7.0.1, >=514ac99c64b22d83b52dfee3b8becaa69a92bc4a <1de30576a6dfeaaa27ef91fa272e6b9240b6fbd3, >=514ac99c64b22d83b52dfee3b8becaa69a92bc4a <34c1741254ff972e8375faf176678a248826fe3a, >=514ac99c64b22d83b52dfee3b8becaa69a92bc4a <3f43f12fde34737fba091b7e3ab391e14ddbb0be, >=514ac99c64b22d83b52dfee3b8becaa69a92bc4a <572f0bf536ebc14f6e7da3d21a85cf076de8358e, >=514ac99c64b22d83b52dfee3b8becaa69a92bc4a <5e9cfffad898bbeaafd0ea608a6d267362f050fc, >=514ac99c64b22d83b52dfee3b8becaa69a92bc4a <64c8553decf5a5f2417bd54761ea0a832c56c4ca, >=514ac99c64b22d83b52dfee3b8becaa69a92bc4a <7201a531b9a5ed892bfda5ded9194ef622de8ffa, >=514ac99c64b22d83b52dfee3b8becaa69a92bc4a <a535a9217ca3f2fccedaafb2fddb4c48f27d36dc, =4.1, >=514ac99c64b22d83b52dfee3b8becaa69a92bc4a <1a0f2de81f7fbdc538fc72d7d74609b79bc83cc0 | 6.18.24, 6.19.14, 6.12.83, 7.0.1, 1de30576a6dfeaaa27ef91fa272e6b9240b6fbd3, 34c1741254ff972e8375faf176678a248826fe3a, 3f43f12fde34737fba091b7e3ab391e14ddbb0be, 572f0bf536ebc14f6e7da3d21a85cf076de8358e, 5e9cfffad898bbeaafd0ea608a6d267362f050fc, 64c8553decf5a5f2417bd54761ea0a832c56c4ca, 7201a531b9a5ed892bfda5ded9194ef622de8ffa, a535a9217ca3f2fccedaafb2fddb4c48f27d36dc, 1a0f2de81f7fbdc538fc72d7d74609b79bc83cc0 |
| linux-kernel: Kernel | >=4.1.0 <5.10.258, >=5.11.0 <5.15.209, >=5.16.0 <6.1.175, >=6.13.0 <6.18.24, >=6.19.0 <6.19.14, >=6.2.0 <6.6.136, >=6.20.0 <7.0.1, >=6.7.0 <6.12.83 | 5.10.258, 5.15.209, 6.1.175, 6.18.24, 6.19.14, 6.6.136, 7.0.1, 6.12.83 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in Kernel, strongest first
Embed
A live severity badge for an advisory, README or ticket