# CVE-2022-49778: arm64/mm: fix incorrect file\_map\_count for non-leaf pmd/pud

> 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.24% (percentile 9, 2026-11-26)
- **CWE:** CWE-617
- **Published:** 2025-05-01T14:09:13.828Z
- **Modified:** 2026-06-17T05:19:07.423Z

## Who should check

- Anyone running Linux \>= 42b2547137f5c974bb1bfd657c869fe96b96d86f, \< 2d458046df634088611d44fd77f45465e833ef78; \>= 42b2547137f5c974bb1bfd657c869fe96b96d86f, \< 5b47348fc0b18a78c96f8474cc90b7525ad1bbfe
- Anyone running Linux 5.19

## Description

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

arm64/mm: fix incorrect file\_map\_count for non-leaf pmd/pud

The page table check trigger BUG\_ON() unexpectedly when collapse hugepage:

 ------------\[ cut here \]------------
 kernel BUG at mm/page\_table\_check.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 : page\_table\_check\_clear.isra.0+0x258/0x3f0
 lr : page\_table\_check\_clear.isra.0+0x240/0x3f0
\[...\]
 Call trace:
  page\_table\_check\_clear.isra.0+0x258/0x3f0
  \_\_page\_table\_check\_pmd\_clear+0xbc/0x108
  pmdp\_collapse\_flush+0xb0/0x160
  collapse\_huge\_page+0xa08/0x1080
  hpage\_collapse\_scan\_pmd+0xf30/0x1590
  khugepaged\_scan\_mm\_slot.constprop.0+0x52c/0xac8
  khugepaged+0x338/0x518
  kthread+0x278/0x2f8
  ret\_from\_fork+0x10/0x20
\[...\]

Since pmd\_user\_accessible\_page() doesn't check if a pmd is leaf, it
decrease file\_map\_count for a non-leaf pmd comes from collapse\_huge\_page().
and so trigger BUG\_ON() unexpectedly.

Fix this problem by using pmd\_leaf() insteal of pmd\_present() in
pmd\_user\_accessible\_page(). Moreover, use pud\_leaf() for
pud\_user\_accessible\_page() too.

## Affected and fixed versions

- Linux: \>= 42b2547137f5c974bb1bfd657c869fe96b96d86f, \< 2d458046df634088611d44fd77f45465e833ef78; \>= 42b2547137f5c974bb1bfd657c869fe96b96d86f, \< 5b47348fc0b18a78c96f8474cc90b7525ad1bbfe (cvelist)
- Linux: 5.19 (cvelist)

## Mitigation

- Upgrade Linux to 5b47348fc0b18a78c96f8474cc90b7525ad1bbfe or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2022-49778.md
Affected: Linux >= 42b2547137f5c974bb1bfd657c869fe96b96d86f, < 2d458046df634088611d44fd77f45465e833ef78; >= 42b2547137f5c974bb1bfd657c869fe96b96d86f, < 5b47348fc0b18a78c96f8474cc90b7525ad1bbfe; Linux 5.19
Fixed in: Linux 2d458046df634088611d44fd77f45465e833ef78, Linux 5b47348fc0b18a78c96f8474cc90b7525ad1bbfe

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-2022-49778 being exploited?

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

### How serious is CVE-2022-49778?

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

### Which versions are affected by CVE-2022-49778?

Linux \>= 42b2547137f5c974bb1bfd657c869fe96b96d86f, \< 2d458046df634088611d44fd77f45465e833ef78; \>= 42b2547137f5c974bb1bfd657c869fe96b96d86f, \< 5b47348fc0b18a78c96f8474cc90b7525ad1bbfe; Linux 5.19.

### Is there a fix for CVE-2022-49778?

Yes. Fixed in Linux 2d458046df634088611d44fd77f45465e833ef78, Linux 5b47348fc0b18a78c96f8474cc90b7525ad1bbfe. Upgrade Linux to 5b47348fc0b18a78c96f8474cc90b7525ad1bbfe or later.

### How do I check if I'm affected by CVE-2022-49778?

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/2d458046df634088611d44fd77f45465e833ef78>
- patch: <https://git.kernel.org/stable/c/5b47348fc0b18a78c96f8474cc90b7525ad1bbfe>

## 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-2022-49778>

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