Description
In the Linux kernel, the following vulnerability has been resolved:
spi: Fix use-after-free with devm_spi_alloc_*
We can't rely on the contents of the devres list during
spi_unregister_controller(), as the list is already torn down at the
time we perform devres_find() for devm_spi_release_controller. This
causes devices registered with devm_spi_alloc_{master,slave}() to be
mistakenly identified as legacy, non-devm managed devices and have their
reference counters decremented below 0.
------------[ cut here ]------------
WARNING: CPU: 1 PID: 660 at lib/refcount.c:28 refcount_warn_saturate+0x108/0x174
[<b0396f04>] (refcount_warn_saturate) from [<b03c56a4>] (kobject_put+0x90/0x98)
[<b03c5614>] (kobject_put) from [<b0447b4c>] (put_device+0x20/0x24)
r4:b6700140
[<b0447b2c>] (put_device) from [<b07515e8>] (devm_spi_release_controller+0x3c/0x40)
[<b07515ac>] (devm_spi_release_controller) from [<b045343c>] (release_nodes+0x84/0xc4)
r5:b6700180 r4:b6700100
[<b04533b8>] (release_nodes) from [<b0454160>] (devres_release_all+0x5c/0x60)
r8:b1638c54 r7:b117ad94 r6:b1638c10 r5:b117ad94 r4:b163dc10
[<b0454104>] (devres_release_all) from [<b044e41c>] (__device_release_driver+0x144/0x1ec)
r5:b117ad94 r4:b163dc10
[<b044e2d8>] (__device_release_driver) from [<b044f70c>] (device_driver_detach+0x84/0xa0)
r9:00000000 r8:00000000 r7:b117ad94 r6:b163dc54 r5:b1638c10 r4:b163dc10
[<b044f688>] (device_driver_detach) from [<b044d274>] (unbind_store+0xe4/0xf8)
Instead, determine the devm allocation state as a flag on the
controller which is guaranteed to be stable during cleanup.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Linux | Linux | 4.4.248 – < 4.4.271, 4.9.248 – < 4.9.271, 4.14.212 – < 4.14.233, 4.19.163 – < 4.19.191, 5.4.80 – < 5.4.119, 5.9.11 – < 5.10, 5.10 | 4.4.271 |
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.10.38-1 | — |
| Debian 13 | linux | 5.10.38-1 | — |
| Debian 12 | linux | 5.10.38-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-77.86 | — |
| Ubuntu 20.04 LTS | linux-aws +1 | 5.4.0-1051.53 | — |
| Ubuntu 20.04 LTS | linux-bluefield | 5.4.0-1013.16 | — |
| Ubuntu 20.04 LTS | linux-gcp | 5.4.0-1046.49 | — |
| Ubuntu 20.04 LTS | linux-gke +26 | No fix yet | — |
| Ubuntu 20.04 LTS | linux-gkeop | 5.4.0-1018.19 | — |
| Ubuntu 20.04 LTS | linux-kvm | 5.4.0-1041.42 | — |
| Ubuntu 20.04 LTS | linux-oracle | 5.4.0-1048.52 | — |
| Ubuntu 20.04 LTS | linux-raspi | 5.4.0-1038.41 | — |
| Ubuntu 18.04 LTS | linux | 4.15.0-151.157 | — |
| Ubuntu 18.04 LTS | linux-aws | 4.15.0-1109.116 | — |
| Ubuntu 18.04 LTS | linux-aws-5.4 +1 | 5.4.0-1051.53~18.04.1 | — |
| Ubuntu 18.04 LTS | linux-azure-4.15 | 4.15.0-1121.134 | — |
| Ubuntu 18.04 LTS | linux-gcp +13 | No fix yet | — |
| Ubuntu 18.04 LTS | linux-gcp-4.15 | 4.15.0-1106.120 | — |
| Ubuntu 18.04 LTS | linux-gcp-5.4 | 5.4.0-1046.49~18.04.1 | — |
| Ubuntu 18.04 LTS | linux-hwe-5.4 | 5.4.0-77.86~18.04.1 | — |
| Ubuntu 18.04 LTS | linux-kvm | 4.15.0-1097.99 | — |
| Ubuntu 18.04 LTS | linux-oracle | 4.15.0-1078.86 | — |
| Ubuntu 18.04 LTS | linux-oracle-5.4 | 5.4.0-1048.52~18.04.1 | — |
| Ubuntu 18.04 LTS | linux-raspi-5.4 | 5.4.0-1038.41~18.04.1 | — |
| Ubuntu 16.04 LTS | linux-hwe-edge | No fix yet | — |
Show 6 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro FIPS 20.04 LTS | linux-fips | No fix yet | — |
| Ubuntu Pro FIPS-updates 20.04 LTS | linux-fips | 5.4.0-1028.32 | — |
| Ubuntu Pro FIPS-updates 18.04 LTS | linux-aws-fips | 4.15.0-2051.53 | — |
| Ubuntu Pro FIPS-updates 18.04 LTS | linux-azure-fips | 4.15.0-2033.37 | — |
| Ubuntu Pro FIPS-updates 18.04 LTS | linux-fips | 4.15.0-1066.75 | — |
| Ubuntu Pro FIPS-updates 18.04 LTS | linux-gcp-fips | 4.15.0-2016.18 | — |
| Ubuntu Pro FIPS-updates 16.04 LTS | linux-fips | 4.4.0-1113.120 | USN-7506-3 |
| Ubuntu Pro 16.04 LTS | linux | 4.4.0-268.302 | USN-7506-1 |
| Ubuntu Pro 16.04 LTS | linux-aws | 4.4.0-1181.196 | USN-7506-1 |
| Ubuntu Pro 16.04 LTS | linux-aws-hwe | 4.15.0-1109.116~16.04.1 | — |
| Ubuntu Pro 16.04 LTS | linux-azure | 4.15.0-1121.134~16.04.1 | — |
| Ubuntu Pro 16.04 LTS | linux-gcp | 4.15.0-1106.120~16.04.1 | — |
| Ubuntu Pro 16.04 LTS | linux-hwe | 4.15.0-151.157~16.04.1 | — |
| Ubuntu Pro 16.04 LTS | linux-kvm | 4.4.0-1144.155 | USN-7506-1 |
| Ubuntu Pro 16.04 LTS | linux-oracle | 4.15.0-1078.86~16.04.1 | — |
| Ubuntu Pro 14.04 LTS | linux-aws | 4.4.0-1143.149 | USN-7506-2 |
| Ubuntu Pro 14.04 LTS | linux-azure | 4.15.0-1121.134~14.04.1 | — |
| Ubuntu Pro 14.04 LTS | linux-lts-xenial | 4.4.0-268.302~14.04.1 | USN-7506-4 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP3 | kernel-64kb +7 | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SLES 15 SP3 | kernel-default-base | 5.3.18-150300.59.158.1.150300.18.92.5 | SUSE-SU-2024:1489-1 |
Show 6 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 15 SP3 | kernel-default-base | 5.3.18-150300.59.158.1.150300.18.92.5 | SUSE-SU-2024:1489-1 |
| SLES for SAP 15 SP3 | kernel-docs +5 | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SLE Micro 5.2 | kernel-default | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SLE Micro 5.2 | kernel-default-base | 5.3.18-150300.59.158.1.150300.18.92.5 | SUSE-SU-2024:1489-1 |
| SLE Micro 5.2 | kernel-rt +1 | 5.3.18-150300.166.1 | SUSE-SU-2024:1465-1 |
| SLE Micro 5.1 | kernel-default | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SLE Micro 5.1 | kernel-default-base | 5.3.18-150300.59.158.1.150300.18.92.5 | SUSE-SU-2024:1489-1 |
| SLE Micro 5.1 | kernel-rt +1 | 5.3.18-150300.166.1 | SUSE-SU-2024:1465-1 |
| SLE Live Patching 15 SP3 | kernel-default | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SLE Live Patching 15 SP3 | kernel-livepatch-SLE15-SP3_Update_43 | 1-150300.7.3.5 | SUSE-SU-2024:1489-1 |
| SLE HPC 15 SP3 | kernel-64kb +6 | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SLE HPC 15 SP3 | kernel-default-base | 5.3.18-150300.59.158.1.150300.18.92.5 | SUSE-SU-2024:1489-1 |
| SUSE Enterprise Storage 7.1 | kernel-64kb +6 | 5.3.18-150300.59.158.1 | SUSE-SU-2024:1489-1 |
| SUSE Enterprise Storage 7.1 | kernel-default-base | 5.3.18-150300.59.158.1.150300.18.92.5 | SUSE-SU-2024:1489-1 |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2 | kernel-livepatch-4.14.238-182.421 | 1.0-0.amzn2 | ALAS2-2021-1685 |
| Amazon Linux 2 | perf +8 | 4.14.238-182.421.amzn2 | ALAS2-2021-1685 |
Advisories 8
- USN-7506-2 linux-aws vulnerabilities Ubuntu Security Notices (USN) · Oct 30, 2026
- USN-7506-1 linux, linux-aws, linux-kvm vulnerabilities Ubuntu Security Notices (USN) · Oct 30, 2026
- USN-7506-4 linux-lts-xenial vulnerabilities Ubuntu Security Notices (USN) · Oct 30, 2026
- USN-7506-3 linux-fips vulnerabilities Ubuntu Security Notices (USN) · Oct 30, 2026
- WID-SEC-2024-0527 Linux Kernel: Mehrere Schwachstellen BSI CERT-Bund (WID) · Aug 4, 2026
- SUSE-SU-2024:1489-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:1465-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- ALAS2-2021-1685 Important: kernel security update (Amazon Linux 2) Amazon Linux Security Center (ALAS) · Oct 2, 2025
References
- https://git.kernel.org/stable/c/62bb2c7f2411a0045c24831f11ecacfc35610815
- https://git.kernel.org/stable/c/8bf96425c90f5c1dcf3b7b9df568019a1d4b8a0e
- https://git.kernel.org/stable/c/8e029707f50a82c53172359c686b2536ab54e58c
- https://git.kernel.org/stable/c/28a5529068c51cdf0295ab1e11a99a3a909a03e4
- https://git.kernel.org/stable/c/001c8e83646ad3b847b18f6ac55a54367d917d74
- https://git.kernel.org/stable/c/c7fabe372a9031acd00498bc718ce27c253abfd1
- https://git.kernel.org/stable/c/cee78aa24578edac8cf00513dca618c0acc17cd7
- https://git.kernel.org/stable/c/8735248ebb918d25427965f0db07939ed0473ec6
- https://git.kernel.org/stable/c/794aaf01444d4e765e2b067cba01cc69c1c68ed9