# CVE-2025-37834: mm/vmscan: don't try to reclaim hwpoison folio

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.27% (percentile 13, 2026-11-26)
- **Published:** 2025-05-08T06:26:24.463Z
- **Modified:** 2026-11-05T21:17:54.390Z

## Who should check

- Anyone running Linux \>= 6a46079cf57a7f7758e8b926980a4f852f89b34d, \< 1c9798bf8145a92abf45aa9d38a6406d9eb8bdf0; \>= 6a46079cf57a7f7758e8b926980a4f852f89b34d, \< 912e9f0300c3564b72a8808db406e313193a37ad; \>= 6a46079cf57a7f7758e8b926980a4f852f89b34d, \< 1b0449544c6482179ac84530b61fc192a6527bfd
- Anyone running Linux 2.6.32

## Description

In the Linux kernel, the following vulnerability has been resolved:

mm/vmscan: don't try to reclaim hwpoison folio

Syzkaller reports a bug as follows:

Injecting memory failure for pfn 0x18b00e at process virtual address 0x20ffd000
Memory failure: 0x18b00e: dirty swapcache page still referenced by 2 users
Memory failure: 0x18b00e: recovery action for dirty swapcache page: Failed
page: refcount:2 mapcount:0 mapping:0000000000000000 index:0x20ffd pfn:0x18b00e
memcg:ffff0000dd6d9000
anon flags: 0x5ffffe00482011(locked\|dirty\|arch\_1\|swapbacked\|hwpoison\|node=0\|zone=2\|lastcpupid=0xfffff)
raw: 005ffffe00482011 dead000000000100 dead000000000122 ffff0000e232a7c9
raw: 0000000000020ffd 0000000000000000 00000002ffffffff ffff0000dd6d9000
page dumped because: VM\_BUG\_ON\_FOLIO(!folio\_test\_uptodate(folio))
------------\[ cut here \]------------
kernel BUG at mm/swap\_state.c:184!
Internal error: Oops - BUG: 00000000f2000800 \[\#1\] SMP
Modules linked in:
CPU: 0 PID: 60 Comm: kswapd0 Not tainted 6.6.0-gcb097e7de84e \#3
Hardware name: linux,dummy-virt (DT)
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : add\_to\_swap+0xbc/0x158
lr : add\_to\_swap+0xbc/0x158
sp : ffff800087f37340
x29: ffff800087f37340 x28: fffffc00052c0380 x27: ffff800087f37780
x26: ffff800087f37490 x25: ffff800087f37c78 x24: ffff800087f377a0
x23: ffff800087f37c50 x22: 0000000000000000 x21: fffffc00052c03b4
x20: 0000000000000000 x19: fffffc00052c0380 x18: 0000000000000000
x17: 296f696c6f662865 x16: 7461646f7470755f x15: 747365745f6f696c
x14: 6f6621284f494c4f x13: 0000000000000001 x12: ffff600036d8b97b
x11: 1fffe00036d8b97a x10: ffff600036d8b97a x9 : dfff800000000000
x8 : 00009fffc9274686 x7 : ffff0001b6c5cbd3 x6 : 0000000000000001
x5 : ffff0000c25896c0 x4 : 0000000000000000 x3 : 0000000000000000
x2 : 0000000000000000 x1 : ffff0000c25896c0 x0 : 0000000000000000
Call trace:
 add\_to\_swap+0xbc/0x158
 shrink\_folio\_list+0x12ac/0x2648
 shrink\_inactive\_list+0x318/0x948
 shrink\_lruvec+0x450/0x720
 shrink\_node\_memcgs+0x280/0x4a8
 shrink\_node+0x128/0x978
 balance\_pgdat+0x4f0/0xb20
 kswapd+0x228/0x438
 kthread+0x214/0x230
 ret\_from\_fork+0x10/0x20

I can reproduce this issue with the following steps:

1) When a dirty swapcache page is isolated by reclaim process and the
   page isn't locked, inject memory failure for the page. 
   me\_swapcache\_dirty() clears uptodate flag and tries to delete from lru,
   but fails.  Reclaim process will put the hwpoisoned page back to lru.

2) The process that maps the hwpoisoned page exits, the page is deleted
   the page will never be freed and will be in the lru forever.

3) If we trigger a reclaim again and tries to reclaim the page,
   add\_to\_swap() will trigger VM\_BUG\_ON\_FOLIO due to the uptodate flag is
   cleared.

To fix it, skip the hwpoisoned page in shrink\_folio\_list().  Besides, the
hwpoison folio may not be unmapped by hwpoison\_user\_mappings() yet, unmap
it in shrink\_folio\_list(), otherwise the folio will fail to be unmaped by
hwpoison\_user\_mappings() since the folio isn't in lru list.

## Affected and fixed versions

- Linux: \>= 6a46079cf57a7f7758e8b926980a4f852f89b34d, \< 1c9798bf8145a92abf45aa9d38a6406d9eb8bdf0; \>= 6a46079cf57a7f7758e8b926980a4f852f89b34d, \< 912e9f0300c3564b72a8808db406e313193a37ad; \>= 6a46079cf57a7f7758e8b926980a4f852f89b34d, \< 1b0449544c6482179ac84530b61fc192a6527bfd (cvelist)
- Linux: 2.6.32 (cvelist)

## Mitigation

- Upgrade Linux to 1b0449544c6482179ac84530b61fc192a6527bfd or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-37834. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-37834.md
Affected: Linux >= 6a46079cf57a7f7758e8b926980a4f852f89b34d, < 1c9798bf8145a92abf45aa9d38a6406d9eb8bdf0; >= 6a46079cf57a7f7758e8b926980a4f852f89b34d, < 912e9f0300c3564b72a8808db406e313193a37ad; >= 6a46079cf57a7f7758e8b926980a4f852f89b34d, < 1b0449544c6482179ac84530b61fc192a6527bfd; Linux 2.6.32
Fixed in: Linux 1c9798bf8145a92abf45aa9d38a6406d9eb8bdf0, Linux 912e9f0300c3564b72a8808db406e313193a37ad, Linux 1b0449544c6482179ac84530b61fc192a6527bfd

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-37834 being exploited?

There is no confirmed exploitation: CVE-2025-37834 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.27% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-37834?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-37834?

Linux \>= 6a46079cf57a7f7758e8b926980a4f852f89b34d, \< 1c9798bf8145a92abf45aa9d38a6406d9eb8bdf0; \>= 6a46079cf57a7f7758e8b926980a4f852f89b34d, \< 912e9f0300c3564b72a8808db406e313193a37ad; \>= 6a46079cf57a7f7758e8b926980a4f852f89b34d, \< 1b0449544c6482179ac84530b61fc192a6527bfd; Linux 2.6.32.

### Is there a fix for CVE-2025-37834?

Yes. Fixed in Linux 1c9798bf8145a92abf45aa9d38a6406d9eb8bdf0, Linux 912e9f0300c3564b72a8808db406e313193a37ad, Linux 1b0449544c6482179ac84530b61fc192a6527bfd. Upgrade Linux to 1b0449544c6482179ac84530b61fc192a6527bfd or later.

### How do I check if I'm affected by CVE-2025-37834?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/1c9798bf8145a92abf45aa9d38a6406d9eb8bdf0>
- patch: <https://git.kernel.org/stable/c/912e9f0300c3564b72a8808db406e313193a37ad>
- patch: <https://git.kernel.org/stable/c/1b0449544c6482179ac84530b61fc192a6527bfd>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-37834>

HTML: <https://flawdb.com/CVE-2025-37834> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-37834>
