CVE-2025-21931: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: hwpoison, memory_hotplug: lock folio before unmap hwpoisoned folio Commit b15c87263a69 ("hwpoison, memory_hotplug: allow hwpoisoned pages to be offlined) add page poison checks in do_migrate_range in order to make offline hwpoisoned page possible by introducing isolate_lru_page and try_to_unmap for hwpoisoned page. However folio lock must be held before calling try_to_unmap. Add it to fix this problem. Warning will be produced if folio is not locked during unmap: ------------[ cut here ]------------ kernel BUG at ./include/linux/swapops.h:400! Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP Modules linked in: CPU: 4 UID: 0 PID: 411 Comm: bash Tainted: G W 6.13.0-rc1-00016-g3c434c7ee82a-dirty #41 Tainted: [W]=WARN Hardware name: QEMU QEMU Virtual Machine, BIOS 0.0.0 02/06/2015 pstate: 40400005 (nZcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : try_to_unmap_one+0xb08/0xd3c lr : try_to_unmap_one+0x3dc/0xd3c Call trace: try_to_unmap_one+0xb08/0xd3c (P) try_to_unmap_one+0x3dc/0xd3c (L) rmap_walk_anon+0xdc/0x1f8 rmap_walk+0x3c/0x58 try_to_unmap+0x88/0x90 unmap_poisoned_folio+0x30/0xa8 do_migrate_range+0x4a0/0x568 offline_pages+0x5a4/0x670 memory_block_action+0x17c/0x374 memory_subsys_offline+0x3c/0x78 device_offline+0xa4/0xd0 state_store+0x8c/0xf0 dev_attr_store+0x18/0x2c sysfs_kf_write+0x44/0x54 kernfs_fop_write_iter+0x118/0x1a8 vfs_write+0x3a8/0x4bc ksys_write+0x6c/0xf8 __arm64_sys_write+0x1c/0x28 invoke_syscall+0x44/0x100 el0_svc_common.constprop.0+0x40/0xe0 do_el0_svc+0x1c/0x28 el0_svc+0x30/0xd0 el0t_64_sync_handler+0xc8/0xcc el0t_64_sync+0x198/0x19c Code: f9407be0 b5fff320 d4210000 17ffff97 (d4210000) ---[ end trace 0000000000000000 ]---
AI Analysis
Technical Summary
CVE-2025-21931 is a vulnerability identified in the Linux kernel related to the handling of hardware-poisoned memory pages during memory hotplug operations. The issue arises from improper locking of memory folios before attempting to unmap hardware-poisoned pages. Specifically, the kernel commit b15c87263a69 introduced page poison checks in the do_migrate_range function to allow offline of hwpoisoned pages by using isolate_lru_page and try_to_unmap functions. However, it failed to hold the folio lock before calling try_to_unmap, which is a necessary synchronization step. This omission can lead to kernel bugs and internal errors, as evidenced by kernel oops and BUG messages during execution, potentially causing system instability or crashes. The vulnerability manifests as a kernel panic or oops when the kernel attempts to unmap a hwpoisoned folio without holding the required lock, leading to memory management faults. The issue affects multiple Linux kernel versions identified by specific commit hashes, indicating it is present in various recent kernel builds. Although no known exploits are reported in the wild, the vulnerability impacts core kernel memory management subsystems, which are critical for system stability and security. The problem is technical and low-level, involving memory page isolation, migration, and unmapping in the presence of hardware errors (hwpoison). The vulnerability could be triggered during memory hotplug or offline operations, which are used to dynamically add or remove memory from the system, a feature often used in virtualized or high-availability environments.
Potential Impact
For European organizations, the impact of CVE-2025-21931 could be significant, especially for those relying on Linux-based servers and infrastructure that utilize memory hotplug features, such as cloud providers, data centers, and enterprises running virtualized environments. The vulnerability can cause kernel panics or system crashes, leading to denial of service (DoS) conditions. This can disrupt critical services, cause downtime, and potentially lead to data loss or corruption if systems become unstable during memory management operations. Organizations with high-availability requirements or those using advanced memory management features in Linux kernels are particularly at risk. Although no direct exploitation for privilege escalation or remote code execution is indicated, the instability caused by this bug can be leveraged by attackers to degrade service availability or cause operational disruptions. The lack of a known exploit reduces immediate risk, but the vulnerability's presence in widely deployed Linux kernels means that unpatched systems remain vulnerable to accidental or malicious triggering of the bug. This could affect cloud service providers, hosting companies, and enterprises across Europe that depend on Linux for their infrastructure.
Mitigation Recommendations
To mitigate this vulnerability, European organizations should prioritize updating their Linux kernels to versions where this issue is fixed, ensuring that the kernel commit b15c87263a69 or later patches are applied. Kernel updates should be tested in staging environments to verify stability before deployment in production. Organizations using memory hotplug features should temporarily avoid performing memory offline or hotplug operations until patches are applied. Monitoring kernel logs for warnings or oops messages related to hwpoison and memory management can help detect attempts to trigger this bug. Additionally, organizations should implement strict change control and maintenance windows for kernel upgrades to minimize service disruption. For environments using virtual machines or containers, ensuring host kernel patches are current is critical. Backup and disaster recovery plans should be reviewed and tested to prepare for potential system crashes. Finally, collaboration with Linux distribution vendors to receive timely security updates and advisories is recommended to maintain secure and stable kernel versions.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Denmark, Ireland, Italy, Spain
CVE-2025-21931: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: hwpoison, memory_hotplug: lock folio before unmap hwpoisoned folio Commit b15c87263a69 ("hwpoison, memory_hotplug: allow hwpoisoned pages to be offlined) add page poison checks in do_migrate_range in order to make offline hwpoisoned page possible by introducing isolate_lru_page and try_to_unmap for hwpoisoned page. However folio lock must be held before calling try_to_unmap. Add it to fix this problem. Warning will be produced if folio is not locked during unmap: ------------[ cut here ]------------ kernel BUG at ./include/linux/swapops.h:400! Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP Modules linked in: CPU: 4 UID: 0 PID: 411 Comm: bash Tainted: G W 6.13.0-rc1-00016-g3c434c7ee82a-dirty #41 Tainted: [W]=WARN Hardware name: QEMU QEMU Virtual Machine, BIOS 0.0.0 02/06/2015 pstate: 40400005 (nZcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : try_to_unmap_one+0xb08/0xd3c lr : try_to_unmap_one+0x3dc/0xd3c Call trace: try_to_unmap_one+0xb08/0xd3c (P) try_to_unmap_one+0x3dc/0xd3c (L) rmap_walk_anon+0xdc/0x1f8 rmap_walk+0x3c/0x58 try_to_unmap+0x88/0x90 unmap_poisoned_folio+0x30/0xa8 do_migrate_range+0x4a0/0x568 offline_pages+0x5a4/0x670 memory_block_action+0x17c/0x374 memory_subsys_offline+0x3c/0x78 device_offline+0xa4/0xd0 state_store+0x8c/0xf0 dev_attr_store+0x18/0x2c sysfs_kf_write+0x44/0x54 kernfs_fop_write_iter+0x118/0x1a8 vfs_write+0x3a8/0x4bc ksys_write+0x6c/0xf8 __arm64_sys_write+0x1c/0x28 invoke_syscall+0x44/0x100 el0_svc_common.constprop.0+0x40/0xe0 do_el0_svc+0x1c/0x28 el0_svc+0x30/0xd0 el0t_64_sync_handler+0xc8/0xcc el0t_64_sync+0x198/0x19c Code: f9407be0 b5fff320 d4210000 17ffff97 (d4210000) ---[ end trace 0000000000000000 ]---
AI-Powered Analysis
Technical Analysis
CVE-2025-21931 is a vulnerability identified in the Linux kernel related to the handling of hardware-poisoned memory pages during memory hotplug operations. The issue arises from improper locking of memory folios before attempting to unmap hardware-poisoned pages. Specifically, the kernel commit b15c87263a69 introduced page poison checks in the do_migrate_range function to allow offline of hwpoisoned pages by using isolate_lru_page and try_to_unmap functions. However, it failed to hold the folio lock before calling try_to_unmap, which is a necessary synchronization step. This omission can lead to kernel bugs and internal errors, as evidenced by kernel oops and BUG messages during execution, potentially causing system instability or crashes. The vulnerability manifests as a kernel panic or oops when the kernel attempts to unmap a hwpoisoned folio without holding the required lock, leading to memory management faults. The issue affects multiple Linux kernel versions identified by specific commit hashes, indicating it is present in various recent kernel builds. Although no known exploits are reported in the wild, the vulnerability impacts core kernel memory management subsystems, which are critical for system stability and security. The problem is technical and low-level, involving memory page isolation, migration, and unmapping in the presence of hardware errors (hwpoison). The vulnerability could be triggered during memory hotplug or offline operations, which are used to dynamically add or remove memory from the system, a feature often used in virtualized or high-availability environments.
Potential Impact
For European organizations, the impact of CVE-2025-21931 could be significant, especially for those relying on Linux-based servers and infrastructure that utilize memory hotplug features, such as cloud providers, data centers, and enterprises running virtualized environments. The vulnerability can cause kernel panics or system crashes, leading to denial of service (DoS) conditions. This can disrupt critical services, cause downtime, and potentially lead to data loss or corruption if systems become unstable during memory management operations. Organizations with high-availability requirements or those using advanced memory management features in Linux kernels are particularly at risk. Although no direct exploitation for privilege escalation or remote code execution is indicated, the instability caused by this bug can be leveraged by attackers to degrade service availability or cause operational disruptions. The lack of a known exploit reduces immediate risk, but the vulnerability's presence in widely deployed Linux kernels means that unpatched systems remain vulnerable to accidental or malicious triggering of the bug. This could affect cloud service providers, hosting companies, and enterprises across Europe that depend on Linux for their infrastructure.
Mitigation Recommendations
To mitigate this vulnerability, European organizations should prioritize updating their Linux kernels to versions where this issue is fixed, ensuring that the kernel commit b15c87263a69 or later patches are applied. Kernel updates should be tested in staging environments to verify stability before deployment in production. Organizations using memory hotplug features should temporarily avoid performing memory offline or hotplug operations until patches are applied. Monitoring kernel logs for warnings or oops messages related to hwpoison and memory management can help detect attempts to trigger this bug. Additionally, organizations should implement strict change control and maintenance windows for kernel upgrades to minimize service disruption. For environments using virtual machines or containers, ensuring host kernel patches are current is critical. Backup and disaster recovery plans should be reviewed and tested to prepare for potential system crashes. Finally, collaboration with Linux distribution vendors to receive timely security updates and advisories is recommended to maintain secure and stable kernel versions.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-12-29T08:45:45.789Z
- Cisa Enriched
- false
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9820c4522896dcbdd39b
Added to database: 5/21/2025, 9:08:48 AM
Last enriched: 7/4/2025, 2:57:09 AM
Last updated: 8/12/2025, 4:49:07 PM
Views: 10
Related Threats
CVE-2025-9023: Buffer Overflow in Tenda AC7
HighCVE-2025-8905: CWE-94 Improper Control of Generation of Code ('Code Injection') in inpersttion Inpersttion For Theme
MediumCVE-2025-8720: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in morehawes Plugin README Parser
MediumCVE-2025-8091: CWE-200 Exposure of Sensitive Information to an Unauthorized Actor in ashanjay EventON – Events Calendar
MediumCVE-2025-8080: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in alobaidi Alobaidi Captcha
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.