CVE-2022-49778: arm64/mm: fix incorrect file_map_count for non-leaf pmd/pud

Published May 1, 2025
·
Updated

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

arm64/mm: fix incorrect filemapcount for non-leaf pmd/pud

The page table check trigger BUGON() unexpectedly when collapse hugepage:

------------[ cut here ]------------ kernel BUG at mm/pagetablecheck.c:82! Internal error: Oops - BUG: 00000000f2000800 [#1] SMP Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 6 PID: 68 Comm: khugepaged Not tainted 6.1.0-rc3+ #750 Hardware name: linux,dummy-virt (DT) pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : pagetablecheckclear.isra.0+0x258/0x3f0 lr : pagetablecheckclear.isra.0+0x240/0x3f0 [...] Call trace: pagetablecheckclear.isra.0+0x258/0x3f0 pagetablecheckpmdclear+0xbc/0x108 pmdpcollapseflush+0xb0/0x160 collapsehugepage+0xa08/0x1080 hpagecollapsescanpmd+0xf30/0x1590 khugepagedscanmmslot.constprop.0+0x52c/0xac8 khugepaged+0x338/0x518 kthread+0x278/0x2f8 retfromfork+0x10/0x20 [...]

Since pmduseraccessiblepage() doesn't check if a pmd is leaf, it decrease filemapcount for a non-leaf pmd comes from collapsehugepage(). and so trigger BUGON() unexpectedly.

Fix this problem by using pmdleaf() insteal of pmdpresent() in pmduseraccessiblepage(). Moreover, use pudleaf() for puduseraccessiblepage() too.

Affected Software

11 affected componentsFixes available
Linux Linux kernel
Linux Linux kernel>=5.19<6.0.10
Linux Linux kernel=6.1-rc1
Linux Linux kernel=6.1-rc2
Linux Linux kernel=6.1-rc3
Linux Linux kernel=6.1-rc4
Linux Linux kernel=6.1-rc5
debian/linux<6.0.10-1
6.0.10-1
debian/linux<6.0.10-1
6.0.10-1
debian/linux<6.0.10-1
6.0.10-1
debian/linux
6.0.10-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.0.10-1

Event History

May 1, 2025
CVE Published
via MITRE·02:09 PM
Data Sourced
via MITRE·02:09 PM
Description
Data Sourced
via Red Hat·03:04 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·03:16 PM
Description
Data Sourced
via OSV·03:16 PM
DescriptionSeverityAffected Software
Nov 7, 2025
Data Sourced
via NVD·06:40 PM
RemedySeverityWeaknessAffected Software

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