CVE-2026-53109: powerpc/pgtable-frag: Fix bad page state in pte_frag_destroy

Published Jun 24, 2026
·
Updated

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

powerpc/pgtable-frag: Fix bad page state in ptefragdestroy

powerpc uses ptfragrefcount as a reference counter for tracking it's pte and pmd page table fragments. For PTE table, in case of Hash with 64K pagesize, we have 16 fragments of 4K size in one 64K page.

Patch series [1] "mm: free retracted page table by RCU" added ptefreedefer() to defer the freeing of PTE tables when retractpagetables() is called for madvise MADVCOLLAPSE on shmem range. [1]: https://lore.kernel.org/all/7cd843a9-aa80-14f-5eb2-33427363c20@google.com/

ptefreedefer() sets the active flag on the corresponding fragment's folio & calls ptefragmentfree(), which reduces the ptfragrefcount. When ptfragrefcount reaches 0 (no active fragment using the folio), it checks if the folio active flag is set, if set, it calls callrcu to free the folio, it the active flag is unset then it calls ptefreenow().

Now, this can lead to following problem in a corner case...

[ 265.351553][ T183] BUG: Bad page state in process a.out pfn:20d62 [ 265.353555][ T183] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x20d62 [ 265.355457][ T183] flags: 0x3ffff800000100(active|node=0|zone=0|lastcpupid=0x7ffff) [ 265.358719][ T183] raw: 003ffff800000100 0000000000000000 5deadbeef0000122 0000000000000000 [ 265.360177][ T183] raw: 0000000000000000 c0000000119caf58 00000000ffffffff 0000000000000000 [ 265.361438][ T183] page dumped because: PAGEFLAGSCHECKATFREE flag(s) set [ 265.362572][ T183] Modules linked in: [ 265.364622][ T183] CPU: 0 UID: 0 PID: 183 Comm: a.out Not tainted 6.18.0-rc3-00141-g1ddeaaace7ff-dirty #53 VOLUNTARY [ 265.364785][ T183] Hardware name: IBM pSeries (emulated by qemu) POWER10 (architected) 0x801200 0xf000006 of:SLOF,git-ee03ae pSeries [ 265.364908][ T183] Call Trace: [ 265.364955][ T183] [c000000011e6f7c0] [c000000001cfaa18] dumpstacklvl+0x130/0x148 (unreliable) [ 265.365202][ T183] [c000000011e6f7f0] [c000000000794758] badpage+0xb4/0x1c8 [ 265.365384][ T183] [c000000011e6f890] [c00000000079c020] freefrozenpages+0x838/0xd08 [ 265.365554][ T183] [c000000011e6f980] [c0000000000a70ac] ptefragdestroy+0x298/0x310 [ 265.365729][ T183] [c000000011e6fa30] [c0000000000aa764] archexitmmap+0x34/0x218 [ 265.365912][ T183] [c000000011e6fa80] [c000000000751698] exitmmap+0xb8/0x820 [ 265.366080][ T183] [c000000011e6fc30] [c0000000001b1258] mmput+0x98/0x300 [ 265.366244][ T183] [c000000011e6fc80] [c0000000001c81f8] doexit+0x470/0x1508 [ 265.366421][ T183] [c000000011e6fd70] [c0000000001c95e4] dogroupexit+0x88/0x148 [ 265.366602][ T183] [c000000011e6fdc0] [c0000000001c96ec] pidchildshouldwake+0x0/0x178 [ 265.366780][ T183] [c000000011e6fdf0] [c00000000003a270] systemcallexception+0x1b0/0x4e0 [ 265.366958][ T183] [c000000011e6fe50] [c00000000000d05c] systemcallvectoredcommon+0x15c/0x2ec

The bad page state error occurs when such a folio gets freed (with active flag set), from doexit() path in parallel.

... this can happen when the pte fragment was allocated from this folio, but when all the fragments get freed, the ptefragrefcount still had some unused fragments. Now, if this process exits, with such folio as it's cached ptefrag in mm->context, then during ptefragdestroy(), we simply call pagetabledtor() and pagetablefree(), meaning it doesn't clear the active flag. This, can lead to the above bug. Since we are anyway in doexit() path, then if the refcount is 0, then I guess it should be ok to simply clear the folio active flag before calling pagetabledtor() & pagetablefree().

Affected Software

6 affected componentsFixes available
Linux Linux kernel (powerpc)
Linux Linux kernel>=6.6<6.18.33
Linux Linux kernel>=6.19<7.0.10
debian/linux<=6.12.107-1
6.1.176-16.1.190-16.12.115-27.2.12-17.2.15-1
debian/linux<6.12.115-2
6.12.115-2
debian/linux<7.0.10-1
7.0.10-1

Event History

Jun 24, 2026
CVE Published
via MITRE·04:30 PM
Data Sourced
via MITRE·04:30 PM
Description
Data Sourced
via NVD·05:17 PM
RemedyDescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·05:17 PM
DescriptionSeverityAffected Software
Jun 27, 2026
Data Sourced
via Microsoft·08:14 AM
DescriptionSeverityWeakness

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the severity of CVE-2026-53109?

The severity of CVE-2026-53109 is rated at risk level 38.

2

What type of vulnerability is CVE-2026-53109?

CVE-2026-53109 is a vulnerability related to the handling of page state in the Linux kernel, specifically in the PowerPC architecture.

3

How do I fix CVE-2026-53109?

To fix CVE-2026-53109, update your Linux kernel to the latest version where this vulnerability has been resolved.

4

Which systems are affected by CVE-2026-53109?

CVE-2026-53109 affects systems running the Linux kernel on the PowerPC architecture.

5

What impact does CVE-2026-53109 have on system performance?

CVE-2026-53109 may lead to improper handling of page table fragments, potentially impacting system stability and performance.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203