CVE-2024-26727 json
btrfs: do not ASSERT() if the newly created subvolume already got read
published 2024-04-03 2 y ago modified 2026-06-17 4 mo ago also EUVD-2024-23989
- cvss
- 5.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 13%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- Linux Linux 5.9, 5.10.210, 5.15.149, 6.1.79, 6.6.18, 6.7.6, 6.8
- linux Debian 12 6.1.82-1
- linux Debian 14, Debian 13 6.7.7-1
debian advisories DEBIAN-CVE-2024-26727
- linux Ubuntu 22.04 LTS 5.15.0-102.112
- linux-aws Ubuntu 22.04 LTS 5.15.0-1057.63
- linux-gcp Ubuntu 22.04 LTS 5.15.0-1055.63
- linux-gke Ubuntu 22.04 LTS 5.15.0-1054.59
- linux-ibm Ubuntu 22.04 LTS 5.15.0-1050.53
- linux-kvm Ubuntu 22.04 LTS 5.15.0-1054.59
- linux-azure Ubuntu 22.04 LTS 5.15.0-1060.69
- linux-gkeop Ubuntu 22.04 LTS 5.15.0-1040.46
ubuntu advisories UBUNTU-CVE-2024-26727
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- kernel-rt SLE Micro 5.5, Real Time Module 15 SP5, openSUSE Leap 15.5 5.14.21-150500.13.52.1
- kernel-syms-rt Real Time Module 15 SP5, openSUSE Leap 15.5 5.14.21-150500.13.52.1
- kernel-rt_debug Real Time Module 15 SP5, openSUSE Leap 15.5 5.14.21-150500.13.52.1
- kernel-source-rt SLE Micro 5.5, Real Time Module 15 SP5, openSUSE Leap 15.5 5.14.21-150500.13.52.1
- dtb-aarch64 openSUSE Leap 15.5 5.14.21-150500.55.62.1
- kernel-64kb SLE Module for Basesystem 15 SP5, openSUSE Leap 15.5 5.14.21-150500.55.62.2
- kernel-syms SLE Module for Development Tools 15 SP5, openSUSE Leap 15.5 5.14.21-150500.55.62.1
- kernel-obs-qa openSUSE Leap 15.5 5.14.21-150500.55.62.1
suse advisories SUSE-SU-2024:1663-1SUSE-SU-2024:1659-1SUSE-SU-2024:1647-1SUSE-SU-2024:1641-1SUSE-SU-2024:1490-1
- git.kernel.org/stable/c/3f5d47eb163bceb1b9e613c9003bae5fefc0046f commit
- git.kernel.org/stable/c/e31546b0f34af21738c4ceac47d662c00ee6382f commit
- git.kernel.org/stable/c/66b317a2fc45b2ef66527ee3f8fa08fb5beab88d commit
- git.kernel.org/stable/c/833775656d447c545133a744a0ed1e189ce61430 commit
- git.kernel.org/stable/c/5a172344bfdabb46458e03708735d7b1a918c468 commit
- git.kernel.org/stable/c/e03ee2fe873eb68c1f9ba5112fee70303ebf9dfb commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2024-26727 updated cvss 5.5
kernel: btrfs: do not ASSERT() if the newly created subvolume already got read
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
0.23% chance of exploitation in the next 30 days, higher than 13% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Affected products
- Linux Linux
Classification
- Weakness
-
- CWE-617 Reachable Assertion
- Technology feeds
References
-
git.kernel.org
/stable/c/3f5d47eb163bceb1b9e613c9003bae5fefc0046f
patch
-
git.kernel.org
/stable/c/e31546b0f34af21738c4ceac47d662c00ee6382f
patch
-
git.kernel.org
/stable/c/66b317a2fc45b2ef66527ee3f8fa08fb5beab88d
patch
-
git.kernel.org
/stable/c/833775656d447c545133a744a0ed1e189ce61430
patch
-
git.kernel.org
/stable/c/5a172344bfdabb46458e03708735d7b1a918c468
patch
-
git.kernel.org
/stable/c/e03ee2fe873eb68c1f9ba5112fee70303ebf9dfb
patch
-
lists.debian.org
/debian-lts-announce/2024/06/msg00017.html
mailing-list
Sources
- CVE List CVE-2024-26727
- NVD CVE-2024-26727
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.