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

目标: 1000 元 · 已筹: 1359 元

100%

CVE-2022-49236— Linux kernel 安全漏洞

一分钟漏洞结论

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

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于btf_try_get_module和load_module之间的竞争条件导致释放后重用。

AI 预测 7.8 利用难度: 中等 EPSS 0.27% · P19

影响版本矩阵 10

厂商产品 版本范围状态
Linux Linux 541c3bad8dc51b253ba8686d0cd7628e6b9b5f4c< 51b82141fffa454abf937a8ff0b8af89e4fd0c8f affected
541c3bad8dc51b253ba8686d0cd7628e6b9b5f4c< d7fccf264b1a785525b366a5b7f8113c756187ad affected
541c3bad8dc51b253ba8686d0cd7628e6b9b5f4c< 0481baa2318cb1ab13277715da6cdbb657807b3f affected
541c3bad8dc51b253ba8686d0cd7628e6b9b5f4c< 18688de203b47e5d8d9d0953385bf30b5949324f affected
5.12 affected
< 5.12 unaffected
5.15.33≤ 5.15.* unaffected
5.16.19≤ 5.16.* unaffected
… +2 条更多
获取后续新漏洞提醒 登录后订阅

一、 漏洞 CVE-2022-49236 基础信息

漏洞信息

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

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

Vulnerability Title
bpf: Fix UAF due to race between btf_try_get_module and load_module
来源: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: bpf: Fix UAF due to race between btf_try_get_module and load_module While working on code to populate kfunc BTF ID sets for module BTF from its initcall, I noticed that by the time the initcall is invoked, the module BTF can already be seen by userspace (and the BPF verifier). The existing btf_try_get_module calls try_module_get which only fails if mod->state == MODULE_STATE_GOING, i.e. it can increment module reference when module initcall is happening in parallel. Currently, BTF parsing happens from MODULE_STATE_COMING notifier callback. At this point, the module initcalls have not been invoked. The notifier callback parses and prepares the module BTF, allocates an ID, which publishes it to userspace, and then adds it to the btf_modules list allowing the kernel to invoke btf_try_get_module for the BTF. However, at this point, the module has not been fully initialized (i.e. its initcalls have not finished). The code in module.c can still fail and free the module, without caring for other users. However, nothing stops btf_try_get_module from succeeding between the state transition from MODULE_STATE_COMING to MODULE_STATE_LIVE. This leads to a use-after-free issue when BPF program loads successfully in the state transition, load_module's do_init_module call fails and frees the module, and BPF program fd on close calls module_put for the freed module. Future patch has test case to verify we don't regress in this area in future. There are multiple points after prepare_coming_module (in load_module) where failure can occur and module loading can return error. We illustrate and test for the race using the last point where it can practically occur (in module __init function). An illustration of the race: CPU 0 CPU 1 load_module notifier_call(MODULE_STATE_COMING) btf_parse_module btf_alloc_id // Published to userspace list_add(&btf_mod->list, btf_modules) mod->init(...) ... ^ bpf_check | check_pseudo_btf_id | btf_try_get_module | returns true | ... ... | module __init in progress return prog_fd | ... ... V if (ret < 0) free_module(mod) ... close(prog_fd) ... bpf_prog_free_deferred module_put(used_btf.mod) // use-after-free We fix this issue by setting a flag BTF_MODULE_F_LIVE, from the notifier callback when MODULE_STATE_LIVE state is reached for the module, so that we return NULL from btf_try_get_module for modules that are not fully formed. Since try_module_get already checks that module is not in MODULE_STATE_GOING state, and that is the only transition a live module can make before being removed from btf_modules list, this is enough to close the race and prevent the bug. A later selftest patch crafts the race condition artifically to verify that it has been fixed, and that verifier fails to load program (with ENXIO). Lastly, a couple of comments: 1. Even if this race didn't exist, it seems more appropriate to only access resources (ksyms and kfuncs) of a fully formed module which has been initialized completely. 2. This patch was born out of need for synchronization against module initcall for the next patch, so it is needed for correctness even without the aforementioned race condition. The BTF resources initialized by module initcall are set up once and then only looked up, so just waiting until the initcall has finished ensures correct behavior.
来源: 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存在安全漏洞,该漏洞源于btf_try_get_module和load_module之间的竞争条件导致释放后重用。
来源: 中国国家信息安全漏洞库 CNNVD
CVSS Information
N/A
来源: 中国国家信息安全漏洞库 CNNVD
Vulnerability Type
N/A
来源: 中国国家信息安全漏洞库 CNNVD

受影响产品

厂商 产品 影响版本 CPE 订阅
Linux Linux 541c3bad8dc51b253ba8686d0cd7628e6b9b5f4c ~ 51b82141fffa454abf937a8ff0b8af89e4fd0c8f -
Linux Linux 5.12 -

二、漏洞 CVE-2022-49236 的公开POC

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

未找到公开 POC。

登录以生成 AI POC

三、漏洞 CVE-2022-49236 的情报信息

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

CVE-2022-49236 补丁与修复 (4)

同批安全公告 · Linux · 2025-02-26 · 共 706 条

CVE-2022-49149 9.8 CRITICAL Linux kernel 安全漏洞
CVE-2022-49280 9.8 CRITICAL Linux kernel 安全漏洞
CVE-2022-49561 9.8 CRITICAL Linux kernel 安全漏洞
CVE-2022-49407 9.8 CRITICAL Linux kernel 安全漏洞
CVE-2022-49094 9.8 CRITICAL Linux kernel 安全漏洞
CVE-2022-49362 9.8 CRITICAL Linux kernel 安全漏洞
CVE-2022-49093 9.8 CRITICAL Linux kernel 安全漏洞
CVE-2022-49194 9.8 CRITICAL Linux kernel 安全漏洞
CVE-2022-49356 9.8 CRITICAL Linux kernel 安全漏洞
CVE-2022-49418 9.8 CRITICAL Linux kernel 安全漏洞
CVE-2022-49201 9.8 CRITICAL Linux kernel 安全漏洞
CVE-2022-49260 9.8 CRITICAL Linux kernel 安全漏洞
CVE-2022-49058 9.1 CRITICAL Linux kernel 安全漏洞
CVE-2022-49519 8.8 HIGH Linux kernel 安全漏洞
CVE-2022-49328 8.8 HIGH Linux kernel 安全漏洞
CVE-2022-49535 8.8 HIGH Linux kernel 安全漏洞
CVE-2022-49138 8.8 HIGH Linux kernel 安全漏洞
CVE-2022-49479 8.8 HIGH Linux kernel 安全漏洞
CVE-2022-49114 8.8 HIGH Linux kernel 安全漏洞
CVE-2022-49111 8.8 HIGH Linux kernel 安全漏洞

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

IV. Related Vulnerabilities

V. Comments for CVE-2022-49236

暂无评论


发表评论