Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
AI teammates
Sign in
Sign up
Fetch the repository succeeded.
description of repo status
Open Source
>
Other
>
Operation System
&&
Donate
Please sign in before you donate.
Cancel
Sign in
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
Watch
Unwatch
Watching
Releases Only
Ignoring
128
Star
73
Fork
330
src-openEuler
/
kernel
Closed
Code
Issues
1197
Pull Requests
35
Wiki
Insights
Pipelines
Service
JavaDoc
PHPDoc
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
SBOM
DevLens
Don’t show this again
Update failed. Please try again later!
Remove this flag
Content Risk Flag
This task is identified by
as the content contains sensitive information such as code security bugs, privacy leaks, etc., so it is only accessible to contributors of this repository.
CVE-2025-39844
Done
#ICYXUX
CVE和安全问题
openeuler-ci-bot
owner
Opened this issue
2025-09-19 23:51
一、漏洞信息 漏洞编号:[CVE-2025-39844](https://nvd.nist.gov/vuln/detail/CVE-2025-39844) 漏洞归属组件:[kernel](https://gitee.com/src-openeuler/kernel) 漏洞归属的版本:4.19.140,4.19.194,4.19.90,5.10.0,6.1.19,6.4.0,6.6.0 CVSS V3.0分值: BaseScore:N/A None Vector:CVSS:3.0/ 漏洞简述: In the Linux kernel, the following vulnerability has been resolved:mm: move page table sync declarations to linux/pgtable.hDuring our internal testing, we started observing intermittent bootfailures when the machine uses 4-level paging and has a large amount ofpersistent memory: BUG: unable to handle page fault for address: ffffe70000000034 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 0 P4D 0 Oops: 0002 [#1] SMP NOPTI RIP: 0010:__init_single_page+0x9/0x6d Call Trace: <TASK> __init_zone_device_page+0x17/0x5d memmap_init_zone_device+0x154/0x1bb pagemap_range+0x2e0/0x40f memremap_pages+0x10b/0x2f0 devm_memremap_pages+0x1e/0x60 dev_dax_probe+0xce/0x2ec [device_dax] dax_bus_probe+0x6d/0xc9 [... snip ...] </TASK>It turns out that the kernel panics while initializing vmemmap (structpage array) when the vmemmap region spans two PGD entries, because the newPGD entry is only installed in init_mm.pgd, but not in the page tables ofother tasks.And looking at __populate_section_memmap(): if (vmemmap_can_optimize(altmap, pgmap)) // does not sync top level page tables r = vmemmap_populate_compound_pages(pfn, start, end, nid, pgmap); else // sync top level page tables in x86 r = vmemmap_populate(start, end, nid, altmap);In the normal path, vmemmap_populate() in arch/x86/mm/init_64.csynchronizes the top level page table (See commit 9b861528a801 ( x86-64,mem: Update all PGDs for direct mapping and vmemmap mapping changes )) sothat all tasks in the system can see the new vmemmap area.However, when vmemmap_can_optimize() returns true, the optimized pathskips synchronization of top-level page tables. This is becausevmemmap_populate_compound_pages() is implemented in core MM code, whichdoes not handle synchronization of the top-level page tables. Instead,the core MM has historically relied on each architecture to perform thissynchronization manually.We re not the first party to encounter a crash caused by not-sync d toplevel page tables: earlier this year, Gwan-gyeong Mun attempted to addressthe issue [1] [2] after hitting a kernel panic when x86 code accessed thevmemmap area before the corresponding top-level entries were synced. Atthat time, the issue was believed to be triggered only when struct pagewas enlarged for debugging purposes, and the patch did not get furtherupdates.It turns out that current approach of relying on each arch to handle thepage table sync manually is fragile because 1) it s easy to forget to syncthe top level page table, and 2) it s also easy to overlook that thekernel should not access the vmemmap and direct mapping areas before thesync.# The solution: Make page table sync more code robust and harder to missTo address this, Dave Hansen suggested [3] [4] introducing{pgd,p4d}_populate_kernel() for updating kernel portion of the page tablesand allow each architecture to explicitly perform synchronization wheninstalling top-level entries. With this approach, we no longer need toworry about missing the sync step, reducing the risk of futureregressions.The new interface reuses existing ARCH_PAGE_TABLE_SYNC_MASK,PGTBL_P*D_MODIFIED and arch_sync_kernel_mappings() facility used byvmalloc and ioremap to synchronize page tables.pgd_populate_kernel() looks like this:static inline void pgd_populate_kernel(unsigned long addr, pgd_t *pgd, p4d_t *p4d){ pgd_populate(&init_mm, pgd, p4d); if (ARCH_PAGE_TABLE_SYNC_MASK & PGTBL_PGD_MODIFIED) arch_sync_kernel_mappings(addr, addr);}It is worth noting that vmalloc() and apply_to_range() carefullysynchronizes page tables by calling p*d_alloc_track() andarch_sync_kernel_mappings(), and thus they are not affected by---truncated--- 漏洞公开时间:2025-09-20 00:15:43 漏洞创建时间:2025-09-19 23:51:47 漏洞详情参考链接: https://nvd.nist.gov/vuln/detail/CVE-2025-39844 <details> <summary>更多参考(点击展开)</summary> | 参考来源 | 参考链接 | 来源链接 | | ------- | -------- | -------- | | | https://lore.kernel.org/linux-cve-announce/2025091903-CVE-2025-39844-7583@gregkh/T/#u | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | | | https://www.cve.org/CVERecord?id=CVE-2025-39844 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39844 | | | | https://lore.kernel.org/linux-cve-announce/2025091903-CVE-2025-39844-7583@gregkh/T | | | | https://bugzilla.redhat.com/show_bug.cgi?id=2396938 | | | | https://docs.bell-sw.com/security/cves/CVE-2025-39844 | | | | https://advisory.echohq.com/cve/CVE-2025-39844 | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | | | https://security-tracker.debian.org/tracker/CVE-2025-39844 | | | | https://ubuntu.com/security/CVE-2025-39844 | | | | https://www.cve.org/CVERecord?id=CVE-2025-39844 | | | | https://git.kernel.org/linus/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | | | http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-39844 | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | | | http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-39844 | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | | | http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-39844 | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | | | http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-39844 | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | | | https://www.openeuler.org/zh/security/security-bulletins/detail/?id=openEuler-SA-2025-2467 | | | | https://nvd.nist.gov/vuln/detail/CVE-2024-56591 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-22005 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-22081 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-37741 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-38086 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-38319 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39683 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39715 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39739 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39752 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39760 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39819 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39824 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39844 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39845 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39850 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39851 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39853 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39865 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39883 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39886 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39895 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39914 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39953 | | </details> 漏洞分析指导链接: https://gitee.com/openeuler/cve-manager/blob/master/cve-vulner-manager/doc/md/manual.md 漏洞数据来源: 七彩瞬析开源风险感知平台 漏洞补丁信息: <details> <summary>详情(点击展开)</summary> | 影响的包 | 修复版本 | 修复补丁 | 问题引入补丁 | 来源 | | ------- | -------- | ------- | -------- | --------- | | gregkh/linux | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | ljqc | | gregkh/linux | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | ljqc | | gregkh/linux | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | ljqc | | gregkh/linux | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | ljqc | | gregkh/linux | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | ljqc | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | cvelistv5 | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | cvelistv5 | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | cvelistv5 | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | cvelistv5 | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | cvelistv5 | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | cvelistv5 | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | cybersecurity | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | cybersecurity | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | cybersecurity | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | cybersecurity | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | cybersecurity | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | cybersecurity | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | cnnvd | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | cnnvd | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | cnnvd | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | cnnvd | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | cnnvd | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | cnnvd | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | osv | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | osv | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | osv | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | osv | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | osv | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | osv | | | | https://git.kernel.org/linus/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | osv | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | circl | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | circl | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | circl | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | circl | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | circl | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | circl | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | snyk | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | snyk | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | snyk | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | snyk | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | snyk | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | snyk | </details> 二、漏洞分析结构反馈 影响性分析说明: In the Linux kernel, the following vulnerability has been resolved:mm: move page table sync declarations to linux/pgtable.hDuring our internal testing, we started observing intermittent bootfailures when the machine uses 4-level paging and has a large amount ofpersistent memory: BUG: unable to handle page fault for address: ffffe70000000034 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 0 P4D 0 Oops: 0002 [#1] SMP NOPTI RIP: 0010:__init_single_page+0x9/0x6d Call Trace: <TASK> __init_zone_device_page+0x17/0x5d memmap_init_zone_device+0x154/0x1bb pagemap_range+0x2e0/0x40f memremap_pages+0x10b/0x2f0 devm_memremap_pages+0x1e/0x60 dev_dax_probe+0xce/0x2ec [device_dax] dax_bus_probe+0x6d/0xc9 [... snip ...] </TASK>It turns out that the kernel panics while initializing vmemmap (structpage array) when the vmemmap region spans two PGD entries, because the newPGD entry is only installed in init_mm.pgd, but not in the page tables ofother tasks.And looking at __populate_section_memmap(): if (vmemmap_can_optimize(altmap, pgmap)) // does not sync top level page tables r = vmemmap_populate_compound_pages(pfn, start, end, nid, pgmap); else // sync top level page tables in x86 r = vmemmap_populate(start, end, nid, altmap);In the normal path, vmemmap_populate() in arch/x86/mm/init_64.csynchronizes the top level page table (See commit 9b861528a801 ( x86-64,mem: Update all PGDs for direct mapping and vmemmap mapping changes )) sothat all tasks in the system can see the new vmemmap area.However, when vmemmap_can_optimize() returns true, the optimized pathskips synchronization of top-level page tables. This is becausevmemmap_populate_compound_pages() is implemented in core MM code, whichdoes not handle synchronization of the top-level page tables. Instead,the core MM has historically relied on each architecture to perform thissynchronization manually.We re not the first party to encounter a crash caused by not-sync d toplevel page tables: earlier this year, Gwan-gyeong Mun attempted to addressthe issue [1] [2] after hitting a kernel panic when x86 code accessed thevmemmap area before the corresponding top-level entries were synced. Atthat time, the issue was believed to be triggered only when struct pagewas enlarged for debugging purposes, and the patch did not get furtherupdates.It turns out that current approach of relying on each arch to handle thepage table sync manually is fragile because 1) it s easy to forget to syncthe top level page table, and 2) it s also easy to overlook that thekernel should not access the vmemmap and direct mapping areas before thesync.# The solution: Make page table sync more code robust and harder to missTo address this, Dave Hansen suggested [3] [4] introducing{pgd,p4d}_populate_kernel() for updating kernel portion of the page tablesand allow each architecture to explicitly perform synchronization wheninstalling top-level entries. With this approach, we no longer need toworry about missing the sync step, reducing the risk of futureregressions.The new interface reuses existing ARCH_PAGE_TABLE_SYNC_MASK,PGTBL_P*D_MODIFIED and arch_sync_kernel_mappings() facility used byvmalloc and ioremap to synchronize page tables.pgd_populate_kernel() looks like this:static inline void pgd_populate_kernel(unsigned long addr, pgd_t *pgd, p4d_t *p4d){ pgd_populate(&init_mm, pgd, p4d); if (ARCH_PAGE_TABLE_SYNC_MASK & PGTBL_PGD_MODIFIED) arch_sync_kernel_mappings(addr, addr);}It is worth noting that vmalloc() and apply_to_range() carefullysynchronizes page tables by calling p*d_alloc_track() andarch_sync_kernel_mappings(), and thus they are not affected by this patchseries.This series was hugely inspired by Dave Hansen s suggestion and henceadded Suggested-by: Dave Hansen.Cc stable because lack of this series opens the door to intermit openEuler评分: 5.5 Vector:CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H 受影响版本排查(受影响/不受影响): 1.openEuler-24.03-LTS:受影响 2.openEuler-24.03-LTS-SP1:受影响 3.openEuler-24.03-LTS-SP2:受影响 4.master(6.12.33):不受影响 5.openEuler-20.03-LTS-SP4(4.19.90):不受影响 6.openEuler-22.03-LTS-SP3(5.10.0):不受影响 7.openEuler-22.03-LTS-SP4(5.10.0):不受影响 8.openEuler-24.03-LTS-Next:不受影响 修复是否涉及abi变化(是/否): 1.master(6.12.33):否 2.openEuler-20.03-LTS-SP4(4.19.90):否 3.openEuler-22.03-LTS-SP3(5.10.0):否 4.openEuler-22.03-LTS-SP4(5.10.0):否 5.openEuler-24.03-LTS:否 6.openEuler-24.03-LTS-Next:否 7.openEuler-24.03-LTS-SP1:否 8.openEuler-24.03-LTS-SP2:否 原因说明: 1.openEuler-24.03-LTS:正常修复 2.openEuler-24.03-LTS-SP1:正常修复 3.openEuler-24.03-LTS-SP2:正常修复 4.master(6.12.33):不受影响-漏洞代码不能被攻击者触发 5.openEuler-24.03-LTS-Next:不受影响-漏洞代码不能被攻击者触发 6.openEuler-20.03-LTS-SP4(4.19.90):不受影响-漏洞代码不存在 7.openEuler-22.03-LTS-SP3(5.10.0):不受影响-漏洞代码不存在 8.openEuler-22.03-LTS-SP4(5.10.0):不受影响-漏洞代码不存在 三、漏洞修复 安全公告链接:https://www.openeuler.org/zh/security/safety-bulletin/detail/?id=openEuler-SA-2025-2467
一、漏洞信息 漏洞编号:[CVE-2025-39844](https://nvd.nist.gov/vuln/detail/CVE-2025-39844) 漏洞归属组件:[kernel](https://gitee.com/src-openeuler/kernel) 漏洞归属的版本:4.19.140,4.19.194,4.19.90,5.10.0,6.1.19,6.4.0,6.6.0 CVSS V3.0分值: BaseScore:N/A None Vector:CVSS:3.0/ 漏洞简述: In the Linux kernel, the following vulnerability has been resolved:mm: move page table sync declarations to linux/pgtable.hDuring our internal testing, we started observing intermittent bootfailures when the machine uses 4-level paging and has a large amount ofpersistent memory: BUG: unable to handle page fault for address: ffffe70000000034 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 0 P4D 0 Oops: 0002 [#1] SMP NOPTI RIP: 0010:__init_single_page+0x9/0x6d Call Trace: <TASK> __init_zone_device_page+0x17/0x5d memmap_init_zone_device+0x154/0x1bb pagemap_range+0x2e0/0x40f memremap_pages+0x10b/0x2f0 devm_memremap_pages+0x1e/0x60 dev_dax_probe+0xce/0x2ec [device_dax] dax_bus_probe+0x6d/0xc9 [... snip ...] </TASK>It turns out that the kernel panics while initializing vmemmap (structpage array) when the vmemmap region spans two PGD entries, because the newPGD entry is only installed in init_mm.pgd, but not in the page tables ofother tasks.And looking at __populate_section_memmap(): if (vmemmap_can_optimize(altmap, pgmap)) // does not sync top level page tables r = vmemmap_populate_compound_pages(pfn, start, end, nid, pgmap); else // sync top level page tables in x86 r = vmemmap_populate(start, end, nid, altmap);In the normal path, vmemmap_populate() in arch/x86/mm/init_64.csynchronizes the top level page table (See commit 9b861528a801 ( x86-64,mem: Update all PGDs for direct mapping and vmemmap mapping changes )) sothat all tasks in the system can see the new vmemmap area.However, when vmemmap_can_optimize() returns true, the optimized pathskips synchronization of top-level page tables. This is becausevmemmap_populate_compound_pages() is implemented in core MM code, whichdoes not handle synchronization of the top-level page tables. Instead,the core MM has historically relied on each architecture to perform thissynchronization manually.We re not the first party to encounter a crash caused by not-sync d toplevel page tables: earlier this year, Gwan-gyeong Mun attempted to addressthe issue [1] [2] after hitting a kernel panic when x86 code accessed thevmemmap area before the corresponding top-level entries were synced. Atthat time, the issue was believed to be triggered only when struct pagewas enlarged for debugging purposes, and the patch did not get furtherupdates.It turns out that current approach of relying on each arch to handle thepage table sync manually is fragile because 1) it s easy to forget to syncthe top level page table, and 2) it s also easy to overlook that thekernel should not access the vmemmap and direct mapping areas before thesync.# The solution: Make page table sync more code robust and harder to missTo address this, Dave Hansen suggested [3] [4] introducing{pgd,p4d}_populate_kernel() for updating kernel portion of the page tablesand allow each architecture to explicitly perform synchronization wheninstalling top-level entries. With this approach, we no longer need toworry about missing the sync step, reducing the risk of futureregressions.The new interface reuses existing ARCH_PAGE_TABLE_SYNC_MASK,PGTBL_P*D_MODIFIED and arch_sync_kernel_mappings() facility used byvmalloc and ioremap to synchronize page tables.pgd_populate_kernel() looks like this:static inline void pgd_populate_kernel(unsigned long addr, pgd_t *pgd, p4d_t *p4d){ pgd_populate(&init_mm, pgd, p4d); if (ARCH_PAGE_TABLE_SYNC_MASK & PGTBL_PGD_MODIFIED) arch_sync_kernel_mappings(addr, addr);}It is worth noting that vmalloc() and apply_to_range() carefullysynchronizes page tables by calling p*d_alloc_track() andarch_sync_kernel_mappings(), and thus they are not affected by---truncated--- 漏洞公开时间:2025-09-20 00:15:43 漏洞创建时间:2025-09-19 23:51:47 漏洞详情参考链接: https://nvd.nist.gov/vuln/detail/CVE-2025-39844 <details> <summary>更多参考(点击展开)</summary> | 参考来源 | 参考链接 | 来源链接 | | ------- | -------- | -------- | | | https://lore.kernel.org/linux-cve-announce/2025091903-CVE-2025-39844-7583@gregkh/T/#u | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | | | https://www.cve.org/CVERecord?id=CVE-2025-39844 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39844 | | | | https://lore.kernel.org/linux-cve-announce/2025091903-CVE-2025-39844-7583@gregkh/T | | | | https://bugzilla.redhat.com/show_bug.cgi?id=2396938 | | | | https://docs.bell-sw.com/security/cves/CVE-2025-39844 | | | | https://advisory.echohq.com/cve/CVE-2025-39844 | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | | | https://security-tracker.debian.org/tracker/CVE-2025-39844 | | | | https://ubuntu.com/security/CVE-2025-39844 | | | | https://www.cve.org/CVERecord?id=CVE-2025-39844 | | | | https://git.kernel.org/linus/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | | | http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-39844 | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | | | http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-39844 | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | | | http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-39844 | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | | | http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-39844 | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | | | https://www.openeuler.org/zh/security/security-bulletins/detail/?id=openEuler-SA-2025-2467 | | | | https://nvd.nist.gov/vuln/detail/CVE-2024-56591 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-22005 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-22081 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-37741 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-38086 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-38319 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39683 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39715 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39739 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39752 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39760 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39819 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39824 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39844 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39845 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39850 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39851 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39853 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39865 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39883 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39886 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39895 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39914 | | | | https://nvd.nist.gov/vuln/detail/CVE-2025-39953 | | </details> 漏洞分析指导链接: https://gitee.com/openeuler/cve-manager/blob/master/cve-vulner-manager/doc/md/manual.md 漏洞数据来源: 七彩瞬析开源风险感知平台 漏洞补丁信息: <details> <summary>详情(点击展开)</summary> | 影响的包 | 修复版本 | 修复补丁 | 问题引入补丁 | 来源 | | ------- | -------- | ------- | -------- | --------- | | gregkh/linux | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | ljqc | | gregkh/linux | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | ljqc | | gregkh/linux | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | ljqc | | gregkh/linux | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | ljqc | | gregkh/linux | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | ljqc | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | cvelistv5 | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | cvelistv5 | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | cvelistv5 | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | cvelistv5 | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | cvelistv5 | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | cvelistv5 | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | cybersecurity | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | cybersecurity | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | cybersecurity | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | cybersecurity | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | cybersecurity | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | cybersecurity | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | cnnvd | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | cnnvd | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | cnnvd | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | cnnvd | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | cnnvd | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | cnnvd | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | osv | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | osv | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | osv | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | osv | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | osv | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | osv | | | | https://git.kernel.org/linus/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | osv | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | circl | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | circl | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | circl | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | circl | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | circl | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | circl | | | | https://git.kernel.org/stable/c/469f9d22751472b81eaaf8a27fcdb5a70741c342 | | snyk | | | | https://git.kernel.org/stable/c/4f7537772011fad832f83d6848f8eab282545bef | | snyk | | | | https://git.kernel.org/stable/c/6797a8b3f71b2cb558b8771a03450dc3e004e453 | | snyk | | | | https://git.kernel.org/stable/c/732e62212f49d549c91071b4da7942ee3058f7a2 | | snyk | | | | https://git.kernel.org/stable/c/7cc183f2e67d19b03ee5c13a6664b8c6cc37ff9d | | snyk | | | | https://git.kernel.org/stable/c/eceb44e1f94bd641b2a4e8c09b64c797c4eabc15 | | snyk | </details> 二、漏洞分析结构反馈 影响性分析说明: In the Linux kernel, the following vulnerability has been resolved:mm: move page table sync declarations to linux/pgtable.hDuring our internal testing, we started observing intermittent bootfailures when the machine uses 4-level paging and has a large amount ofpersistent memory: BUG: unable to handle page fault for address: ffffe70000000034 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 0 P4D 0 Oops: 0002 [#1] SMP NOPTI RIP: 0010:__init_single_page+0x9/0x6d Call Trace: <TASK> __init_zone_device_page+0x17/0x5d memmap_init_zone_device+0x154/0x1bb pagemap_range+0x2e0/0x40f memremap_pages+0x10b/0x2f0 devm_memremap_pages+0x1e/0x60 dev_dax_probe+0xce/0x2ec [device_dax] dax_bus_probe+0x6d/0xc9 [... snip ...] </TASK>It turns out that the kernel panics while initializing vmemmap (structpage array) when the vmemmap region spans two PGD entries, because the newPGD entry is only installed in init_mm.pgd, but not in the page tables ofother tasks.And looking at __populate_section_memmap(): if (vmemmap_can_optimize(altmap, pgmap)) // does not sync top level page tables r = vmemmap_populate_compound_pages(pfn, start, end, nid, pgmap); else // sync top level page tables in x86 r = vmemmap_populate(start, end, nid, altmap);In the normal path, vmemmap_populate() in arch/x86/mm/init_64.csynchronizes the top level page table (See commit 9b861528a801 ( x86-64,mem: Update all PGDs for direct mapping and vmemmap mapping changes )) sothat all tasks in the system can see the new vmemmap area.However, when vmemmap_can_optimize() returns true, the optimized pathskips synchronization of top-level page tables. This is becausevmemmap_populate_compound_pages() is implemented in core MM code, whichdoes not handle synchronization of the top-level page tables. Instead,the core MM has historically relied on each architecture to perform thissynchronization manually.We re not the first party to encounter a crash caused by not-sync d toplevel page tables: earlier this year, Gwan-gyeong Mun attempted to addressthe issue [1] [2] after hitting a kernel panic when x86 code accessed thevmemmap area before the corresponding top-level entries were synced. Atthat time, the issue was believed to be triggered only when struct pagewas enlarged for debugging purposes, and the patch did not get furtherupdates.It turns out that current approach of relying on each arch to handle thepage table sync manually is fragile because 1) it s easy to forget to syncthe top level page table, and 2) it s also easy to overlook that thekernel should not access the vmemmap and direct mapping areas before thesync.# The solution: Make page table sync more code robust and harder to missTo address this, Dave Hansen suggested [3] [4] introducing{pgd,p4d}_populate_kernel() for updating kernel portion of the page tablesand allow each architecture to explicitly perform synchronization wheninstalling top-level entries. With this approach, we no longer need toworry about missing the sync step, reducing the risk of futureregressions.The new interface reuses existing ARCH_PAGE_TABLE_SYNC_MASK,PGTBL_P*D_MODIFIED and arch_sync_kernel_mappings() facility used byvmalloc and ioremap to synchronize page tables.pgd_populate_kernel() looks like this:static inline void pgd_populate_kernel(unsigned long addr, pgd_t *pgd, p4d_t *p4d){ pgd_populate(&init_mm, pgd, p4d); if (ARCH_PAGE_TABLE_SYNC_MASK & PGTBL_PGD_MODIFIED) arch_sync_kernel_mappings(addr, addr);}It is worth noting that vmalloc() and apply_to_range() carefullysynchronizes page tables by calling p*d_alloc_track() andarch_sync_kernel_mappings(), and thus they are not affected by this patchseries.This series was hugely inspired by Dave Hansen s suggestion and henceadded Suggested-by: Dave Hansen.Cc stable because lack of this series opens the door to intermit openEuler评分: 5.5 Vector:CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H 受影响版本排查(受影响/不受影响): 1.openEuler-24.03-LTS:受影响 2.openEuler-24.03-LTS-SP1:受影响 3.openEuler-24.03-LTS-SP2:受影响 4.master(6.12.33):不受影响 5.openEuler-20.03-LTS-SP4(4.19.90):不受影响 6.openEuler-22.03-LTS-SP3(5.10.0):不受影响 7.openEuler-22.03-LTS-SP4(5.10.0):不受影响 8.openEuler-24.03-LTS-Next:不受影响 修复是否涉及abi变化(是/否): 1.master(6.12.33):否 2.openEuler-20.03-LTS-SP4(4.19.90):否 3.openEuler-22.03-LTS-SP3(5.10.0):否 4.openEuler-22.03-LTS-SP4(5.10.0):否 5.openEuler-24.03-LTS:否 6.openEuler-24.03-LTS-Next:否 7.openEuler-24.03-LTS-SP1:否 8.openEuler-24.03-LTS-SP2:否 原因说明: 1.openEuler-24.03-LTS:正常修复 2.openEuler-24.03-LTS-SP1:正常修复 3.openEuler-24.03-LTS-SP2:正常修复 4.master(6.12.33):不受影响-漏洞代码不能被攻击者触发 5.openEuler-24.03-LTS-Next:不受影响-漏洞代码不能被攻击者触发 6.openEuler-20.03-LTS-SP4(4.19.90):不受影响-漏洞代码不存在 7.openEuler-22.03-LTS-SP3(5.10.0):不受影响-漏洞代码不存在 8.openEuler-22.03-LTS-SP4(5.10.0):不受影响-漏洞代码不存在 三、漏洞修复 安全公告链接:https://www.openeuler.org/zh/security/safety-bulletin/detail/?id=openEuler-SA-2025-2467
Comments (
7
)
Sign in
to comment
Status
Done
Backlog
已挂起
Doing
Done
Declined
Assignees
Not set
CTC-Xibo.Wang
CTC-XiboWang
Assignee
Collaborator
+Assign
+Mention
Labels
CVE/FIXED
sig/Kernel
Not set
Projects
Unprojected
Unprojected
Milestones
No related milestones
No related milestones
Pull Requests
None yet
None yet
Successfully merging a pull request will close this issue.
Branches
No related branch
Branches (
-
)
Tags (
-
)
Planed to start   -   Planed to end
-
Top level
Not Top
Top Level: High
Top Level: Medium
Top Level: Low
Priority
Not specified
Serious
Main
Secondary
Unimportant
Duration
(hours)
参与者(2)
1
https://gitee.com/src-openeuler/kernel.git
git@gitee.com:src-openeuler/kernel.git
src-openeuler
kernel
kernel
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register