Linux
nfc: rawsock: cancel tx_work before socket teardown
In the Linux kernel, the following vulnerability has been resolved: nfc: rawsock: cancel tx_work before socket teardown In rawsock_release(), cancel any pending tx_work and purge the write queue before orphaning the socket. rawsock_tx_work runs on the system workqueue and calls nfc_data_exchange which dereferences the NCI device. Without synchronization, tx_work can race with socket and device teardown when a process is killed (e.g. by SIGKILL), leading to use-after-free or leaked references. Set SEND_SHUTDOWN first so that if tx_work is already running it will see the flag and skip transmitting, then use cancel_work_sync to wait for any in-progress execution to finish, and finally purge any remaining queued skbs.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 23b7869c0fd08d73c9f83a2db88a13312d6198bb, < 9b2d23cd09e1cb56bdf0e4d5614703094159f16c
- >= 23b7869c0fd08d73c9f83a2db88a13312d6198bb, < cdeed45ce8c92defd057f7d67ee9a69374d8fa16
- >= 23b7869c0fd08d73c9f83a2db88a13312d6198bb, < 3ae592ed91bb4b6b51df256b51045c13d2656049
- >= 23b7869c0fd08d73c9f83a2db88a13312d6198bb, < 722a28b635ec281bb08a23885223526d8e7d6526
- >= 23b7869c0fd08d73c9f83a2db88a13312d6198bb, < 78141b8832e16d80d09cbefb4258612db0777a24
- >= 23b7869c0fd08d73c9f83a2db88a13312d6198bb, < edc988613def90c5b558e025b1b423f48007be06
- >= 23b7869c0fd08d73c9f83a2db88a13312d6198bb, < da4515fc8263c5933ed605e396af91079806dc45
- >= 23b7869c0fd08d73c9f83a2db88a13312d6198bb, < d793458c45df2aed498d7f74145eab7ee22d25aa
Fixed in 9b2d23cd09e1cb56bdf0e4d5614703094159f16c, cdeed45ce8c92defd057f7d67ee9a69374d8fa16, 3ae592ed91bb4b6b51df256b51045c13d2656049, 722a28b635ec281bb08a23885223526d8e7d6526, 78141b8832e16d80d09cbefb4258612db0777a24, edc988613def90c5b558e025b1b423f48007be06, da4515fc8263c5933ed605e396af91079806dc45, d793458c45df2aed498d7f74145eab7ee22d25aa
- 3.1
Fixed in 0, 5.10.253, 5.15.203, 6.1.167, 6.6.130, 6.12.77, 6.18.17, 6.19.7, 7.0
Mitigation
Upgrade Linux to 9b2d23cd09e1cb56bdf0e4d5614703094159f16c or cdeed45ce8c92defd057f7d67ee9a69374d8fa16 or 3ae592ed91bb4b6b51df256b51045c13d2656049 or 722a28b635ec281bb08a23885223526d8e7d6526 or 78141b8832e16d80d09cbefb4258612db0777a24 or edc988613def90c5b558e025b1b423f48007be06 or da4515fc8263c5933ed605e396af91079806dc45 or d793458c45df2aed498d7f74145eab7ee22d25aa or later.
Upgrade Linux to 0 or 5.10.253 or 5.15.203 or 6.1.167 or 6.6.130 or 6.12.77 or 6.18.17 or 6.19.7 or 7.0 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.