Linux
net: ravb: serialize PTP clock teardown
In the Linux kernel, the following vulnerability has been resolved: net: ravb: serialize PTP clock teardown ravb_ptp_interrupt() can race with ravb_ptp_stop() and pass the clock to ptp_clock_event() while ptp_clock_unregister() is freeing it. This can lead to a use-after-free. Use READ_ONCE() and WRITE_ONCE() for lockless access to the clock pointer. Atomically detach it with xchg() before disabling PTP interrupts, then synchronize all IRQs which can invoke ravb_ptp_interrupt() before unregistering the detached clock. A handler which read the old pointer completes before the clock is unregistered, while later handlers read NULL and skip the event.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= a0d2f20650e81407d8e51ad2cbdc492861c74e9c, < 0400b9c5608933289bcacc3886dd3e4f6b7695f1
- >= a0d2f20650e81407d8e51ad2cbdc492861c74e9c, < b917f37bfcce919a969d66a044580a95b11df31c
- >= a0d2f20650e81407d8e51ad2cbdc492861c74e9c, < 695acb5534a9e366efb47b40c7487fc56488b09b
- >= a0d2f20650e81407d8e51ad2cbdc492861c74e9c, < 67a82e6f886beed0de8f8da08bb767e68fba952d
- >= a0d2f20650e81407d8e51ad2cbdc492861c74e9c, < 66b50c31419e7946e9aa325a468ad9b64c961a25
- >= a0d2f20650e81407d8e51ad2cbdc492861c74e9c, < 1cb9663789c5b7a12fcd419fcca6d6254c398252
Fixed in 0400b9c5608933289bcacc3886dd3e4f6b7695f1, b917f37bfcce919a969d66a044580a95b11df31c, 695acb5534a9e366efb47b40c7487fc56488b09b, 67a82e6f886beed0de8f8da08bb767e68fba952d, 66b50c31419e7946e9aa325a468ad9b64c961a25, 1cb9663789c5b7a12fcd419fcca6d6254c398252
- 4.2
Fixed in 0, 6.1.191, 6.6.160, 6.12.109, 6.18.50, 7.2.4, 7.3
Mitigation
Upgrade Linux to 0400b9c5608933289bcacc3886dd3e4f6b7695f1 or b917f37bfcce919a969d66a044580a95b11df31c or 695acb5534a9e366efb47b40c7487fc56488b09b or 67a82e6f886beed0de8f8da08bb767e68fba952d or 66b50c31419e7946e9aa325a468ad9b64c961a25 or 1cb9663789c5b7a12fcd419fcca6d6254c398252 or later.
Upgrade Linux to 0 or 6.1.191 or 6.6.160 or 6.12.109 or 6.18.50 or 7.2.4 or 7.3 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.