Fixed
Created: Dec 7, 2025
Updated: Mar 3, 2026
Resolved Date: Jan 4, 2026
Found In Version: 10.25.33.1
Fix Version: 10.25.33.4
Severity: Standard
Applicable for: Wind River Linux LTS 25
Component/s: Kernel
In the Linux kernel, the following vulnerability has been resolved:[EOL][EOL]mm: prevent poison consumption when splitting THP[EOL][EOL]When performing memory error injection on a THP (Transparent Huge Page)[EOL]mapped to userspace on an x86 server, the kernel panics with the following[EOL]trace. The expected behavior is to terminate the affected process instead[EOL]of panicking the kernel, as the x86 Machine Check code can recover from an[EOL]in-userspace #MC.[EOL][EOL] mce: [Hardware Error]: CPU 0: Machine Check Exception: f Bank 3: bd80000000070134[EOL] mce: [Hardware Error]: RIP 10:<ffffffff8372f8bc> {memchr_inv+0x4c/0xf0}[EOL] mce: [Hardware Error]: TSC afff7bbff88a ADDR 1d301b000 MISC 80 PPIN 1e741e77539027db[EOL] mce: [Hardware Error]: PROCESSOR 0:d06d0 TIME 1758093249 SOCKET 0 APIC 0 microcode 80000320[EOL] mce: [Hardware Error]: Run the above through 'mcelog --ascii'[EOL] mce: [Hardware Error]: Machine check: Data load in unrecoverable area of kernel[EOL] Kernel panic - not syncing: Fatal local machine check[EOL][EOL]The root cause of this panic is that handling a memory failure triggered[EOL]by an in-userspace #MC necessitates splitting the THP. The splitting[EOL]process employs a mechanism, implemented in[EOL]try_to_map_unused_to_zeropage(), which reads the pages in the THP to[EOL]identify zero-filled pages. However, reading the pages in the THP results[EOL]in a second in-kernel #MC, occurring before the initial memory_failure()[EOL]completes, ultimately leading to a kernel panic. See the kernel panic[EOL]call trace on the two #MCs.[EOL][EOL] First Machine Check occurs // [1][EOL] memory_failure() // [2][EOL] try_to_split_thp_page()[EOL] split_huge_page()[EOL] split_huge_page_to_list_to_order()[EOL] __folio_split() // [3][EOL] remap_page()[EOL] remove_migration_ptes()[EOL] remove_migration_pte()[EOL] try_to_map_unused_to_zeropage() // [4][EOL] memchr_inv() // [5][EOL] Second Machine Check occurs // [6][EOL] Kernel panic[EOL][EOL][1] Triggered by accessing a hardware-poisoned THP in userspace, which is[EOL] typically recoverable by terminating the affected process.[EOL][EOL][2] Call folio_set_has_hwpoisoned() before try_to_split_thp_page().[EOL][EOL][3] Pass the RMP_USE_SHARED_ZEROPAGE remap flag to remap_page().[EOL][EOL][4] Try to map the unused THP to zeropage.[EOL][EOL][5] Re-access pages in the hw-poisoned THP in the kernel.[EOL][EOL][6] Triggered in-kernel, leading to a panic kernel.[EOL][EOL]In Step[2], memory_failure() sets the poisoned flag on the page in the THP[EOL]by TestSetPageHWPoison() before calling try_to_split_thp_page().[EOL][EOL]As suggested by David Hildenbrand, fix this panic by not accessing to the[EOL]poisoned page in the THP during zeropage identification, while continuing[EOL]to scan unaffected pages in the THP for possible zeropage mapping. This[EOL]prevents a second in-kernel #MC that would cause kernel panic in Step[4].[EOL][EOL]Thanks to Andrew Zaborowski for his initial work on fixing this issue.