一、 漏洞 CVE-2024-26727 基础信息
漏洞标题
btrfs: 如果新创建的子卷已经被读取,不要执行ASSERT()
来源:AIGC 神龙大模型
漏洞描述信息
在Linux内核中,已解决以下漏洞: btrfs:如果新创建的子卷已读取,不要触发ASSERT() [BUG] 有一个由子卷创建期间触发的syzbot崩溃: 失败的断言:!anon_dev,在fs/btrfs/disk-io.c:1319 ---------------[ cut here ]--------------- 内核BUG在fs/btrfs/disk-io.c:1319! 无效指令: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] 在create_subvol()中,插入新创建的子卷的根项后,我们触发btrfs_get_new_fs_root()获取该子卷的btrfs_root。 这里的思路是,我们为子卷预分配了一个匿名设备号,因此可以将其分配给新子卷。 但实际上,没有什么能阻止诸如反向引用遍历之类的操作读取新子卷。 如果在调用btrfs_get_new_fs_root()之前发生这种情况,子卷将被读取,且已经分配了一个新的匿名设备号。 在这种情况下,我们将触发ASSERT(),因为我们确实期望没有人读取该子卷(该子卷尚未从文件系统中访问)。但反向引用遍历仍然可能触发对子卷的读取。 因此,我们的ASSERT()假设从一开始就不正确。 [FIX] 通过删除ASSERT()并释放@anon_dev,将其重置为0,然后继续来修复它。 如果子卷树被其他东西读取,它应该已经分配了一个新的匿名设备号,所以我们只需要释放预分配的那一个即可。
来源:AIGC 神龙大模型
CVSS信息
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
来源:AIGC 神龙大模型
漏洞类别
可达断言
来源:AIGC 神龙大模型
漏洞标题
btrfs: do not ASSERT() if the newly created subvolume already got read
来源:美国国家漏洞数据库 NVD
漏洞描述信息
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.
来源:美国国家漏洞数据库 NVD
CVSS信息
N/A
来源:美国国家漏洞数据库 NVD
漏洞类别
N/A
来源:美国国家漏洞数据库 NVD
漏洞标题
Linux kernel 安全漏洞
来源:中国国家信息安全漏洞库 CNNVD
漏洞描述信息
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于读取错误。
来源:中国国家信息安全漏洞库 CNNVD
CVSS信息
N/A
来源:中国国家信息安全漏洞库 CNNVD
漏洞类别
其他
来源:中国国家信息安全漏洞库 CNNVD
二、漏洞 CVE-2024-26727 的公开POC
# POC 描述 源链接 神龙链接
三、漏洞 CVE-2024-26727 的情报信息