usb: gadget: f_tcm: fix deadlock in usbg_make_tpg()
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel f81a2da137b029a282b9bc64d2f267d242948659, Kernel 3639438a4c83ffc2e564c8c010b92137c5d11cfa, Kernel 6bcd9ee6ad6989d1d85a7459687e45b7ad7568d9 and 12 more.
In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_tcm: fix deadlock in usbg_make_tpg() usbg_make_tpg() held dep_lock while calling configfs_depend_item_unlocked(), which acquires the configfs root inode lock when operating across subsystems. This creates a circular lock dependency with configfs_rmdir(): dep_lock -> configfs root inode lock -> su_mutex -> dep_lock In usbg_make_tpg(), dep_lock only serialized the read of opts->ready, which is a monotonic flag that transitions from false to true exactly once (in tcm_set_name()) and never reverts. Remove dep_lock from usbg_make_tpg() entirely and use READ_ONCE/WRITE_ONCE to access opts->ready locklessly instead.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Linux | Kernel | >=4bb8548df632187d5db50878e71804af5f7c51ad <f81a2da137b029a282b9bc64d2f267d242948659, >=4bb8548df632187d5db50878e71804af5f7c51ad <3639438a4c83ffc2e564c8c010b92137c5d11cfa, >=4bb8548df632187d5db50878e71804af5f7c51ad <6bcd9ee6ad6989d1d85a7459687e45b7ad7568d9, >=4bb8548df632187d5db50878e71804af5f7c51ad <78a14ea2284825055ab6c2a1f3489510f560f3a2, >=4bb8548df632187d5db50878e71804af5f7c51ad <9dbf74f4022f80f7669d2b3c22c5deb46c1b5674, >=4bb8548df632187d5db50878e71804af5f7c51ad <abad5daa41cf5d0a0a9cba0397d3a0e7f11e0277, >=4bb8548df632187d5db50878e71804af5f7c51ad <d90b0f90e30cd59b36005a4016b15cf02bcd7fb2, >=4bb8548df632187d5db50878e71804af5f7c51ad <eef3e62f90d86c1c5651742f84ecc9db1814a893, =4.5 | f81a2da137b029a282b9bc64d2f267d242948659, 3639438a4c83ffc2e564c8c010b92137c5d11cfa, 6bcd9ee6ad6989d1d85a7459687e45b7ad7568d9, 78a14ea2284825055ab6c2a1f3489510f560f3a2, 9dbf74f4022f80f7669d2b3c22c5deb46c1b5674, abad5daa41cf5d0a0a9cba0397d3a0e7f11e0277, d90b0f90e30cd59b36005a4016b15cf02bcd7fb2, eef3e62f90d86c1c5651742f84ecc9db1814a893 |
| linux-kernel: Kernel | >=5.11.0 <5.15.221, >=5.16.0 <6.1.188, >=6.13.0 <6.18.50, >=6.19.0 <7.2.4, >=6.2.0 <6.6.157, >=6.7.0 <6.12.109, >=4.5.0 <5.10.270 | 5.15.221, 6.1.188, 6.18.50, 7.2.4, 6.6.157, 6.12.109, 5.10.270 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in Kernel, strongest first
Embed
A live severity badge for an advisory, README or ticket