目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2024-38306— Linux kernel安全漏洞

一分钟漏洞结论

影响对象
Linux Linux
利用判断
尚无明确在野利用证据,仍需结合暴露面评估
建议动作
优先检查厂商安全公告和参考链接中的修复版本;无法立即升级时,限制受影响服务暴露并加强监测。

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞。攻击者利用该漏洞导致内核崩溃。

CVSS 7.8 · High EPSS 0.15% · P3

影响版本矩阵 6

厂商产品 版本范围状态
Linux Linux 09e6cef19c9fc0e10547135476865b5272aa0406< 952f048eb901881a7cc6f7c1368b53cd386ead7b affected
09e6cef19c9fc0e10547135476865b5272aa0406< f3a5367c679d31473d3fbb391675055b4792c309 affected
6.8 affected
< 6.8 unaffected
6.9.5≤ 6.9.* unaffected
6.10≤ * unaffected
获取后续新漏洞提醒 登录后订阅

一、 漏洞 CVE-2024-38306 基础信息

漏洞信息

对漏洞内容有疑问?看看神龙的深度分析是否有帮助!
查看神龙十问 ↗

尽管我们使用了先进的大模型技术,但其输出仍可能包含不准确或过时的信息。神龙努力确保数据的准确性,但请您根据实际情况进行核实和判断。

Vulnerability Title
btrfs: protect folio::private when attaching extent buffer folios
来源: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: btrfs: protect folio::private when attaching extent buffer folios [BUG] Since v6.8 there are rare kernel crashes reported by various people, the common factor is bad page status error messages like this: BUG: Bad page state in process kswapd0 pfn:d6e840 page: refcount:0 mapcount:0 mapping:000000007512f4f2 index:0x2796c2c7c pfn:0xd6e840 aops:btree_aops ino:1 flags: 0x17ffffe0000008(uptodate|node=0|zone=2|lastcpupid=0x3fffff) page_type: 0xffffffff() raw: 0017ffffe0000008 dead000000000100 dead000000000122 ffff88826d0be4c0 raw: 00000002796c2c7c 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: non-NULL mapping [CAUSE] Commit 09e6cef19c9f ("btrfs: refactor alloc_extent_buffer() to allocate-then-attach method") changes the sequence when allocating a new extent buffer. Previously we always called grab_extent_buffer() under mapping->i_private_lock, to ensure the safety on modification on folio::private (which is a pointer to extent buffer for regular sectorsize). This can lead to the following race: Thread A is trying to allocate an extent buffer at bytenr X, with 4 4K pages, meanwhile thread B is trying to release the page at X + 4K (the second page of the extent buffer at X). Thread A | Thread B -----------------------------------+------------------------------------- | btree_release_folio() | | This is for the page at X + 4K, | | Not page X. | | alloc_extent_buffer() | |- release_extent_buffer() |- filemap_add_folio() for the | | |- atomic_dec_and_test(eb->refs) | page at bytenr X (the first | | | | page). | | | | Which returned -EEXIST. | | | | | | | |- filemap_lock_folio() | | | | Returned the first page locked. | | | | | | | |- grab_extent_buffer() | | | | |- atomic_inc_not_zero() | | | | | Returned false | | | | |- folio_detach_private() | | |- folio_detach_private() for X | |- folio_test_private() | | |- folio_test_private() | Returned true | | | Returned true |- folio_put() | |- folio_put() Now there are two puts on the same folio at folio X, leading to refcount underflow of the folio X, and eventually causing the BUG_ON() on the page->mapping. The condition is not that easy to hit: - The release must be triggered for the middle page of an eb If the release is on the same first page of an eb, page lock would kick in and prevent the race. - folio_detach_private() has a very small race window It's only between folio_test_private() and folio_clear_private(). That's exactly when mapping->i_private_lock is used to prevent such race, and commit 09e6cef19c9f ("btrfs: refactor alloc_extent_buffer() to allocate-then-attach method") screwed that up. At that time, I thought the page lock would kick in as filemap_release_folio() also requires the page to be locked, but forgot the filemap_release_folio() only locks one page, not all pages of an extent buffer. [FIX] Move all the code requiring i_private_lock into attach_eb_folio_to_filemap(), so that everything is done with proper lock protection. Furthermore to prevent future problems, add an extra lockdep_assert_locked() to ensure we're holding the proper lock. To reproducer that is able to hit the race (takes a few minutes with instrumented code inserting delays to alloc_extent_buffer()): #!/bin/sh drop_caches () { while(true); do echo 3 > /proc/sys/vm/drop_caches echo 1 > /proc/sys/vm/compact_memory done } run_tar () { while(true); do for x in `seq 1 80` ; do tar cf /dev/zero /mnt > /dev/null & done wait done } mkfs.btrfs -f -d single -m single ---truncated---
来源: 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
来源: CVE Program / CVE List V5
Vulnerability Type
N/A
来源: CVE Program / CVE List V5
Vulnerability Title
Linux kernel安全漏洞
来源: 中国国家信息安全漏洞库 CNNVD
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞。攻击者利用该漏洞导致内核崩溃。
来源: 中国国家信息安全漏洞库 CNNVD
CVSS Information
N/A
来源: 中国国家信息安全漏洞库 CNNVD
Vulnerability Type
N/A
来源: 中国国家信息安全漏洞库 CNNVD

受影响产品

厂商 产品 影响版本 CPE 订阅
Linux Linux 09e6cef19c9fc0e10547135476865b5272aa0406 ~ 952f048eb901881a7cc6f7c1368b53cd386ead7b -
Linux Linux 6.8 -

二、漏洞 CVE-2024-38306 的公开POC

# POC 描述 源链接 神龙链接
AI 生成 POC 高级

未找到公开 POC。

登录以生成 AI POC

三、漏洞 CVE-2024-38306 的情报信息

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

CVE-2024-38306 其他参考 (1)

同批安全公告 · Linux · 2024-06-25 · 共 24 条

CVE-2024-39293 9.8 CRITICAL Linux kernel 安全漏洞
CVE-2024-39471 7.8 HIGH Linux kernel 安全漏洞
CVE-2024-37354 7.8 HIGH Linux kernel安全漏洞
CVE-2024-37078 7.8 HIGH Linux kernel 安全漏洞
CVE-2024-38385 7.8 HIGH Linux kernel 安全漏洞
CVE-2024-39467 7.8 HIGH Linux kernel 安全漏洞
CVE-2024-39463 7.8 HIGH Linux kernel 安全漏洞
CVE-2024-39468 7.5 HIGH Linux kernel 安全漏洞
CVE-2024-39469 7.1 HIGH Linux kernel 安全漏洞
CVE-2024-39371 Linux kernel安全漏洞
CVE-2024-39470 Linux kernel 安全漏洞
CVE-2024-39466 Linux kernel 安全漏洞
CVE-2024-39464 Linux kernel 安全漏洞
CVE-2024-39465 Linux kernel 安全漏洞
CVE-2024-39462 Linux kernel 安全漏洞
CVE-2024-39461 Linux kernel安全漏洞
CVE-2021-4440 Linux kernel安全漏洞
CVE-2024-39301 Linux kernel 安全漏洞
CVE-2024-39298 Linux kernel安全漏洞
CVE-2024-39296 Linux kernel安全漏洞

显示前 20 条,共 24 条。 查看全部 &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2024-38306

暂无评论


发表评论