CVE-2025-39883
BaseFortify
Publication date: 2025-09-23
Last updated on: 2025-11-03
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | 6.1.153-1 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-UNKNOWN |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability occurs in the Linux kernel's memory failure handling code. Specifically, the function unpoison_memory() attempts to check the PG_HWPoison flags on a page that is uninitialized or offline, which triggers a kernel bug (VM_BUG_ON_PAGE(PagePoisoned(page))). This leads to a kernel panic due to an invalid opcode. The root cause is that unpoison_memory() does not properly handle the case when the page frame number (pfn) corresponds to an offline or non-existent page, causing the check to fail. The issue can be reproduced by offlining a memory block, retrieving its pfn, and then writing that pfn to the unpoison-pfn interface, which triggers the panic.
How can this vulnerability impact me? :
This vulnerability can cause a kernel panic and system crash when unpoison_memory() is called on an offline or uninitialized memory page. This can lead to system instability, downtime, and potential data loss if the system crashes unexpectedly during critical operations.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by reproducing the memory failure scenario that triggers the kernel panic. The steps include: 1) Offlining a memory block using the command: echo offline > /sys/devices/system/memory/memory12/state 2) Getting the offlined memory page frame number (pfn) using: page-types -b n -rlN 3) Writing the pfn to unpoison-pfn with: echo <pfn> > /sys/kernel/debug/hwpoison/unpoison-pfn The scenario is identified when pfn_to_online_page() returns NULL, which indicates the bug condition.
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation involves avoiding the condition where unpoison_memory() checks the PG_HWPoison flags of an uninitialized page. Specifically, ensuring that pfn_to_online_page() does not return NULL by not unpoisoning offlined or uninitialized memory pages. The fix involves failing the operation if pfn_to_online_page() == NULL, effectively preventing the kernel panic caused by this bug.