i3c: master: Fix info leak and UAF in device unregister path
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 5.10.270, 5.15.221, 6.1.188, 6.6.157, 6.12.109, and 2 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
In the Linux kernel, the following vulnerability has been resolved: i3c: master: Fix info leak and UAF in device unregister path i3c_master_unregister_i3c_devs() clears i3cdev->dev->desc before calling device_unregister(). During device_unregister(), device_del() emits a KOBJ_REMOVE uevent and unbinds the driver while the device descriptor is still expected to be valid. As a result, i3c_device_uevent() and a racing modalias_show() can observe a NULL desc and fall back to an uninitialized stack struct i3c_device_info, leaking kernel stack contents in the generated modalias. Driver .remove() callbacks may also encounter an unexpected NULL desc during unbind. Keep desc valid until device_unregister() has completed. Since device_unregister() drops the device reference and may free the device, take an extra reference with get_device() before unregistering. Clear desc afterwards and release the extra reference with put_device(). This preserves the release-time invariant that desc must be NULL while avoiding both the information leak and a potential use-after-free from writing desc after the device has been released.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From 3a379bbcea0af6280e1ca0d1edfcf4e68cde6ee0 · fixed in 334cfb5e285cece5dc49fb3fb8ea9b70b2cb5d7e; From 3a379bbcea0af6280e1ca0d1edfcf4e68cde6ee0 · fixed in 109995153898454c7795c2c299fd0a0b57456a4b; From 3a379bbcea0af6280e1ca0d1edfcf4e68cde6ee0 · fixed in c64daaaba08e490c8347ff60aacac4dd51249f91; From 3a379bbcea0af6280e1ca0d1edfcf4e68cde6ee0 · fixed in ef72ff6650c4ebf2b444708d84df66db42f262d9; From 3a379bbcea0af6280e1ca0d1edfcf4e68cde6ee0 · fixed in c16b6f25e0cc2dd1055dde1256cbf5a9e888cf49; From 3a379bbcea0af6280e1ca0d1edfcf4e68cde6ee0 · fixed in 94fb9786d67a8f8b899e77381620f86bad94fdf7; From 3a379bbcea0af6280e1ca0d1edfcf4e68cde6ee0 · fixed in 4837be0f9ac2efe5e83b35a696b6242c473d280c; From 3a379bbcea0af6280e1ca0d1edfcf4e68cde6ee0 · fixed in d2c743efd2d1ee64e94324664808f623dd865872
- Linux Linux
5.0
- KernelLinux
From 5.0.0 · fixed in 5.10.270; From 5.11.0 · fixed in 5.15.221; From 5.16.0 · fixed in 6.1.188; From 6.2.0 · fixed in 6.6.157; From 6.7.0 · fixed in 6.12.109; From 6.13.0 · fixed in 6.18.50; From 6.19.0 · fixed in 7.2.4
References 8
git.kernel.org
- stable/c/334cfb5e285cece5dc49fb3fb8ea9b70b2cb5d7e
- stable/c/109995153898454c7795c2c299fd0a0b57456a4b
- stable/c/c64daaaba08e490c8347ff60aacac4dd51249f91
- stable/c/ef72ff6650c4ebf2b444708d84df66db42f262d9
- stable/c/c16b6f25e0cc2dd1055dde1256cbf5a9e888cf49
- stable/c/94fb9786d67a8f8b899e77381620f86bad94fdf7
- stable/c/4837be0f9ac2efe5e83b35a696b6242c473d280c
- stable/c/d2c743efd2d1ee64e94324664808f623dd865872