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

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2024-26726— btrfs: don't drop extent_map for free space inode on write error

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存在安全漏洞,该漏洞源于写入错误。

AI Predicted 5.5 Difficulty: Moderate EPSS 0.26% · P16

Possible ATT&CK Techniques 1 AI

T1499 · Endpoint Denial of Service

Affected Version Matrix 12

VendorProduct Version RangeStatus
Linux Linux 77cef2ec5484564eca6bd12a2b4a1e88fd766fbc< 143842584c1237ebc248b2547c29d16bbe400a92 affected
77cef2ec5484564eca6bd12a2b4a1e88fd766fbc< 02f2b95b00bf57d20320ee168b30fb7f3db8e555 affected
77cef2ec5484564eca6bd12a2b4a1e88fd766fbc< 7bddf18f474f166c19f91b2baf67bf7c5eda03f7 affected
77cef2ec5484564eca6bd12a2b4a1e88fd766fbc< a4b7741c8302e28073bfc6dd1c2e73598e5e535e affected
77cef2ec5484564eca6bd12a2b4a1e88fd766fbc< 5571e41ec6e56e35f34ae9f5b3a335ef510e0ade affected
3.12 affected
< 3.12 unaffected
5.15.187≤ 5.15.* unaffected
… +4 more rows
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2024-26726

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: don't drop extent_map for free space inode on write error
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: btrfs: don't drop extent_map for free space inode on write error While running the CI for an unrelated change I hit the following panic with generic/648 on btrfs_holes_spacecache. assertion failed: block_start != EXTENT_MAP_HOLE, in fs/btrfs/extent_io.c:1385 ------------[ cut here ]------------ kernel BUG at fs/btrfs/extent_io.c:1385! invalid opcode: 0000 [#1] PREEMPT SMP NOPTI CPU: 1 PID: 2695096 Comm: fsstress Kdump: loaded Tainted: G W 6.8.0-rc2+ #1 RIP: 0010:__extent_writepage_io.constprop.0+0x4c1/0x5c0 Call Trace: <TASK> extent_write_cache_pages+0x2ac/0x8f0 extent_writepages+0x87/0x110 do_writepages+0xd5/0x1f0 filemap_fdatawrite_wbc+0x63/0x90 __filemap_fdatawrite_range+0x5c/0x80 btrfs_fdatawrite_range+0x1f/0x50 btrfs_write_out_cache+0x507/0x560 btrfs_write_dirty_block_groups+0x32a/0x420 commit_cowonly_roots+0x21b/0x290 btrfs_commit_transaction+0x813/0x1360 btrfs_sync_file+0x51a/0x640 __x64_sys_fdatasync+0x52/0x90 do_syscall_64+0x9c/0x190 entry_SYSCALL_64_after_hwframe+0x6e/0x76 This happens because we fail to write out the free space cache in one instance, come back around and attempt to write it again. However on the second pass through we go to call btrfs_get_extent() on the inode to get the extent mapping. Because this is a new block group, and with the free space inode we always search the commit root to avoid deadlocking with the tree, we find nothing and return a EXTENT_MAP_HOLE for the requested range. This happens because the first time we try to write the space cache out we hit an error, and on an error we drop the extent mapping. This is normal for normal files, but the free space cache inode is special. We always expect the extent map to be correct. Thus the second time through we end up with a bogus extent map. Since we're deprecating this feature, the most straightforward way to fix this is to simply skip dropping the extent map range for this failed range. I shortened the test by using error injection to stress the area to make it easier to reproduce. With this patch in place we no longer panic with my error injection test.
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存在安全漏洞,该漏洞源于写入错误。
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 77cef2ec5484564eca6bd12a2b4a1e88fd766fbc ~ 143842584c1237ebc248b2547c29d16bbe400a92 -
Linux Linux 3.12 -

II. Public POCs for CVE-2024-26726

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

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

Other References for CVE-2024-26726 (4)

Same Patch Batch · Linux · 2024-04-03 · 94 CVEs total

CVE-2024-26760 9.8 CRITICAL scsi: target: pscsi: Fix bio_put() for error case
CVE-2024-26779 8.8 HIGH wifi: mac80211: fix race condition on enabling fast-xmit
CVE-2024-26689 8.8 HIGH ceph: prevent use-after-free in encode_cap_msg()
CVE-2024-26692 8.3 HIGH smb: Fix regression in writes when non-standard maximum write size negotiated
CVE-2024-26736 8.1 HIGH afs: Increase buffer size in afs_update_volume_status()
CVE-2024-26718 7.8 HIGH dm-crypt, dm-verity: disable tasklets
CVE-2024-26728 7.8 HIGH drm/amd/display: fix null-pointer dereference on edid reading
CVE-2023-52637 7.8 HIGH can: j1939: Fix UAF in j1939_sk_match_filter during setsockopt(SO_J1939_FILTER)
CVE-2024-26704 7.8 HIGH ext4: fix double-free of blocks due to wrong extents moved_len
CVE-2024-26699 7.8 HIGH drm/amd/display: Fix array-index-out-of-bounds in dcn35_clkmgr
CVE-2024-26712 7.8 HIGH powerpc/kasan: Fix addr error caused by page alignment
CVE-2024-26706 7.8 HIGH parisc: Fix random data corruption from exception handler
CVE-2024-26697 7.8 HIGH nilfs2: fix data corruption in dsync block recovery for small block sizes
CVE-2024-26737 7.8 HIGH bpf: Fix racing between bpf_timer_cancel_and_free and bpf_timer_cancel
CVE-2024-26748 7.8 HIGH usb: cdns3: fix memory double free when handle zero packet
CVE-2024-26773 7.8 HIGH ext4: avoid allocating blocks from corrupted group in ext4_mb_try_best_found()
CVE-2024-26772 7.8 HIGH ext4: avoid allocating blocks from corrupted group in ext4_mb_find_by_goal()
CVE-2024-26766 7.8 HIGH IB/hfi1: Fix sdma.h tx->num_descs off-by-one error
CVE-2024-26739 7.8 HIGH net/sched: act_mirred: don't override retval if we already lost the skb
CVE-2024-26759 7.8 HIGH mm/swap: fix race when skipping swapcache

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

IV. Related Vulnerabilities

V. Comments for CVE-2024-26726

No comments yet


Leave a comment