usb: gadget: f_tcm: Fix NULL pointer dereferences in nexus handling
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel 5.10.253, Kernel 6.1.167, Kernel 6.18.19 and 10 more.
In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_tcm: Fix NULL pointer dereferences in nexus handling The `tpg->tpg_nexus` pointer in the USB Target driver is dynamically managed and tied to userspace configuration via ConfigFS. It can be NULL if the USB host sends requests before the nexus is fully established or immediately after it is dropped. Currently, functions like `bot_submit_command()` and the data transfer paths retrieve `tv_nexus = tpg->tpg_nexus` and immediately dereference `tv_nexus->tvn_se_sess` without any validation. If a malicious or misconfigured USB host sends a BOT (Bulk-Only Transport) command during this race window, it triggers a NULL pointer dereference, leading to a kernel panic (local DoS). This exposes an inconsistent API usage within the module, as peer functions like `usbg_submit_command()` and `bot_send_bad_response()` correctly implement a NULL check for `tv_nexus` before proceeding. Fix this by bringing consistency to the nexus handling. Add the missing `if (!tv_nexus)` checks to the vulnerable BOT command and request processing paths, aborting the command gracefully with an error instead of crashing the system.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Linux | Kernel | >=3.5 <5.10.253, >=5.11 <6.1.167, >=6.13 <6.18.19, >=6.19 <6.19.9, >=6.2 <6.6.130, >=6.7 <6.12.78, =7.0, >=c52661d60f636d17e26ad834457db333bd1df494 <3d309b37633c4a847fc149939a2c9576f1aa1065, >=c52661d60f636d17e26ad834457db333bd1df494 <679d9535aeb15c10bce89c44102004b96624d706, >=c52661d60f636d17e26ad834457db333bd1df494 <b9b26d7f3aa288cfa54a7bc68612bab1f153f156, >=c52661d60f636d17e26ad834457db333bd1df494 <b9fde507355342a2d64225d582dc8b98ff5ecb19, >=c52661d60f636d17e26ad834457db333bd1df494 <d146f27758049fa55ae4c53785a852d3cf7a18d6, >=c52661d60f636d17e26ad834457db333bd1df494 <f962ca3b020e13d6714f27e8c36fe742441c58d1, =3.5, >=c52661d60f636d17e26ad834457db333bd1df494 <2a2ef846a54a06c33b5c2d4b0d918583e1e7c0b7 | 5.10.253, 6.1.167, 6.18.19, 6.19.9, 6.6.130, 6.12.78, 3d309b37633c4a847fc149939a2c9576f1aa1065, 679d9535aeb15c10bce89c44102004b96624d706, b9b26d7f3aa288cfa54a7bc68612bab1f153f156, b9fde507355342a2d64225d582dc8b98ff5ecb19, d146f27758049fa55ae4c53785a852d3cf7a18d6, f962ca3b020e13d6714f27e8c36fe742441c58d1, 2a2ef846a54a06c33b5c2d4b0d918583e1e7c0b7 |
| linux-kernel: Kernel | >=3.5.0 <5.10.253, >=5.11.0 <6.1.167, >=6.13.0 <6.18.19, >=6.19.0 <6.19.9, >=6.2.0 <6.6.130, >=6.7.0 <6.12.78 | 5.10.253, 6.1.167, 6.18.19, 6.19.9, 6.6.130, 6.12.78 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in Kernel, strongest first
Embed
A live severity badge for an advisory, README or ticket