cveboard RSS feed

CVE-2024-26727

CVE.org · Published

Historical CVEsJSONAI instructions

Record status
Published
Identifier year (not publication year)
2024
Source publication
Source updated
Imported by cveboard
Source snapshot
cve_2026-10-24_midnight_baseline ·

Plain text

CNA source text (English)

btrfs: do not ASSERT() if the newly created subvolume already got read

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.

Scoped product and version facts

Fix information unknown; no fixed version is derived here. Missing information does not prove that no fix exists.

Exploitation unknown; this catalogue does not assess exploitation.

Linux

Vendor
Linux
Product
Linux
Platforms
Unknown
Default status
unaffected
Linux · Scoped product and version facts
Version (version)Status (status)Version scheme (versionType)Exclusive end (lessThan)Inclusive end (lessThanOrEqual)Status changes (at → status)
2dfb1e43f57dd3aeaa66f7cf05d068db2d4c8788affectedgit3f5d47eb163bceb1b9e613c9003bae5fefc0046fUnavailableNone listed
2dfb1e43f57dd3aeaa66f7cf05d068db2d4c8788affectedgite31546b0f34af21738c4ceac47d662c00ee6382fUnavailableNone listed
2dfb1e43f57dd3aeaa66f7cf05d068db2d4c8788affectedgit66b317a2fc45b2ef66527ee3f8fa08fb5beab88dUnavailableNone listed
2dfb1e43f57dd3aeaa66f7cf05d068db2d4c8788affectedgit833775656d447c545133a744a0ed1e189ce61430UnavailableNone listed
2dfb1e43f57dd3aeaa66f7cf05d068db2d4c8788affectedgit5a172344bfdabb46458e03708735d7b1a918c468UnavailableNone listed
2dfb1e43f57dd3aeaa66f7cf05d068db2d4c8788affectedgite03ee2fe873eb68c1f9ba5112fee70303ebf9dfbUnavailableNone listed
917d608fe375041eb7f29befa6a6d7fd3cf32ddeaffectedgitUnavailableUnavailableNone listed
5.8.3affectedsemver5.9UnavailableNone listed

Linux

Vendor
Linux
Product
Linux
Platforms
Unknown
Default status
affected
Linux · Scoped product and version facts
Version (version)Status (status)Version scheme (versionType)Exclusive end (lessThan)Inclusive end (lessThanOrEqual)Status changes (at → status)
5.9affectedUnavailableUnavailableUnavailableNone listed
0unaffectedsemver5.9UnavailableNone listed
5.10.210unaffectedsemverUnavailable5.10.*None listed
5.15.149unaffectedsemverUnavailable5.15.*None listed
6.1.79unaffectedsemverUnavailable6.1.*None listed
6.6.18unaffectedsemverUnavailable6.6.*None listed
6.7.6unaffectedsemverUnavailable6.7.*None listed
6.8unaffectedoriginal_commit_for_fixUnavailable*None listed