CVE-2025-38241
BaseFortify
Publication date: 2025-07-09
Last updated on: 2025-11-19
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | 6.16 |
| linux | linux_kernel | 6.16 |
| linux | linux_kernel | 6.16 |
| linux | linux_kernel | From 5.15.160 (inc) to 5.16 (inc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-667 | The product does not properly acquire or release a lock on a resource, leading to unexpected resource state changes and behaviors. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is a softlockup issue in the Linux kernel related to memory management, specifically in the handling of swap with transparent huge pages (mTHP) in the shmem subsystem. The problem occurs when a swapin operation for mTHP folios conflicts with existing folios in the swap cache, causing the system to repeatedly retry the allocation and leading to a CPU soft lockup (where the CPU is stuck and unresponsive for an extended period). The issue was fixed by applying a similar fix used for anonymous mTHP swapin to prevent this retry loop.
How can this vulnerability impact me? :
This vulnerability can cause a CPU soft lockup, meaning the CPU can become stuck and unresponsive for a long time during certain memory operations involving swap and transparent huge pages. This can lead to system hangs or degraded performance, potentially affecting system stability and availability.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by observing soft lockup warnings related to CPU stuck states in the system logs. A test to reproduce the issue involves enabling transparent hugepages for 64kB hugepages, activating a large zram swap device, setting memory limits in a cgroup, and running a continuous loop of creating, reading, and deleting a large file. The commands to reproduce the softlockup are: ``` echo always > /sys/kernel/mm/transparent_hugepage/hugepages-64kB/enabled swapon /dev/zram0 # assuming zram0 is a 48G swap device mkdir -p /sys/fs/cgroup/memory/test echo 1G > /sys/fs/cgroup/test/memory.max echo $BASHPID > /sys/fs/cgroup/test/cgroup.procs while true; do dd if=/dev/zero of=/tmp/test.img bs=1M count=5120 cat /tmp/test.img > /dev/null rm /tmp/test.img done ``` After running these commands, the system log may show messages like "watchdog: BUG: soft lockup - CPU#0 stuck for ..." indicating the vulnerability is triggered.
What immediate steps should I take to mitigate this vulnerability?
The vulnerability is fixed by applying a patch that corrects the handling of swapin for mTHP (madvise Transparent Huge Pages) in the Linux kernel, preventing the softlockup loop. Immediate mitigation involves updating the Linux kernel to a version that includes this fix. There are no significant performance impacts reported with the fix. Until the update is applied, monitoring for soft lockup messages and avoiding the specific workload pattern that triggers the issue may help reduce risk.