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

目标: 1000 元 · 已筹: 1336

100%

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

一分钟漏洞结论

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

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于bpf模块中htab_unlock_bucket后未调用free_htab_elem。

AI 预测 4.3 利用难度: 中等 EPSS 0.22% · P12

影响版本矩阵 8

厂商产品 版本范围状态
Linux Linux f3f1c054c288bb6e503005e6d73611151ed20e91< 10e8a2dec9ff1b81de8e892b0850924038adbc6d affected
f3f1c054c288bb6e503005e6d73611151ed20e91< a50b4aa3007e63a590d501341f304676ebc74b3b affected
f3f1c054c288bb6e503005e6d73611151ed20e91< b9e9ed90b10c82a4e9d4d70a2890f06bfcdd3b78 affected
4.13 affected
< 4.13 unaffected
6.6.66≤ 6.6.* unaffected
6.12.5≤ 6.12.* unaffected
6.13≤ * unaffected
获取后续新漏洞提醒 登录后订阅

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

漏洞信息

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

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

Vulnerability Title
bpf: Call free_htab_elem() after htab_unlock_bucket()
来源: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: bpf: Call free_htab_elem() after htab_unlock_bucket() For htab of maps, when the map is removed from the htab, it may hold the last reference of the map. bpf_map_fd_put_ptr() will invoke bpf_map_free_id() to free the id of the removed map element. However, bpf_map_fd_put_ptr() is invoked while holding a bucket lock (raw_spin_lock_t), and bpf_map_free_id() attempts to acquire map_idr_lock (spinlock_t), triggering the following lockdep warning: ============================= [ BUG: Invalid wait context ] 6.11.0-rc4+ #49 Not tainted ----------------------------- test_maps/4881 is trying to lock: ffffffff84884578 (map_idr_lock){+...}-{3:3}, at: bpf_map_free_id.part.0+0x21/0x70 other info that might help us debug this: context-{5:5} 2 locks held by test_maps/4881: #0: ffffffff846caf60 (rcu_read_lock){....}-{1:3}, at: bpf_fd_htab_map_update_elem+0xf9/0x270 #1: ffff888149ced148 (&htab->lockdep_key#2){....}-{2:2}, at: htab_map_update_elem+0x178/0xa80 stack backtrace: CPU: 0 UID: 0 PID: 4881 Comm: test_maps Not tainted 6.11.0-rc4+ #49 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), ... Call Trace: <TASK> dump_stack_lvl+0x6e/0xb0 dump_stack+0x10/0x20 __lock_acquire+0x73e/0x36c0 lock_acquire+0x182/0x450 _raw_spin_lock_irqsave+0x43/0x70 bpf_map_free_id.part.0+0x21/0x70 bpf_map_put+0xcf/0x110 bpf_map_fd_put_ptr+0x9a/0xb0 free_htab_elem+0x69/0xe0 htab_map_update_elem+0x50f/0xa80 bpf_fd_htab_map_update_elem+0x131/0x270 htab_map_update_elem+0x50f/0xa80 bpf_fd_htab_map_update_elem+0x131/0x270 bpf_map_update_value+0x266/0x380 __sys_bpf+0x21bb/0x36b0 __x64_sys_bpf+0x45/0x60 x64_sys_call+0x1b2a/0x20d0 do_syscall_64+0x5d/0x100 entry_SYSCALL_64_after_hwframe+0x76/0x7e One way to fix the lockdep warning is using raw_spinlock_t for map_idr_lock as well. However, bpf_map_alloc_id() invokes idr_alloc_cyclic() after acquiring map_idr_lock, it will trigger a similar lockdep warning because the slab's lock (s->cpu_slab->lock) is still a spinlock. Instead of changing map_idr_lock's type, fix the issue by invoking htab_put_fd_value() after htab_unlock_bucket(). However, only deferring the invocation of htab_put_fd_value() is not enough, because the old map pointers in htab of maps can not be saved during batched deletion. Therefore, also defer the invocation of free_htab_elem(), so these to-be-freed elements could be linked together similar to lru map. There are four callers for ->map_fd_put_ptr: (1) alloc_htab_elem() (through htab_put_fd_value()) It invokes ->map_fd_put_ptr() under a raw_spinlock_t. The invocation of htab_put_fd_value() can not simply move after htab_unlock_bucket(), because the old element has already been stashed in htab->extra_elems. It may be reused immediately after htab_unlock_bucket() and the invocation of htab_put_fd_value() after htab_unlock_bucket() may release the newly-added element incorrectly. Therefore, saving the map pointer of the old element for htab of maps before unlocking the bucket and releasing the map_ptr after unlock. Beside the map pointer in the old element, should do the same thing for the special fields in the old element as well. (2) free_htab_elem() (through htab_put_fd_value()) Its caller includes __htab_map_lookup_and_delete_elem(), htab_map_delete_elem() and __htab_map_lookup_and_delete_batch(). For htab_map_delete_elem(), simply invoke free_htab_elem() after htab_unlock_bucket(). For __htab_map_lookup_and_delete_batch(), just like lru map, linking the to-be-freed element into node_to_free list and invoking free_htab_elem() for these element after unlock. It is safe to reuse batch_flink as the link for node_to_free, because these elements have been removed from the hash llist. Because htab of maps doesn't support lookup_and_delete operation, __htab_map_lookup_and_delete_elem() doesn't have the problem, so kept it as ---truncated---
来源: CVE Program / CVE List V5
CVSS Information
N/A
来源: 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存在安全漏洞,该漏洞源于bpf模块中htab_unlock_bucket后未调用free_htab_elem。
来源: 中国国家信息安全漏洞库 CNNVD
CVSS Information
N/A
来源: 中国国家信息安全漏洞库 CNNVD
Vulnerability Type
N/A
来源: 中国国家信息安全漏洞库 CNNVD

