Description
In the Linux kernel, the following vulnerability has been resolved:
btrfs: do not ASSERT() if the newly created subvolume already got read
[BUG]
There is a syzbot crash, triggered by the ASSERT() during subvolume
creation:
assertion failed: !anon_dev, in fs/btrfs/disk-io.c:1319
------------[ cut here ]------------
kernel BUG at fs/btrfs/disk-io.c:1319!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
RIP: 0010:btrfs_get_root_ref.part.0+0x9aa/0xa60
<TASK>
btrfs_get_new_fs_root+0xd3/0xf0
create_subvol+0xd02/0x1650
btrfs_mksubvol+0xe95/0x12b0
__btrfs_ioctl_snap_create+0x2f9/0x4f0
btrfs_ioctl_snap_create+0x16b/0x200
btrfs_ioctl+0x35f0/0x5cf0
__x64_sys_ioctl+0x19d/0x210
do_syscall_64+0x3f/0xe0
entry_SYSCALL_64_after_hwframe+0x63/0x6b
---[ end trace 0000000000000000 ]---
[CAUSE]
During create_subvol(), after inserting root item for the newly created
subvolume, we would trigger btrfs_get_new_fs_root() to get the
btrfs_root of that subvolume.
The idea here is, we have preallocated an anonymous device number for
the subvolume, thus we can assign it to the new subvolume.
But there is really nothing preventing things like backref walk to read
the new subvolume.
If that happens before we call btrfs_get_new_fs_root(), the subvolume
would be read out, with a new anonymous device number assigned already.
In that case, we would trigger ASSERT(), as we really expect no one to
read out that subvolume (which is not yet accessible from the fs).
But things like backref walk is still possible to trigger the read on
the subvolume.
Thus our assumption on the ASSERT() is not correct in the first place.
[FIX]
Fix it by removing the ASSERT(), and just free the @anon_dev, reset it
to 0, and continue.
If the subvolume tree is read out by something else, it should have
already get a new anon_dev assigned thus we only need to free the
preallocated one.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Linux | Linux | 5.8.3 – < 5.9, 5.9 | 5.9 |
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 | 6.7.7-1 | — |
| Debian 13 | linux | 6.7.7-1 | — |
| Debian 12 | linux | 6.1.82-1 | — |
| Debian 11 | linux | 5.10.216-1 | DSA-5681-1 |
| Debian 10 | linux-5.10 | 5.10.216-1~deb10u1 | DLA-3842-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Nvidia-BlueField 22.04 LTS | linux-bluefield | 5.15.0-1040.42 | — |
| Ubuntu 22.04 LTS | linux +1 | 5.15.0-102.112 | — |
| Ubuntu 22.04 LTS | linux-aws | 5.15.0-1057.63 | — |
| Ubuntu 22.04 LTS | linux-azure | 5.15.0-1060.69 | — |
| Ubuntu 22.04 LTS | linux-azure-fde | 5.15.0-1060.69.1 | — |
| Ubuntu 22.04 LTS | linux-gcp | 5.15.0-1055.63 | — |
| Ubuntu 22.04 LTS | linux-gke +1 | 5.15.0-1054.59 | — |
| Ubuntu 22.04 LTS | linux-gkeop | 5.15.0-1040.46 | — |
| Ubuntu 22.04 LTS | linux-ibm +1 | 5.15.0-1050.53 | — |
| Ubuntu 22.04 LTS | linux-intel-iotg | 5.15.0-1052.58 | — |
| Ubuntu 22.04 LTS | linux-nvidia | 5.15.0-1048.48 | — |
| Ubuntu 22.04 LTS | linux-nvidia-6.5 | 6.5.0-1014.14 | — |
| Ubuntu 22.04 LTS | linux-nvidia-tegra | 5.15.0-1025.25 | — |
| Ubuntu 22.04 LTS | linux-nvidia-tegra-igx | 5.15.0-1012.12 | — |
| Ubuntu 22.04 LTS | linux-oracle | 5.15.0-1055.61 | — |
| Ubuntu 22.04 LTS | linux-riscv +30 | No fix yet | — |
| Ubuntu 22.04 LTS | linux-xilinx-zynqmp | 5.15.0-1030.34 | — |
| Ubuntu 20.04 LTS | linux-aws-5.15 | 5.15.0-1057.63~20.04.1 | — |
| Ubuntu 20.04 LTS | linux-azure-5.15 | 5.15.0-1060.69~20.04.1 | — |
| Ubuntu 20.04 LTS | linux-gcp-5.15 | 5.15.0-1055.63~20.04.1 | — |
| Ubuntu 20.04 LTS | linux-gke +26 | No fix yet | — |
| Ubuntu 20.04 LTS | linux-gkeop-5.15 | 5.15.0-1040.46~20.04.1 | — |
| Ubuntu 20.04 LTS | linux-hwe-5.15 +1 | 5.15.0-102.112~20.04.1 | — |
| Ubuntu 20.04 LTS | linux-ibm-5.15 | 5.15.0-1050.53~20.04.1 | — |
| Ubuntu 20.04 LTS | linux-intel-iotg-5.15 | 5.15.0-1052.58~20.04.1 | — |
| Ubuntu 20.04 LTS | linux-nvidia-tegra-5.15 | 5.15.0-1025.25~20.04.1 | — |
| Ubuntu 20.04 LTS | linux-oracle-5.15 | 5.15.0-1055.61~20.04.1 | — |
| Ubuntu 20.04 LTS | linux-riscv-5.15 | 5.15.0-1053.57~20.04.1 | — |
| Ubuntu 18.04 LTS | linux-gcp +13 | No fix yet | — |
| Ubuntu 16.04 LTS | linux-hwe-edge | No fix yet | — |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro Realtime 24.04 LTS | linux-raspi-realtime | 6.8.0-2001.1 | — |
| Ubuntu Pro Realtime 22.04 LTS | linux-intel-iot-realtime | 5.15.0-1050.52 | — |
| Ubuntu Pro Realtime 22.04 LTS | linux-realtime | 5.15.0-1058.66 | — |
| Ubuntu Pro FIPS-updates 22.04 LTS | linux-aws-fips | 5.15.0-1057.63+fips1 | — |
| Ubuntu Pro FIPS-updates 22.04 LTS | linux-azure-fips | 5.15.0-1060.69+fips1 | — |
| Ubuntu Pro FIPS-updates 22.04 LTS | linux-fips | 5.15.0-102.112+fips1 | — |
| Ubuntu Pro FIPS-updates 22.04 LTS | linux-gcp-fips | 5.15.0-1055.63+fips2 | — |
| Ubuntu Pro FIPS-preview 22.04 LTS | linux-fips +3 | No fix yet | — |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP5 | kernel-64kb +5 | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SLES 15 SP5 | kernel-azure +2 | 5.14.21-150500.33.48.1 | SUSE-SU-2024:1490-1 |
| SLES 15 SP5 | kernel-default-base | 5.14.21-150500.55.62.2.150500.6.27.2 | SUSE-SU-2024:1659-1 |
| SLES 15 SP5 | kernel-syms | 5.14.21-150500.55.62.1 | SUSE-SU-2024:1659-1 |
| SLES 15 SP4 | kernel-64kb +6 | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SLES 15 SP4 | kernel-default-base | 5.14.21-150400.24.119.1.150400.24.56.1 | SUSE-SU-2024:1641-1 |
Show 10 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.119.1.150400.24.56.1 | SUSE-SU-2024:1641-1 |
| SLES for SAP 15 SP4 | kernel-docs +4 | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SLE Micro 5.5 | kernel-default | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SLE Micro 5.5 | kernel-default-base | 5.14.21-150500.55.62.2.150500.6.27.2 | SUSE-SU-2024:1659-1 |
| SLE Micro 5.5 | kernel-rt +1 | 5.14.21-150500.13.52.1 | SUSE-SU-2024:1663-1 |
| SLE Micro 5.4 | kernel-default | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SLE Micro 5.4 | kernel-default-base | 5.14.21-150400.24.119.1.150400.24.56.1 | SUSE-SU-2024:1641-1 |
| SLE Micro 5.4 | kernel-rt +1 | 5.14.21-150400.15.79.1 | SUSE-SU-2024:1647-1 |
| SLE Micro 5.3 | kernel-default | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SLE Micro 5.3 | kernel-default-base | 5.14.21-150400.24.119.1.150400.24.56.1 | SUSE-SU-2024:1641-1 |
| SLE Micro 5.3 | kernel-rt +1 | 5.14.21-150400.15.79.1 | SUSE-SU-2024:1647-1 |
| SLE Live Patching 15 SP5 | kernel-default | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| SLE Live Patching 15 SP5 | kernel-livepatch-SLE15-SP5-RT_Update_14 | 1-150500.11.5.1 | SUSE-SU-2024:1663-1 |
| SLE Live Patching 15 SP5 | kernel-livepatch-SLE15-SP5_Update_13 | 1-150500.11.3.2 | SUSE-SU-2024:1659-1 |
| SLE Live Patching 15 SP4 | kernel-default | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SLE Live Patching 15 SP4 | kernel-livepatch-SLE15-SP4_Update_26 | 1-150400.9.3.1 | SUSE-SU-2024:1641-1 |
| SLE HPC 15 SP4 | kernel-64kb +5 | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SLE HPC 15 SP4 | kernel-default-base | 5.14.21-150400.24.119.1.150400.24.56.1 | SUSE-SU-2024:1641-1 |
| SUSE Real Time Module 15 SP5 | kernel-rt +3 | 5.14.21-150500.13.52.1 | SUSE-SU-2024:1663-1 |
| SUSE Manager Server 4.3 | kernel-default-base | 5.14.21-150400.24.119.1.150400.24.56.1 | SUSE-SU-2024:1641-1 |
| SUSE Manager Server 4.3 | kernel-syms +3 | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| SUSE Manager Proxy 4.3 | kernel-default-base | 5.14.21-150400.24.119.1.150400.24.56.1 | SUSE-SU-2024:1641-1 |
| SUSE Manager Proxy 4.3 | kernel-syms +2 | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Leap 15.5 | dtb-aarch64 +2 | 5.14.21-150500.55.62.1 | SUSE-SU-2024:1659-1 |
| openSUSE Leap 15.5 | kernel-64kb +7 | 5.14.21-150500.55.62.2 | SUSE-SU-2024:1659-1 |
| openSUSE Leap 15.5 | kernel-azure +2 | 5.14.21-150500.33.48.1 | SUSE-SU-2024:1490-1 |
| openSUSE Leap 15.5 | kernel-default-base | 5.14.21-150500.55.62.2.150500.6.27.2 | SUSE-SU-2024:1659-1 |
| openSUSE Leap 15.5 | kernel-rt +3 | 5.14.21-150500.13.52.1 | SUSE-SU-2024:1663-1 |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Leap Micro 5.4 | kernel-default | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| openSUSE Leap Micro 5.4 | kernel-default-base | 5.14.21-150400.24.119.1.150400.24.56.1 | SUSE-SU-2024:1641-1 |
| openSUSE Leap Micro 5.4 | kernel-rt | 5.14.21-150400.15.79.1 | SUSE-SU-2024:1647-1 |
| openSUSE Leap Micro 5.3 | kernel-default | 5.14.21-150400.24.119.1 | SUSE-SU-2024:1641-1 |
| openSUSE Leap Micro 5.3 | kernel-default-base | 5.14.21-150400.24.119.1.150400.24.56.1 | SUSE-SU-2024:1641-1 |
| openSUSE Leap Micro 5.3 | kernel-rt | 5.14.21-150400.15.79.1 | SUSE-SU-2024:1647-1 |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | kernel-livepatch-6.1.79-99.164 | 1.0-0.amzn2023 | ALAS2023-2024-549 |
| Amazon Linux 2023 | perf +14 | 6.1.79-99.164.amzn2023 | ALAS2023-2024-549 |
Advisories 10
- WID-SEC-2024-0773 Linux Kernel: Mehrere Schwachstellen BSI CERT-Bund (WID) · Oct 25, 2026
- DSA-5681-1 linux - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-3842-1 linux-5.10 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- SUSE-SU-2024:1663-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:1647-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:1490-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:1641-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2024:1659-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · May 2, 2025
- WID-SEC-2025-0612 IBM Security Guardium: Mehrere Schwachstellen BSI CERT-Bund (WID) · Mar 20, 2025
- ALAS2023-2024-549 Important: kernel security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Mar 10, 2025
References
- https://git.kernel.org/stable/c/3f5d47eb163bceb1b9e613c9003bae5fefc0046f
- https://git.kernel.org/stable/c/e31546b0f34af21738c4ceac47d662c00ee6382f
- https://git.kernel.org/stable/c/66b317a2fc45b2ef66527ee3f8fa08fb5beab88d
- https://git.kernel.org/stable/c/833775656d447c545133a744a0ed1e189ce61430
- https://git.kernel.org/stable/c/5a172344bfdabb46458e03708735d7b1a918c468
- https://git.kernel.org/stable/c/e03ee2fe873eb68c1f9ba5112fee70303ebf9dfb