# CVE-2026-31466: mm/huge\_memory: fix folio isn't locked in softleaf\_to\_folio()

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

- **Severity:** MEDIUM 4.7
- **CVSS:** 4.7 (v3.1, NVD) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: High; 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.12% (percentile 1, 2026-11-26)
- **CWE:** CWE-362
- **Published:** 2026-04-22T13:53:56.259Z
- **Modified:** 2026-11-11T23:10:00.263Z

## Who should check

- Anyone running Linux \>= e9b61f19858a5d6c42ce2298cf138279375d0d9b, \< 426ee10711586617da869c8bb798214965337617; \>= e9b61f19858a5d6c42ce2298cf138279375d0d9b, \< f1acf5887c2bbaf998dc3fe32c72b7a8b84a3ddd; \>= e9b61f19858a5d6c42ce2298cf138279375d0d9b, \< 722cfaf6b31d31123439e67b5deac6b1261a3dea; \>= e9b61f19858a5d6c42ce2298cf138279375d0d9b, \< 7ddcf4a245c1c5a91fdd9698757e3d95179ffe41; \>= e9b61f19858a5d6c42ce2298cf138279375d0d9b, \< b8c49ad888892ad7b77062b9c102b799a3e9b4f8; \>= e9b61f19858a5d6c42ce2298cf138279375d0d9b, \< 7ad1997b9bc8032603df8f091761114479285769; \>= e9b61f19858a5d6c42ce2298cf138279375d0d9b, \< 8bfb8414e9f2ce6f5f2f0e3d0da52f2d132128e7; \>= e9b61f19858a5d6c42ce2298cf138279375d0d9b, \< 4c5e7f0fcd592801c9cc18f29f80fbee84eb8669
- Anyone running Linux 4.5

## Description

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

mm/huge\_memory: fix folio isn't locked in softleaf\_to\_folio()

On arm64 server, we found folio that get from migration entry isn't locked
in softleaf\_to\_folio().  This issue triggers when mTHP splitting and
zap\_nonpresent\_ptes() races, and the root cause is lack of memory barrier
in softleaf\_to\_folio().  The race is as follows:

	CPU0                                             CPU1

deferred\_split\_scan()                              zap\_nonpresent\_ptes()
  lock folio
  split\_folio()
    unmap\_folio()
      change ptes to migration entries
    \_\_split\_folio\_to\_order()                         softleaf\_to\_folio()
      set flags(including PG\_locked) for tail pages    folio = pfn\_folio(softleaf\_to\_pfn(entry))
      smp\_wmb()                                        VM\_WARN\_ON\_ONCE(!folio\_test\_locked(folio))
      prep\_compound\_page() for tail pages

In \_\_split\_folio\_to\_order(), smp\_wmb() guarantees page flags of tail pages
are visible before the tail page becomes non-compound.  smp\_wmb() should
be paired with smp\_rmb() in softleaf\_to\_folio(), which is missed.  As a
result, if zap\_nonpresent\_ptes() accesses migration entry that stores tail
pfn, softleaf\_to\_folio() may see the updated compound\_head of tail page
before page-\>flags.

This issue will trigger VM\_WARN\_ON\_ONCE() in pfn\_swap\_entry\_folio()
because of the race between folio split and zap\_nonpresent\_ptes()
leading to a folio incorrectly undergoing modification without a folio
lock being held.