受影响产品

厂商 产品 影响版本 CPE 订阅
Linux Linux f3f1c054c288bb6e503005e6d73611151ed20e91 ~ 10e8a2dec9ff1b81de8e892b0850924038adbc6d -
Linux Linux 4.13 -

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

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

未找到公开 POC。

登录以生成 AI POC

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

登录查看更多情报信息。

CVE-2024-56592 补丁与修复 (3)

同批安全公告 · Linux · 2024-12-27 · 共 221 条

CVE-2024-56640 9.8 CRITICAL Linux kernel 安全漏洞
CVE-2024-56645 9.8 CRITICAL Linux kernel 安全漏洞
CVE-2024-53169 9.8 CRITICAL Linux kernel 安全漏洞
CVE-2024-53209 9.8 CRITICAL Linux kernel 安全漏洞
CVE-2024-53206 9.8 CRITICAL Linux kernel 安全漏洞
CVE-2024-56656 9.8 CRITICAL Linux kernel 安全漏洞
CVE-2024-53186 9.8 CRITICAL Linux kernel 安全漏洞
CVE-2024-53176 9.8 CRITICAL Linux kernel 安全漏洞
CVE-2024-53177 9.8 CRITICAL Linux kernel 安全漏洞
CVE-2024-53179 9.8 CRITICAL Linux kernel 安全漏洞
CVE-2024-56591 8.8 HIGH Linux kernel 安全漏洞
CVE-2024-56626 8.8 HIGH Linux kernel 安全漏洞
CVE-2024-53237 8.8 HIGH Linux kernel 安全漏洞
CVE-2024-53224 8.8 HIGH Linux kernel 安全漏洞
CVE-2024-56651 8.8 HIGH Linux kernel 安全漏洞
CVE-2024-56653 8.8 HIGH Linux kernel 安全漏洞
CVE-2024-56669 8.8 HIGH Linux kernel 安全漏洞
CVE-2024-56627 8.1 HIGH Linux kernel 安全漏洞
CVE-2024-53232 7.8 HIGH Linux kernel 安全漏洞
CVE-2024-56635 7.8 HIGH Linux kernel 安全漏洞

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

IV. Related Vulnerabilities

V. Comments for CVE-2024-56592

暂无评论


发表评论