{"id":"DEBIAN-CVE-2024-26727","details":"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   \u003cTASK\u003e   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.","modified":"2026-09-15T09:03:05.183226108Z","published":"2024-04-03T15:15:54.367Z","upstream":["CVE-2024-26727"],"references":[{"type":"ADVISORY","url":"https://security-tracker.debian.org/tracker/CVE-2024-26727"}],"affected":[{"package":{"name":"linux","ecosystem":"Debian:12","purl":"pkg:deb/debian/linux?arch=source&distro=bookworm"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.1.82-1"}]}],"versions":["6.1.27-1","6.1.37-1","6.1.38-1","6.1.38-2","6.1.38-2~bpo11+1","6.1.38-3","6.1.38-4","6.1.38-4~bpo11+1","6.1.52-1","6.1.55-1","6.1.55-1~bpo11+1","6.1.64-1","6.1.66-1","6.1.67-1","6.1.69-1","6.1.69-1~bpo11+1","6.1.76-1","6.1.76-1~bpo11+1"],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/osv-test-debian-osv/debian-cve-osv/DEBIAN-CVE-2024-26727.json"}},{"package":{"name":"linux","ecosystem":"Debian:13","purl":"pkg:deb/debian/linux?arch=source&distro=trixie"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.7.7-1"}]}],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/osv-test-debian-osv/debian-cve-osv/DEBIAN-CVE-2024-26727.json"}},{"package":{"name":"linux","ecosystem":"Debian:14","purl":"pkg:deb/debian/linux?arch=source&distro=forky"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.7.7-1"}]}],"ecosystem_specific":{"urgency":"not yet assigned"},"database_specific":{"source":"https://storage.googleapis.com/osv-test-debian-osv/debian-cve-osv/DEBIAN-CVE-2024-26727.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"}]}