Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2024-57806— btrfs: fix transaction atomicity bug when enabling simple quotas

Quick assessment

Affected
Linux Linux
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于Btrfs文件系统在启用简单配额时,未在提交事务前设置squota不兼容位,可能导致断言失败。

AI Predicted 5.5 Difficulty: Moderate EPSS 0.22% · P11

Possible ATT&CK Techniques 1 AI

T1068 · Exploitation for Privilege Escalation

Affected Version Matrix 6

VendorProduct Version RangeStatus
Linux Linux 182940f4f4dbd932776414744c8de64333957725< b87c9b9ba05ba6e8e2ee9ecd29a8c930b35648ed affected
182940f4f4dbd932776414744c8de64333957725< f2363e6fcc7938c5f0f6ac066fad0dd247598b51 affected
6.7 affected
< 6.7 unaffected
6.12.8≤ 6.12.* unaffected
6.13≤ * unaffected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2024-57806

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
btrfs: fix transaction atomicity bug when enabling simple quotas
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: btrfs: fix transaction atomicity bug when enabling simple quotas Set squota incompat bit before committing the transaction that enables the feature. With the config CONFIG_BTRFS_ASSERT enabled, an assertion failure occurs regarding the simple quota feature. [5.596534] assertion failed: btrfs_fs_incompat(fs_info, SIMPLE_QUOTA), in fs/btrfs/qgroup.c:365 [5.597098] ------------[ cut here ]------------ [5.597371] kernel BUG at fs/btrfs/qgroup.c:365! [5.597946] CPU: 1 UID: 0 PID: 268 Comm: mount Not tainted 6.13.0-rc2-00031-gf92f4749861b #146 [5.598450] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 [5.599008] RIP: 0010:btrfs_read_qgroup_config+0x74d/0x7a0 [5.604303] <TASK> [5.605230] ? btrfs_read_qgroup_config+0x74d/0x7a0 [5.605538] ? exc_invalid_op+0x56/0x70 [5.605775] ? btrfs_read_qgroup_config+0x74d/0x7a0 [5.606066] ? asm_exc_invalid_op+0x1f/0x30 [5.606441] ? btrfs_read_qgroup_config+0x74d/0x7a0 [5.606741] ? btrfs_read_qgroup_config+0x74d/0x7a0 [5.607038] ? try_to_wake_up+0x317/0x760 [5.607286] open_ctree+0xd9c/0x1710 [5.607509] btrfs_get_tree+0x58a/0x7e0 [5.608002] vfs_get_tree+0x2e/0x100 [5.608224] fc_mount+0x16/0x60 [5.608420] btrfs_get_tree+0x2f8/0x7e0 [5.608897] vfs_get_tree+0x2e/0x100 [5.609121] path_mount+0x4c8/0xbc0 [5.609538] __x64_sys_mount+0x10d/0x150 The issue can be easily reproduced using the following reproducer: root@q:linux# cat repro.sh set -e mkfs.btrfs -q -f /dev/sdb mount /dev/sdb /mnt/btrfs btrfs quota enable -s /mnt/btrfs umount /mnt/btrfs mount /dev/sdb /mnt/btrfs The issue is that when enabling quotas, at btrfs_quota_enable(), we set BTRFS_QGROUP_STATUS_FLAG_SIMPLE_MODE at fs_info->qgroup_flags and persist it in the quota root in the item with the key BTRFS_QGROUP_STATUS_KEY, but we only set the incompat bit BTRFS_FEATURE_INCOMPAT_SIMPLE_QUOTA after we commit the transaction used to enable simple quotas. This means that if after that transaction commit we unmount the filesystem without starting and committing any other transaction, or we have a power failure, the next time we mount the filesystem we will find the flag BTRFS_QGROUP_STATUS_FLAG_SIMPLE_MODE set in the item with the key BTRFS_QGROUP_STATUS_KEY but we will not find the incompat bit BTRFS_FEATURE_INCOMPAT_SIMPLE_QUOTA set in the superblock, triggering an assertion failure at: btrfs_read_qgroup_config() -> qgroup_read_enable_gen() To fix this issue, set the BTRFS_FEATURE_INCOMPAT_SIMPLE_QUOTA flag immediately after setting the BTRFS_QGROUP_STATUS_FLAG_SIMPLE_MODE. This ensures that both flags are flushed to disk within the same transaction.
Source: CVE Program / CVE List V5
CVSS Information
N/A
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于Btrfs文件系统在启用简单配额时,未在提交事务前设置squota不兼容位,可能导致断言失败。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
Linux Linux 182940f4f4dbd932776414744c8de64333957725 ~ b87c9b9ba05ba6e8e2ee9ecd29a8c930b35648ed -
Linux Linux 6.7 -

II. Public POCs for CVE-2024-57806

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2024-57806

请登录查看更多情报信息。

Patches & Fixes for CVE-2024-57806 (2)

Same Patch Batch · Linux · 2025-01-11 · 67 CVEs total

CVE-2024-47408 9.8 CRITICAL net/smc: check smcd_v2_ext_offset when receiving proposal msg
CVE-2024-49568 9.8 CRITICAL net/smc: check v2_ext_offset/eid_cnt/ism_gid_cnt when receiving proposal msg
CVE-2024-57843 9.8 CRITICAL virtio-net: fix overflow inside virtnet_rq_alloc
CVE-2024-57793 9.3 CRITICAL virt: tdx-guest: Just leak decrypted memory on unrecoverable errors
CVE-2024-49571 9.1 CRITICAL net/smc: check iparea_offset and ipv6_prefixes_cnt when receiving proposal msg
CVE-2024-55639 8.4 HIGH net: renesas: rswitch: avoid use-after-put for a device tree node
CVE-2024-41149 7.8 HIGH block: avoid to reuse `hctx` not removed from cpuhp callback list
CVE-2024-57849 7.8 HIGH s390/cpum_sf: Handle CPU hotplug remove during sampling
CVE-2024-57850 7.8 HIGH jffs2: Prevent rtime decompress memory corruption
CVE-2024-52319 7.8 HIGH mm: use aligned address in clear_gigantic_page()
CVE-2024-57875 7.8 HIGH block: RCU protect disk->conv_zones_bitmap
CVE-2024-51729 7.8 HIGH mm: use aligned address in copy_user_gigantic_page()
CVE-2024-47794 7.8 HIGH bpf: Prevent tailcall infinite loop caused by freplace
CVE-2024-49569 7.5 HIGH nvme-rdma: unquiesce admin_q before destroy it
CVE-2024-57791 7.5 HIGH net/smc: check return value of sock_recvmsg when draining clc data
CVE-2024-56788 7.5 HIGH net: ethernet: oa_tc6: fix tx skb race condition between reference pointers
CVE-2024-57792 7.3 HIGH power: supply: gpio-charger: Fix set charge current limits
CVE-2024-57804 7.3 HIGH scsi: mpi3mr: Fix corrupt config pages PHY state is switched in sysfs
CVE-2024-56368 7.1 HIGH ring-buffer: Fix overflow in __rb_map_vma
CVE-2024-49573 7.0 HIGH sched/fair: Fix NEXT_BUDDY

Showing top 20 of 67 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2024-57806

No comments yet


Leave a comment