This is a BUG\_ON() before commit 93976a20345b ("mm: eliminate further
swapops predicates"), which in merged in v6.19-rc1.

To fix it, add missing smp\_rmb() if the softleaf entry is migration entry
in softleaf\_to\_folio() and softleaf\_to\_page().

\[tujinjiang@huawei.com: update function name and comments\]

## Affected and fixed versions

- Linux: \>= e9b61f19858a5d6c42ce2298cf138279375d0d9b, \< 426ee10711586617da869c8bb798214965337617; \>= e9b61f19858a5d6c42ce2298cf138279375d0d9b, \< f1acf5887c2bbaf998dc3fe32c72b7a8b84a3ddd; \>= e9b61f19858a5d6c42ce2298cf138279375d0d9b, \< 722cfaf6b31d31123439e67b5deac6b1261a3dea; \>= e9b61f19858a5d6c42ce2298cf138279375d0d9b, \< 7ddcf4a245c1c5a91fdd9698757e3d95179ffe41; \>= e9b61f19858a5d6c42ce2298cf138279375d0d9b, \< b8c49ad888892ad7b77062b9c102b799a3e9b4f8; \>= e9b61f19858a5d6c42ce2298cf138279375d0d9b, \< 7ad1997b9bc8032603df8f091761114479285769; \>= e9b61f19858a5d6c42ce2298cf138279375d0d9b, \< 8bfb8414e9f2ce6f5f2f0e3d0da52f2d132128e7; \>= e9b61f19858a5d6c42ce2298cf138279375d0d9b, \< 4c5e7f0fcd592801c9cc18f29f80fbee84eb8669 (cvelist)
- Linux: 4.5 (cvelist)

## Mitigation

- Upgrade Linux to 4c5e7f0fcd592801c9cc18f29f80fbee84eb8669 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2026-31466.md
Affected: Linux >= e9b61f19858a5d6c42ce2298cf138279375d0d9b, < 426ee10711586617da869c8bb798214965337617; >= e9b61f19858a5d6c42ce2298cf138279375d0d9b, < f1acf5887c2bbaf998dc3fe32c72b7a8b84a3ddd; >= e9b61f19858a5d6c42ce2298cf138279375d0d9b, < 722cfaf6b31d31123439e67b5deac6b1261a3dea; >= e9b61f19858a5d6c42ce229…
Fixed in: Linux 426ee10711586617da869c8bb798214965337617, Linux 722cfaf6b31d31123439e67b5deac6b1261a3dea, Linux 7ddcf4a245c1c5a91fdd9698757e3d95179ffe41, Linux 7ad1997b9bc8032603df8f091761114479285769, Linux 8bfb8414e9f2ce6f5f2f0e3d0da52f2d132128e7, Linux 4c5e7f0fcd592801c9cc18f29f80fbee84eb8669

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-2026-31466 being exploited?

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

### How serious is CVE-2026-31466?

Medium: CVSS 4.7 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2026-31466?

Linux \>= e9b61f19858a5d6c42ce2298cf138279375d0d9b, \< 426ee10711586617da869c8bb798214965337617; \>= e9b61f19858a5d6c42ce2298cf138279375d0d9b, \< f1acf5887c2bbaf998dc3fe32c72b7a8b84a3ddd; \>= e9b61f19858a5d6c42ce2298cf138279375d0d9b, \< 722cfaf6b31d31123439e67b5deac6b1261a3dea; \>= e9b61f19858a5d6c42ce2298cf138279375d0d9b, \< 7ddcf4a245c1c5a91fdd9698757e3d95179ffe41; \>= e9b61f19858a5d6c42ce2298cf138279375d0d9b, \< b8c49ad888892ad7b77062b9c102b799a3e9b4f8; \>= e9b61f19858a5d6c42ce2298cf138279375d0d9b, \< 7ad1997b9bc8032603df8f091761114479285769; \>= e9b61f19858a5d6c42ce2298cf138279375d0d9b, \< 8bfb8414e9f2ce6f5f2f0e3d0da52f2d132128e7; \>= e9b61f19858a5d6c42ce2298cf138279375d0d9b, \< 4c5e7f0fcd592801c9cc18f29f80fbee84eb8669; Linux 4.5.

### Is there a fix for CVE-2026-31466?

Yes. Fixed in Linux 426ee10711586617da869c8bb798214965337617, Linux 722cfaf6b31d31123439e67b5deac6b1261a3dea, Linux 7ddcf4a245c1c5a91fdd9698757e3d95179ffe41, Linux 7ad1997b9bc8032603df8f091761114479285769, Linux 8bfb8414e9f2ce6f5f2f0e3d0da52f2d132128e7, Linux 4c5e7f0fcd592801c9cc18f29f80fbee84eb8669. Upgrade Linux to 4c5e7f0fcd592801c9cc18f29f80fbee84eb8669 or later.

### How do I check if I'm affected by CVE-2026-31466?

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/426ee10711586617da869c8bb798214965337617>
- patch: <https://git.kernel.org/stable/c/f1acf5887c2bbaf998dc3fe32c72b7a8b84a3ddd>
- patch: <https://git.kernel.org/stable/c/722cfaf6b31d31123439e67b5deac6b1261a3dea>
- patch: <https://git.kernel.org/stable/c/7ddcf4a245c1c5a91fdd9698757e3d95179ffe41>
- patch: <https://git.kernel.org/stable/c/b8c49ad888892ad7b77062b9c102b799a3e9b4f8>
- patch: <https://git.kernel.org/stable/c/7ad1997b9bc8032603df8f091761114479285769>
- patch: <https://git.kernel.org/stable/c/8bfb8414e9f2ce6f5f2f0e3d0da52f2d132128e7>
- patch: <https://git.kernel.org/stable/c/4c5e7f0fcd592801c9cc18f29f80fbee84eb8669>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-082556.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-019113.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-457936.html>

## 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-2026-31466>

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