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

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2024-35949— btrfs: make sure that WRITTEN is set on all metadata blocks

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存在安全漏洞,该漏洞源于指针可以访问缓冲区之外的内存。

CVSS 7.8 · High EPSS 0.24% · P15

Affected Version Matrix 8

VendorProduct Version RangeStatus
Linux Linux 85d8a826c7cde17f9cca9c4debecb4538bdb6573< 9dff3e36ea89e8003516841c27c45af562b6ef44 affected
85d8a826c7cde17f9cca9c4debecb4538bdb6573< ef3ba8ce8cf7075b716aa4afcefc3034215878ee affected
85d8a826c7cde17f9cca9c4debecb4538bdb6573< e03418abde871314e1a3a550f4c8afb7b89cb273 affected
6.5 affected
< 6.5 unaffected
6.6.85≤ 6.6.* unaffected
6.8.10≤ 6.8.* unaffected
6.9≤ * unaffected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2024-35949

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: make sure that WRITTEN is set on all metadata blocks
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: btrfs: make sure that WRITTEN is set on all metadata blocks We previously would call btrfs_check_leaf() if we had the check integrity code enabled, which meant that we could only run the extended leaf checks if we had WRITTEN set on the header flags. This leaves a gap in our checking, because we could end up with corruption on disk where WRITTEN isn't set on the leaf, and then the extended leaf checks don't get run which we rely on to validate all of the item pointers to make sure we don't access memory outside of the extent buffer. However, since 732fab95abe2 ("btrfs: check-integrity: remove CONFIG_BTRFS_FS_CHECK_INTEGRITY option") we no longer call btrfs_check_leaf() from btrfs_mark_buffer_dirty(), which means we only ever call it on blocks that are being written out, and thus have WRITTEN set, or that are being read in, which should have WRITTEN set. Add checks to make sure we have WRITTEN set appropriately, and then make sure __btrfs_check_leaf() always does the item checking. This will protect us from file systems that have been corrupted and no longer have WRITTEN set on some of the blocks. This was hit on a crafted image tweaking the WRITTEN bit and reported by KASAN as out-of-bound access in the eb accessors. The example is a dir item at the end of an eb. [2.042] BTRFS warning (device loop1): bad eb member start: ptr 0x3fff start 30572544 member offset 16410 size 2 [2.040] general protection fault, probably for non-canonical address 0xe0009d1000000003: 0000 [#1] PREEMPT SMP KASAN NOPTI [2.537] KASAN: maybe wild-memory-access in range [0x0005088000000018-0x000508800000001f] [2.729] CPU: 0 PID: 2587 Comm: mount Not tainted 6.8.2 #1 [2.729] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 [2.621] RIP: 0010:btrfs_get_16+0x34b/0x6d0 [2.621] RSP: 0018:ffff88810871fab8 EFLAGS: 00000206 [2.621] RAX: 0000a11000000003 RBX: ffff888104ff8720 RCX: ffff88811b2288c0 [2.621] RDX: dffffc0000000000 RSI: ffffffff81dd8aca RDI: ffff88810871f748 [2.621] RBP: 000000000000401a R08: 0000000000000001 R09: ffffed10210e3ee9 [2.621] R10: ffff88810871f74f R11: 205d323430333737 R12: 000000000000001a [2.621] R13: 000508800000001a R14: 1ffff110210e3f5d R15: ffffffff850011e8 [2.621] FS: 00007f56ea275840(0000) GS:ffff88811b200000(0000) knlGS:0000000000000000 [2.621] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [2.621] CR2: 00007febd13b75c0 CR3: 000000010bb50000 CR4: 00000000000006f0 [2.621] Call Trace: [2.621] <TASK> [2.621] ? show_regs+0x74/0x80 [2.621] ? die_addr+0x46/0xc0 [2.621] ? exc_general_protection+0x161/0x2a0 [2.621] ? asm_exc_general_protection+0x26/0x30 [2.621] ? btrfs_get_16+0x33a/0x6d0 [2.621] ? btrfs_get_16+0x34b/0x6d0 [2.621] ? btrfs_get_16+0x33a/0x6d0 [2.621] ? __pfx_btrfs_get_16+0x10/0x10 [2.621] ? __pfx_mutex_unlock+0x10/0x10 [2.621] btrfs_match_dir_item_name+0x101/0x1a0 [2.621] btrfs_lookup_dir_item+0x1f3/0x280 [2.621] ? __pfx_btrfs_lookup_dir_item+0x10/0x10 [2.621] btrfs_get_tree+0xd25/0x1910 [ copy more details from report ]
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
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存在安全漏洞,该漏洞源于指针可以访问缓冲区之外的内存。
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 85d8a826c7cde17f9cca9c4debecb4538bdb6573 ~ 9dff3e36ea89e8003516841c27c45af562b6ef44 -
Linux Linux 6.5 -

II. Public POCs for CVE-2024-35949

# 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-35949

登录查看更多情报信息。

Mailing List Discussions for CVE-2024-35949 (1)

Other References for CVE-2024-35949 (2)

Same Patch Batch · Linux · 2024-05-20 · 62 CVEs total

CVE-2024-35969 8.8 HIGH ipv6: fix race condition between ipv6_get_ifaddr and ipv6_del_addr
CVE-2024-35980 8.4 HIGH arm64: tlb: Fix TLBI RANGE operand
CVE-2024-35987 8.4 HIGH riscv: Fix loading 64-bit NOMMU kernels past the start of RAM
CVE-2024-35993 7.8 HIGH mm: turn folio_test_hugetlb into a PageType
CVE-2024-36001 7.8 HIGH netfs: Fix the pre-flush when appending to a file in writethrough mode
CVE-2024-35954 7.8 HIGH scsi: sg: Avoid sg device teardown race
CVE-2024-35951 7.8 HIGH drm/panfrost: Fix the error path in panfrost_mmu_map_fault_addr()
CVE-2024-36007 7.8 HIGH mlxsw: spectrum_acl_tcam: Fix warning during rehash
CVE-2024-35950 7.8 HIGH drm/client: Fully protect modes[] with dev->mode_config.mutex
CVE-2024-35948 7.8 HIGH bcachefs: Check for journal entries overruning end of sb clean section
CVE-2024-35994 7.8 HIGH firmware: qcom: uefisecapp: Fix memory related IO errors and crashes
CVE-2024-35958 7.8 HIGH net: ena: Fix incorrect descriptor free behavior
CVE-2024-35990 7.8 HIGH dma: xilinx_dpdma: Fix locking
CVE-2024-35968 7.8 HIGH pds_core: Fix pdsc_check_pci_health function to use work thread
CVE-2024-36009 7.8 HIGH ax25: Fix netdev refcount issue
CVE-2024-35979 7.8 HIGH raid1: fix use-after-free for original bio in raid1_write_request()
CVE-2024-35999 7.5 HIGH smb3: missing lock when picking channel
CVE-2024-35998 7.5 HIGH smb3: fix lock ordering potential deadlock in cifs_sync_mid_result
CVE-2024-35971 7.5 HIGH net: ks8851: Handle softirqs at the end of IRQ thread to fix hang
CVE-2024-35962 7.1 HIGH netfilter: complete validation of user input

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

IV. Related Vulnerabilities

V. Comments for CVE-2024-35949

No comments yet


Leave a comment