Description
In the Linux kernel, the following vulnerability has been resolved:
USB: core: Fix hang in usb_kill_urb by adding memory barriers
The syzbot fuzzer has identified a bug in which processes hang waiting
for usb_kill_urb() to return. It turns out the issue is not unlinking
the URB; that works just fine. Rather, the problem arises when the
wakeup notification that the URB has completed is not received.
The reason is memory-access ordering on SMP systems. In outline form,
usb_kill_urb() and __usb_hcd_giveback_urb() operating concurrently on
different CPUs perform the following actions:
CPU 0 CPU 1
---------------------------- ---------------------------------
usb_kill_urb(): __usb_hcd_giveback_urb():
... ...
atomic_inc(&urb->reject); atomic_dec(&urb->use_count);
... ...
wait_event(usb_kill_urb_queue,
atomic_read(&urb->use_count) == 0);
if (atomic_read(&urb->reject))
wake_up(&usb_kill_urb_queue);
Confining your attention to urb->reject and urb->use_count, you can
see that the overall pattern of accesses on CPU 0 is:
write urb->reject, then read urb->use_count;
whereas the overall pattern of accesses on CPU 1 is:
write urb->use_count, then read urb->reject.
This pattern is referred to in memory-model circles as SB (for "Store
Buffering"), and it is well known that without suitable enforcement of
the desired order of accesses -- in the form of memory barriers -- it
is entirely possible for one or both CPUs to execute their reads ahead
of their writes. The end result will be that sometimes CPU 0 sees the
old un-decremented value of urb->use_count while CPU 1 sees the old
un-incremented value of urb->reject. Consequently CPU 0 ends up on
the wait queue and never gets woken up, leading to the observed hang
in usb_kill_urb().
The same pattern of accesses occurs in usb_poison_urb() and the
failure pathway of usb_hcd_submit_urb().
The problem is fixed by adding suitable memory barriers. To provide
proper memory-access ordering in the SB pattern, a full barrier is
required on both CPUs. The atomic_inc() and atomic_dec() accesses
themselves don't provide any memory ordering, but since they are
present, we can use the optimized smp_mb__after_atomic() memory
barrier in the various routines to obtain the desired effect.
This patch adds the necessary memory barriers.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Linux | Linux | 2.6.29 | 4.4.302 |
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.16.7-1 | — |
| Debian 13 | linux | 5.16.7-1 | — |
| Debian 12 | linux | 5.16.7-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 24.04 LTS | linux-raspi-realtime | No fix yet | — |
| Ubuntu 22.04 LTS | linux-riscv +22 | No fix yet | — |
| Ubuntu 20.04 LTS | linux | 5.4.0-109.123 | — |
| Ubuntu 20.04 LTS | linux-aws +1 | 5.4.0-1072.77 | — |
| Ubuntu 20.04 LTS | linux-azure | 5.4.0-1077.80 | — |
| Ubuntu 20.04 LTS | linux-bluefield | 5.4.0-1035.38 | — |
| Ubuntu 20.04 LTS | linux-gke +26 | No fix yet | — |
| Ubuntu 20.04 LTS | linux-gkeop | 5.4.0-1039.40 | — |
| Ubuntu 20.04 LTS | linux-ibm | 5.4.0-1020.22 | — |
| Ubuntu 20.04 LTS | linux-iot | 5.4.0-1004.6 | — |
| Ubuntu 20.04 LTS | linux-kvm | 5.4.0-1062.65 | — |
| Ubuntu 20.04 LTS | linux-oracle | 5.4.0-1070.76 | — |
| Ubuntu 20.04 LTS | linux-raspi | 5.4.0-1059.67 | — |
| Ubuntu 18.04 LTS | linux | 4.15.0-176.185 | — |
| Ubuntu 18.04 LTS | linux-aws | 4.15.0-1127.136 | — |
| Ubuntu 18.04 LTS | linux-aws-5.4 +1 | 5.4.0-1072.77~18.04.1 | — |
| Ubuntu 18.04 LTS | linux-azure-4.15 | 4.15.0-1137.150 | — |
| Ubuntu 18.04 LTS | linux-azure-5.4 | 5.4.0-1077.80~18.04.1 | — |
| Ubuntu 18.04 LTS | linux-gcp +14 | No fix yet | — |
| Ubuntu 18.04 LTS | linux-gcp-4.15 | 4.15.0-1121.135 | — |
| Ubuntu 18.04 LTS | linux-hwe-5.4 | 5.4.0-109.123~18.04.1 | — |
| Ubuntu 18.04 LTS | linux-ibm-5.4 | 5.4.0-1020.22~18.04.1 | — |
| Ubuntu 18.04 LTS | linux-kvm | 4.15.0-1113.116 | — |
| Ubuntu 18.04 LTS | linux-oracle | 4.15.0-1092.101 | — |
| Ubuntu 18.04 LTS | linux-oracle-5.4 | 5.4.0-1070.76~18.04.1 | — |
| Ubuntu 18.04 LTS | linux-raspi-5.4 | 5.4.0-1059.66~18.04.1 | — |
| Ubuntu 16.04 LTS | linux-hwe-edge | No fix yet | — |
Show 8 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 | 5.4.0-1072.77+fips1 | — |
| Ubuntu Pro FIPS-updates 20.04 LTS | linux-azure-fips | 5.4.0-1076.79+fips1 | — |
| Ubuntu Pro FIPS-updates 20.04 LTS | linux-fips | 5.4.0-1048.54 | — |
| Ubuntu Pro FIPS-updates 20.04 LTS | linux-gcp-fips | 5.4.0-1071.75+fips1 | — |
| Ubuntu Pro FIPS-updates 18.04 LTS | linux-aws-fips | 4.15.0-2066.69 | — |
| Ubuntu Pro FIPS-updates 18.04 LTS | linux-azure-fips | 4.15.0-2048.52 | — |
| Ubuntu Pro FIPS-updates 18.04 LTS | linux-fips | 4.15.0-1084.93 | — |
| Ubuntu Pro FIPS-updates 18.04 LTS | linux-gcp-fips | 4.15.0-2031.34 | — |
| Ubuntu Pro FIPS-updates 16.04 LTS | linux-fips | No fix yet | — |
| Ubuntu Pro 16.04 LTS | linux +2 | No fix yet | — |
| Ubuntu Pro 16.04 LTS | linux-aws-hwe | 4.15.0-1127.136~16.04.1 | — |
| Ubuntu Pro 16.04 LTS | linux-azure | 4.15.0-1137.150~16.04.1 | — |
| Ubuntu Pro 16.04 LTS | linux-gcp | 4.15.0-1121.135~16.04.1 | — |
| Ubuntu Pro 16.04 LTS | linux-hwe | 4.15.0-176.185~16.04.1 | — |
| Ubuntu Pro 16.04 LTS | linux-oracle | 4.15.0-1092.101~16.04.1 | — |
| Ubuntu Pro 14.04 LTS | linux +2 | No fix yet | — |
| Ubuntu Pro 14.04 LTS | linux-azure | 4.15.0-1137.150~14.04.1 | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 8 | kernel-rt +12 | 4.18.0-553.22.1.rt7.363.el8_10 | RHSA-2024:7001 |
| RHEL 8 | perf +26 | 4.18.0-553.22.1.el8_10 | RHSA-2024:7000 |
AlmaLinux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux 8 | kernel-rt +11 | 4.18.0-553.22.1.rt7.363.el8_10 | ALSA-2024:7001 |
| AlmaLinux 8 | perf +24 | 4.18.0-553.22.1.el8_10 | ALSA-2024:7000 |
Rocky Linux
Errata ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Rocky Linux 8 | kernel | 4.18.0-553.22.1.el8_10 | RLSA-2024:7000 |
| Rocky Linux 8 | kernel-rt | 4.18.0-553.22.1.rt7.363.el8_10 | RLSA-2024:7001 |
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.60.1 | SUSE-SU-2024:2372-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.167.1 | SUSE-SU-2024:2362-1 |
| SLES 15 SP3 | kernel-default-base | 5.3.18-150300.59.167.1.150300.18.98.1 | SUSE-SU-2024:2362-1 |
| SLES 15 SP2 | kernel-default-base | 5.3.18-150200.24.197.1.150200.9.101.1 | SUSE-SU-2024:2365-1 |
| SLES 15 SP2 | kernel-docs +5 | 5.3.18-150200.24.197.1 | SUSE-SU-2024:2365-1 |
| SLES 12 SP5 | kernel-azure +2 | 4.12.14-16.191.1 | SUSE-SU-2024:2360-1 |
| SLES 12 SP5 | kernel-docs +4 | 4.12.14-122.222.1 | SUSE-SU-2024:2561-1 |
Show 22 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.167.1.150300.18.98.1 | SUSE-SU-2024:2362-1 |
| SLES for SAP 15 SP3 | kernel-docs +5 | 5.3.18-150300.59.167.1 | SUSE-SU-2024:2362-1 |
| SLES for SAP 15 SP2 | kernel-default-base | 5.3.18-150200.24.197.1.150200.9.101.1 | SUSE-SU-2024:2365-1 |
| SLES for SAP 15 SP2 | kernel-docs +5 | 5.3.18-150200.24.197.1 | SUSE-SU-2024:2365-1 |
| SLES for SAP 12 SP5 | kernel-azure +2 | 4.12.14-16.191.1 | SUSE-SU-2024:2360-1 |
| SLES for SAP 12 SP5 | kernel-syms +2 | 4.12.14-122.222.1 | SUSE-SU-2024:2561-1 |
| SLE Real Time 12 SP5 | kernel-rt +3 | 4.12.14-10.191.1 | SUSE-SU-2024:2381-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.61.1 | SUSE-SU-2024:2394-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.167.1 | SUSE-SU-2024:2362-1 |
| SLE Micro 5.2 | kernel-default-base | 5.3.18-150300.59.167.1.150300.18.98.1 | SUSE-SU-2024:2362-1 |
| SLE Micro 5.2 | kernel-rt +1 | 5.3.18-150300.175.1 | SUSE-SU-2024:2384-1 |
| SLE Micro 5.1 | kernel-default | 5.3.18-150300.59.167.1 | SUSE-SU-2024:2362-1 |
| SLE Micro 5.1 | kernel-default-base | 5.3.18-150300.59.167.1.150300.18.98.1 | SUSE-SU-2024:2362-1 |
| SLE Micro 5.1 | kernel-rt +1 | 5.3.18-150300.175.1 | SUSE-SU-2024:2384-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:2394-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.167.1 | SUSE-SU-2024:2362-1 |
| SLE Live Patching 15 SP3 | kernel-livepatch-SLE15-SP3_Update_46 | 1-150300.7.3.1 | SUSE-SU-2024:2362-1 |
| SLE Live Patching 15 SP2 | kernel-default | 5.3.18-150200.24.197.1 | SUSE-SU-2024:2365-1 |
| SLE Live Patching 15 SP2 | kernel-livepatch-SLE15-SP2_Update_50 | 1-150200.5.3.1 | SUSE-SU-2024:2365-1 |
| SLE Live Patching 12 SP5 | kernel-default | 4.12.14-122.222.1 | SUSE-SU-2024:2561-1 |
| SLE Live Patching 12 SP5 | kgraft-patch-SLE12-SP5_Update_58 | 1-8.3.1 | SUSE-SU-2024:2561-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.167.1 | SUSE-SU-2024:2362-1 |
| SLE HPC 15 SP3 | kernel-default-base | 5.3.18-150300.59.167.1.150300.18.98.1 | SUSE-SU-2024:2362-1 |
| SLE HPC 15 SP2 | kernel-default-base | 5.3.18-150200.24.197.1.150200.9.101.1 | SUSE-SU-2024:2365-1 |
| SLE HPC 15 SP2 | kernel-docs +5 | 5.3.18-150200.24.197.1 | SUSE-SU-2024:2365-1 |
| SUSE Real Time Module 15 SP5 | kernel-rt +3 | 5.14.21-150500.13.61.1 | SUSE-SU-2024:2394-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.167.1 | SUSE-SU-2024:2362-1 |
| SUSE Enterprise Storage 7.1 | kernel-default-base | 5.3.18-150300.59.167.1.150300.18.98.1 | SUSE-SU-2024:2362-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.60.1 | SUSE-SU-2024:2372-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.61.1 | SUSE-SU-2024:2394-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 |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2 | kernel-livepatch-4.14.268-205.500 | 1.0-0.amzn2 | ALAS2-2022-1761 |
| Amazon Linux 2 | perf +8 | 4.14.268-205.500.amzn2 | ALAS2-2022-1761 |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 8 | perf +19 | 4.18.0-553.22.1.el8_10 | ELSA-2024-7000 |
| Oracle Linux 7 | kernel-uek +5 | 4.1.12-124.91.3.el7uek | ELSA-2024-12806 |
Advisories 21
- WID-SEC-2024-1422 Linux Kernel: Mehrere Schwachstellen ermöglichen nicht spezifizierten Angriff BSI CERT-Bund (WID) · Oct 29, 2026
- ALSA-2024:7001 Important: kernel-rt security update AlmaLinux Security Advisories · Oct 29, 2026
- ALSA-2024:7000 Important: kernel security update AlmaLinux Security Advisories · Oct 29, 2026
- RHSA-2024:7001 Red Hat Security Advisory: kernel-rt security update Red Hat Security Advisories (RHSA) · Oct 17, 2026
- RHSA-2024:7000 Red Hat Security Advisory: kernel security update Red Hat Security Advisories (RHSA) · Oct 17, 2026
- RLSA-2024:7001 Important: kernel-rt security update Rocky Linux Security Advisories · Feb 5, 2026
- SUSE-SU-2024:2362-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:2561-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:2394-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:2384-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:2360-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:2365-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:2381-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:2372-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- ALAS2-2022-1761 Important: kernel security update (Amazon Linux 2) Amazon Linux Security Center (ALAS) · Oct 2, 2025
- RLSA-2024:7000 Important: kernel security update Rocky Linux Security Advisories · May 7, 2025
- ELSA-2024-12806 Important: Unbreakable Enterprise kernel security update (Oracle Linux 7) Oracle Linux Security Advisories (ELSA) · Nov 1, 2024
- ELSA-2024-7000 Important: kernel security update (Oracle Linux 8) Oracle Linux Security Advisories (ELSA) · Sep 24, 2024
References
- https://git.kernel.org/stable/c/5f138ef224dffd15d5e5c5b095859719e0038427
- https://git.kernel.org/stable/c/b50f5ca60475710bbc9a3af32fbfc17b1e69c2f0
- https://git.kernel.org/stable/c/546ba238535d925254e0b3f12012a5c55801e2f3
- https://git.kernel.org/stable/c/5904dfd3ddaff3bf4a41c3baf0a8e8f31ed4599b
- https://git.kernel.org/stable/c/9c61fce322ac2ef7fecf025285353570d60e41d6
- https://git.kernel.org/stable/c/e3b131e30e612ff0e32de6c1cb4f69f89db29193
- https://git.kernel.org/stable/c/9340226388c66a7e090ebb00e91ed64a753b6c26
- https://git.kernel.org/stable/c/c9a18f7c5b071dce5e6939568829d40994866ab0
- https://git.kernel.org/stable/c/26fbe9772b8c459687930511444ce443011f86bf