Description
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: Fix use-after-free bug by not setting udc->dev.driver
The syzbot fuzzer found a use-after-free bug:
BUG: KASAN: use-after-free in dev_uevent+0x712/0x780 drivers/base/core.c:2320
Read of size 8 at addr ffff88802b934098 by task udevd/3689
CPU: 2 PID: 3689 Comm: udevd Not tainted 5.17.0-rc4-syzkaller-00229-g4f12b742eb2b #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
print_address_description.constprop.0.cold+0x8d/0x303 mm/kasan/report.c:255
__kasan_report mm/kasan/report.c:442 [inline]
kasan_report.cold+0x83/0xdf mm/kasan/report.c:459
dev_uevent+0x712/0x780 drivers/base/core.c:2320
uevent_show+0x1b8/0x380 drivers/base/core.c:2391
dev_attr_show+0x4b/0x90 drivers/base/core.c:2094
Although the bug manifested in the driver core, the real cause was a
race with the gadget core. dev_uevent() does:
if (dev->driver)
add_uevent_var(env, "DRIVER=%s", dev->driver->name);
and between the test and the dereference of dev->driver, the gadget
core sets dev->driver to NULL.
The race wouldn't occur if the gadget core registered its devices on
a real bus, using the standard synchronization techniques of the
driver core. However, it's not necessary to make such a large change
in order to fix this bug; all we need to do is make sure that
udc->dev.driver is always NULL.
In fact, there is no reason for udc->dev.driver ever to be set to
anything, let alone to the value it currently gets: the address of the
gadget's driver. After all, a gadget driver only knows how to manage
a gadget, not how to manage a UDC.
This patch simply removes the statements in the gadget core that touch
udc->dev.driver.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Linux | Linux | 3.1 | 4.9.308 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | linux | 5.17.3-1 | — |
| Debian 13 | linux | 5.17.3-1 | — |
| Debian 12 | linux | 5.17.3-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 24.04 LTS | linux-raspi-realtime | No fix yet | — |
| Ubuntu 22.04 LTS | linux +1 | 5.15.0-37.39 | — |
| Ubuntu 22.04 LTS | linux-aws | 5.15.0-1011.14 | — |
| Ubuntu 22.04 LTS | linux-azure | 5.15.0-1010.12 | — |
| Ubuntu 22.04 LTS | linux-gcp | 5.15.0-1008.12 | — |
| Ubuntu 22.04 LTS | linux-gke | 5.15.0-1008.10 | — |
| Ubuntu 22.04 LTS | linux-ibm | 5.15.0-1007.8 | — |
| Ubuntu 22.04 LTS | linux-intel-iotg | 5.15.0-1008.11 | — |
| Ubuntu 22.04 LTS | linux-kvm | 5.15.0-1010.11 | — |
| Ubuntu 22.04 LTS | linux-oracle | 5.15.0-1009.12 | — |
| Ubuntu 22.04 LTS | linux-raspi | 5.15.0-1011.13 | — |
| Ubuntu 22.04 LTS | linux-riscv +25 | No fix yet | — |
| Ubuntu 20.04 LTS | linux | 5.4.0-117.132 | — |
| Ubuntu 20.04 LTS | linux-aws +1 | 5.4.0-1078.84 | — |
| Ubuntu 20.04 LTS | linux-azure | 5.4.0-1083.87 | — |
| Ubuntu 20.04 LTS | linux-azure-5.15 | 5.15.0-1008.9~20.04.1 | — |
| Ubuntu 20.04 LTS | linux-bluefield | 5.4.0-1040.44 | — |
| Ubuntu 20.04 LTS | linux-gke +26 | No fix yet | — |
| Ubuntu 20.04 LTS | linux-gkeop | 5.4.0-1046.48 | — |
| Ubuntu 20.04 LTS | linux-hwe-5.15 | 5.15.0-41.44~20.04.1 | — |
| Ubuntu 20.04 LTS | linux-ibm | 5.4.0-1026.29 | — |
| Ubuntu 20.04 LTS | linux-intel-iotg-5.15 | 5.15.0-1008.11~20.04.1 | — |
| Ubuntu 20.04 LTS | linux-iot | 5.4.0-1004.6 | — |
| Ubuntu 20.04 LTS | linux-kvm | 5.4.0-1068.72 | — |
| Ubuntu 20.04 LTS | linux-lowlatency-hwe-5.15 | 5.15.0-42.45~20.04.1 | — |
| Ubuntu 20.04 LTS | linux-oracle | 5.4.0-1076.83 | — |
| Ubuntu 20.04 LTS | linux-raspi | 5.4.0-1065.75 | — |
| Ubuntu 18.04 LTS | linux | 4.15.0-184.194 | — |
| Ubuntu 18.04 LTS | linux-aws | 4.15.0-1133.143 | — |
| Ubuntu 18.04 LTS | linux-aws-5.4 +1 | 5.4.0-1078.84~18.04.1 | — |
| Ubuntu 18.04 LTS | linux-azure-4.15 | 4.15.0-1142.156 | — |
| Ubuntu 18.04 LTS | linux-azure-5.4 | 5.4.0-1083.87~18.04.1 | — |
| Ubuntu 18.04 LTS | linux-gcp +14 | No fix yet | — |
| Ubuntu 18.04 LTS | linux-gcp-4.15 | 4.15.0-1127.142 | — |
| Ubuntu 18.04 LTS | linux-hwe-5.4 | 5.4.0-117.132~18.04.1 | — |
| Ubuntu 18.04 LTS | linux-ibm-5.4 | 5.4.0-1028.32~18.04.1 | — |
| Ubuntu 18.04 LTS | linux-kvm | 4.15.0-1119.123 | — |
| Ubuntu 18.04 LTS | linux-oracle | 4.15.0-1098.108 | — |
| Ubuntu 18.04 LTS | linux-oracle-5.4 | 5.4.0-1076.83~18.04.1 | — |
| Ubuntu 18.04 LTS | linux-raspi-5.4 | 5.4.0-1065.75~18.04.1 | — |
| Ubuntu 16.04 LTS | linux-hwe-edge | No fix yet | — |
Show 9 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro Realtime 22.04 LTS | linux-realtime | 5.15.0-1014.14 | — |
| Ubuntu Pro FIPS 20.04 LTS | linux-fips +3 | No fix yet | — |
| Ubuntu Pro FIPS 18.04 LTS | linux-fips +3 | No fix yet | — |
| Ubuntu Pro FIPS 16.04 LTS | linux-fips | No fix yet | — |
| Ubuntu Pro FIPS-updates 20.04 LTS | linux-aws-fips +1 | 5.4.0-1078.84+fips1 | — |
| Ubuntu Pro FIPS-updates 20.04 LTS | linux-azure-fips | 5.4.0-1083.87+fips1 | — |
| Ubuntu Pro FIPS-updates 20.04 LTS | linux-fips | 5.4.0-1054.61 | — |
| Ubuntu Pro FIPS-updates 18.04 LTS | linux-aws-fips | 4.15.0-2072.76 | — |
| Ubuntu Pro FIPS-updates 18.04 LTS | linux-azure-fips | 4.15.0-2053.58 | — |
| Ubuntu Pro FIPS-updates 18.04 LTS | linux-fips | 4.15.0-1090.100 | — |
| Ubuntu Pro FIPS-updates 18.04 LTS | linux-gcp-fips | 4.15.0-2037.41 | — |
| Ubuntu Pro FIPS-updates 16.04 LTS | linux-fips | 4.4.0-1105.112 | — |
| Ubuntu Pro 16.04 LTS | linux | 4.4.0-259.293 | USN-7039-1 |
| Ubuntu Pro 16.04 LTS | linux-aws | 4.4.0-1174.189 | USN-7039-1 |
| Ubuntu Pro 16.04 LTS | linux-aws-hwe | 4.15.0-1133.143~16.04.1 | — |
| Ubuntu Pro 16.04 LTS | linux-azure | 4.15.0-1142.156~16.04.1 | — |
| Ubuntu Pro 16.04 LTS | linux-gcp | 4.15.0-1127.142~16.04.1 | — |
| Ubuntu Pro 16.04 LTS | linux-hwe | 4.15.0-184.194~16.04.1 | — |
| Ubuntu Pro 16.04 LTS | linux-kvm | 4.4.0-1137.147 | USN-7039-1 |
| Ubuntu Pro 16.04 LTS | linux-oracle | 4.15.0-1098.108~16.04.1 | — |
| Ubuntu Pro 14.04 LTS | linux | No fix yet | — |
| Ubuntu Pro 14.04 LTS | linux-aws | 4.4.0-1136.142 | USN-7039-1 |
| Ubuntu Pro 14.04 LTS | linux-azure | 4.15.0-1142.156~14.04.1 | — |
| Ubuntu Pro 14.04 LTS | linux-lts-xenial | 4.4.0-259.293~14.04.1 | USN-7039-1 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP5 | kernel-64kb +5 | 5.14.21-150500.55.73.1 | SUSE-SU-2024:2939-1 |
| SLES 15 SP5 | kernel-azure +2 | 5.14.21-150500.33.63.1 | SUSE-SU-2024:2947-1 |
| SLES 15 SP5 | kernel-default-base | 5.14.21-150500.55.73.1.150500.6.33.8 | SUSE-SU-2024:2939-1 |
| SLES 15 SP5 | kernel-docs | 5.14.21-150500.55.73.2 | SUSE-SU-2024:2939-1 |
| SLES 15 SP4 | kernel-64kb +6 | 5.14.21-150400.24.128.1 | SUSE-SU-2024:2929-1 |
| SLES 15 SP4 | kernel-default-base | 5.14.21-150400.24.128.1.150400.24.62.1 | SUSE-SU-2024:2929-1 |
| SLES 15 SP3 | kernel-64kb +7 | 5.3.18-150300.59.174.1 | SUSE-SU-2024:3249-1 |
| SLES 15 SP3 | kernel-default-base | 5.3.18-150300.59.174.1.150300.18.103.1 | SUSE-SU-2024:3249-1 |
| SLES 12 SP5 | kernel-syms +2 | 4.12.14-122.293.1 | SUSE-SU-2026:0473-1 |
Show 17 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 15 SP4 | kernel-default-base | 5.14.21-150400.24.128.1.150400.24.62.1 | SUSE-SU-2024:2929-1 |
| SLES for SAP 15 SP4 | kernel-docs +4 | 5.14.21-150400.24.128.1 | SUSE-SU-2024:2929-1 |
| SLES for SAP 15 SP3 | kernel-default-base | 5.3.18-150300.59.174.1.150300.18.103.1 | SUSE-SU-2024:3249-1 |
| SLES for SAP 15 SP3 | kernel-docs +5 | 5.3.18-150300.59.174.1 | SUSE-SU-2024:3249-1 |
| SLE Micro 5.5 | kernel-default | 5.14.21-150500.55.73.1 | SUSE-SU-2024:2939-1 |
| SLE Micro 5.5 | kernel-default-base | 5.14.21-150500.55.73.1.150500.6.33.8 | SUSE-SU-2024:2939-1 |
| SLE Micro 5.5 | kernel-rt +1 | 5.14.21-150500.13.64.1 | SUSE-SU-2024:2894-1 |
| SLE Micro 5.4 | kernel-default | 5.14.21-150400.24.128.1 | SUSE-SU-2024:2929-1 |
| SLE Micro 5.4 | kernel-default-base | 5.14.21-150400.24.128.1.150400.24.62.1 | SUSE-SU-2024:2929-1 |
| SLE Micro 5.4 | kernel-rt +1 | 5.14.21-150400.15.88.1 | SUSE-SU-2024:2902-1 |
| SLE Micro 5.3 | kernel-default | 5.14.21-150400.24.128.1 | SUSE-SU-2024:2929-1 |
| SLE Micro 5.3 | kernel-default-base | 5.14.21-150400.24.128.1.150400.24.62.1 | SUSE-SU-2024:2929-1 |
| SLE Micro 5.3 | kernel-rt +1 | 5.14.21-150400.15.88.1 | SUSE-SU-2024:2902-1 |
| SLE Micro 5.2 | kernel-default | 5.3.18-150300.59.174.1 | SUSE-SU-2024:3249-1 |
| SLE Micro 5.2 | kernel-default-base | 5.3.18-150300.59.174.1.150300.18.103.1 | SUSE-SU-2024:3249-1 |
| SLE Micro 5.2 | kernel-rt +1 | 5.3.18-150300.181.2 | SUSE-SU-2024:3225-1 |
| SLE Micro 5.1 | kernel-default | 5.3.18-150300.59.174.1 | SUSE-SU-2024:3249-1 |
| SLE Micro 5.1 | kernel-default-base | 5.3.18-150300.59.174.1.150300.18.103.1 | SUSE-SU-2024:3249-1 |
| SLE Micro 5.1 | kernel-rt +1 | 5.3.18-150300.181.2 | SUSE-SU-2024:3225-1 |
| SLE Live Patching 15 SP5 | kernel-default | 5.14.21-150500.55.73.1 | SUSE-SU-2024:2939-1 |
| SLE Live Patching 15 SP5 | kernel-livepatch-SLE15-SP5_Update_17 +1 | 1-150500.11.3.1 | SUSE-SU-2024:2939-1, SUSE-SU-2024:2894-1 |
| SLE Live Patching 15 SP4 | kernel-default | 5.14.21-150400.24.128.1 | SUSE-SU-2024:2929-1 |
| SLE Live Patching 15 SP4 | kernel-livepatch-SLE15-SP4_Update_29 | 1-150400.9.3.1 | SUSE-SU-2024:2929-1 |
| SLE Live Patching 15 SP3 | kernel-default | 5.3.18-150300.59.174.1 | SUSE-SU-2024:3249-1 |
| SLE Live Patching 15 SP3 | kernel-livepatch-SLE15-SP3_Update_48 | 1-150300.7.3.1 | SUSE-SU-2024:3249-1 |
| SLE Live Patching 12 SP5 | kernel-default | 4.12.14-122.293.1 | SUSE-SU-2026:0473-1 |
| SLE Live Patching 12 SP5 | kgraft-patch-SLE12-SP5_Update_77 | 1-8.3.1 | SUSE-SU-2026:0473-1 |
| SLE HPC 15 SP4 | kernel-64kb +5 | 5.14.21-150400.24.128.1 | SUSE-SU-2024:2929-1 |
| SLE HPC 15 SP4 | kernel-default-base | 5.14.21-150400.24.128.1.150400.24.62.1 | SUSE-SU-2024:2929-1 |
| SLE HPC 15 SP3 | kernel-64kb +6 | 5.3.18-150300.59.174.1 | SUSE-SU-2024:3249-1 |
| SLE HPC 15 SP3 | kernel-default-base | 5.3.18-150300.59.174.1.150300.18.103.1 | SUSE-SU-2024:3249-1 |
| SUSE Real Time Module 15 SP5 | kernel-rt +3 | 5.14.21-150500.13.64.1 | SUSE-SU-2024:2894-1 |
| SUSE Manager Server 4.3 | kernel-default-base | 5.14.21-150400.24.128.1.150400.24.62.1 | SUSE-SU-2024:2929-1 |
| SUSE Manager Server 4.3 | kernel-syms +3 | 5.14.21-150400.24.128.1 | SUSE-SU-2024:2929-1 |
| SUSE Manager Proxy 4.3 | kernel-default-base | 5.14.21-150400.24.128.1.150400.24.62.1 | SUSE-SU-2024:2929-1 |
| SUSE Manager Proxy 4.3 | kernel-syms +2 | 5.14.21-150400.24.128.1 | SUSE-SU-2024:2929-1 |
| SUSE Enterprise Storage 7.1 | kernel-64kb +6 | 5.3.18-150300.59.174.1 | SUSE-SU-2024:3249-1 |
| SUSE Enterprise Storage 7.1 | kernel-default-base | 5.3.18-150300.59.174.1.150300.18.103.1 | SUSE-SU-2024:3249-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Leap 15.5 | dtb-aarch64 +9 | 5.14.21-150500.55.73.1 | SUSE-SU-2024:2939-1 |
| openSUSE Leap 15.5 | kernel-azure +2 | 5.14.21-150500.33.63.1 | SUSE-SU-2024:2947-1 |
| openSUSE Leap 15.5 | kernel-default-base | 5.14.21-150500.55.73.1.150500.6.33.8 | SUSE-SU-2024:2939-1 |
| openSUSE Leap 15.5 | kernel-docs | 5.14.21-150500.55.73.2 | SUSE-SU-2024:2939-1 |
| openSUSE Leap 15.5 | kernel-rt +3 | 5.14.21-150500.13.64.1 | SUSE-SU-2024:2894-1 |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Leap Micro 5.5 | kernel-default | 5.14.21-150500.55.73.1 | SUSE-SU-2024:2939-1 |
| openSUSE Leap Micro 5.5 | kernel-default-base | 5.14.21-150500.55.73.1.150500.6.33.8 | SUSE-SU-2024:2939-1 |
| openSUSE Leap Micro 5.5 | kernel-rt | 5.14.21-150500.13.64.1 | SUSE-SU-2024:2894-1 |
Advisories 10
- USN-7039-1 linux, linux-aws, linux-kvm, linux-lts-xenial vulnerabilities Ubuntu Security Notices (USN) · Oct 26, 2026
- WID-SEC-2024-1625 Linux Kernel: Mehrere Schwachstellen ermöglichen nicht spezifizierten Angriff BSI CERT-Bund (WID) · Jul 27, 2026
- SUSE-SU-2026:0473-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Mar 23, 2026
- SUSE-SU-2024:2947-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:3249-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:2939-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:3225-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:2902-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:2929-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:2894-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · May 2, 2025
References
- https://git.kernel.org/stable/c/4325124dde6726267813c736fee61226f1d38f0b
- https://git.kernel.org/stable/c/e2d3a7009e505e120805f449c832942660f3f7f3
- https://git.kernel.org/stable/c/609a7119bffe3ddd7c93f2fa65be8917e02a0b7e
- https://git.kernel.org/stable/c/2282a6eb6d4e118e294e43dcc421e0e0fe4040b5
- https://git.kernel.org/stable/c/00bdd9bf1ac6d401ad926d3d8df41b9f1399f646
- https://git.kernel.org/stable/c/2015c23610cd0efadaeca4d3a8d1dae9a45aa35a
- https://git.kernel.org/stable/c/27d64436984fb8835a8b7e95993193cc478b162e
- https://git.kernel.org/stable/c/16b1941eac2bd499f065a6739a40ce0011a3d740