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

目标: 1000 元 · 已筹: 1336

100%

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

AI 预测 5.5 利用难度: 困难 EPSS 0.20% · P10

影响版本矩阵 8

厂商产品版本范围状态
LinuxLinuxc1a4de99fada21e2e9251e52cbb51eff5aadc757< 3c6b4bcf37845c9359aed926324bed66bdd2448daffected
c1a4de99fada21e2e9251e52cbb51eff5aadc757< 98cc18b1b71e23fe81a5194ed432b20c2d81a01aaffected
c1a4de99fada21e2e9251e52cbb51eff5aadc757< 71c186efc1b2cf1aeabfeff3b9bd5ac4c5ac14d8affected
4.3affected
< 4.3unaffected
6.6.51≤ 6.6.*unaffected
6.10.10≤ 6.10.*unaffected
6.11≤ *unaffected
获取后续新漏洞提醒登录后订阅

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

漏洞信息

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

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

Vulnerability Title
userfaultfd: fix checks for huge PMDs
来源: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: userfaultfd: fix checks for huge PMDs Patch series "userfaultfd: fix races around pmd_trans_huge() check", v2. The pmd_trans_huge() code in mfill_atomic() is wrong in three different ways depending on kernel version: 1. The pmd_trans_huge() check is racy and can lead to a BUG_ON() (if you hit the right two race windows) - I've tested this in a kernel build with some extra mdelay() calls. See the commit message for a description of the race scenario. On older kernels (before 6.5), I think the same bug can even theoretically lead to accessing transhuge page contents as a page table if you hit the right 5 narrow race windows (I haven't tested this case). 2. As pointed out by Qi Zheng, pmd_trans_huge() is not sufficient for detecting PMDs that don't point to page tables. On older kernels (before 6.5), you'd just have to win a single fairly wide race to hit this. I've tested this on 6.1 stable by racing migration (with a mdelay() patched into try_to_migrate()) against UFFDIO_ZEROPAGE - on my x86 VM, that causes a kernel oops in ptlock_ptr(). 3. On newer kernels (>=6.5), for shmem mappings, khugepaged is allowed to yank page tables out from under us (though I haven't tested that), so I think the BUG_ON() checks in mfill_atomic() are just wrong. I decided to write two separate fixes for these (one fix for bugs 1+2, one fix for bug 3), so that the first fix can be backported to kernels affected by bugs 1+2. This patch (of 2): This fixes two issues. I discovered that the following race can occur: mfill_atomic other thread ============ ============ <zap PMD> pmdp_get_lockless() [reads none pmd] <bail if trans_huge> <if none:> <pagefault creates transhuge zeropage> __pte_alloc [no-op] <zap PMD> <bail if pmd_trans_huge(*dst_pmd)> BUG_ON(pmd_none(*dst_pmd)) I have experimentally verified this in a kernel with extra mdelay() calls; the BUG_ON(pmd_none(*dst_pmd)) triggers. On kernels newer than commit 0d940a9b270b ("mm/pgtable: allow pte_offset_map[_lock]() to fail"), this can't lead to anything worse than a BUG_ON(), since the page table access helpers are actually designed to deal with page tables concurrently disappearing; but on older kernels (<=6.4), I think we could probably theoretically race past the two BUG_ON() checks and end up treating a hugepage as a page table. The second issue is that, as Qi Zheng pointed out, there are other types of huge PMDs that pmd_trans_huge() can't catch: devmap PMDs and swap PMDs (in particular, migration PMDs). On <=6.4, this is worse than the first issue: If mfill_atomic() runs on a PMD that contains a migration entry (which just requires winning a single, fairly wide race), it will pass the PMD to pte_offset_map_lock(), which assumes that the PMD points to a page table. Breakage follows: First, the kernel tries to take the PTE lock (which will crash or maybe worse if there is no "struct page" for the address bits in the migration entry PMD - I think at least on X86 there usually is no corresponding "struct page" thanks to the PTE inversion mitigation, amd64 looks different). If that didn't crash, the kernel would next try to write a PTE into what it wrongly thinks is a page table. As part of fixing these issues, get rid of the check for pmd_trans_huge() before __pte_alloc() - that's redundant, we're going to have to check for that after the __pte_alloc() anyway. Backport note: pmdp_get_lockless() is pmd_read_atomic() in older kernels.
来源: 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存在安全漏洞。攻击者利用该漏洞导致资源访问冲突。
来源: 中国国家信息安全漏洞库 CNNVD
CVSS Information
N/A
来源: 中国国家信息安全漏洞库 CNNVD
Vulnerability Type
N/A
来源: 中国国家信息安全漏洞库 CNNVD

受影响产品

厂商产品影响版本CPE订阅
LinuxLinux c1a4de99fada21e2e9251e52cbb51eff5aadc757 ~ 3c6b4bcf37845c9359aed926324bed66bdd2448d -
LinuxLinux 4.3 -

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

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

未找到公开 POC。

登录以生成 AI POC

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

登录查看更多情报信息。

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

同批安全公告 · Linux · 2024-09-18 · 共 85 条

CVE-2024-46771Linux kernel 安全漏洞
CVE-2024-46780Linux kernel 安全漏洞
CVE-2024-46767Linux kernel 安全漏洞
CVE-2024-46768Linux kernel 安全漏洞
CVE-2024-46766Linux kernel 安全漏洞
CVE-2024-46763Linux kernel 安全漏洞
CVE-2024-46762Linux kernel 安全漏洞
CVE-2024-46761Linux kernel 安全漏洞
CVE-2024-46760Linux kernel 安全漏洞
CVE-2024-46765Linux kernel 安全漏洞
CVE-2024-46769Linux kernel 安全漏洞
CVE-2024-46770Linux kernel 安全漏洞
CVE-2024-46772Linux kernel 安全漏洞
CVE-2024-46773Linux kernel 安全漏洞
CVE-2024-46774Linux kernel 安全漏洞
CVE-2024-46775Linux kernel 安全漏洞
CVE-2024-46776Linux kernel 安全漏洞
CVE-2024-46777Linux kernel 安全漏洞
CVE-2024-46778Linux kernel 安全漏洞
CVE-2024-46779Linux kernel 安全漏洞

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

IV. Related Vulnerabilities

V. Comments for CVE-2024-46787

暂无评论


发表评论