# CVE-2022-49992: mm/mprotect: only reference swap pfn page if type match

> 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)
- **Published:** 2025-06-18T11:00:52.581Z
- **Modified:** 2026-06-17T05:19:42.040Z

## Who should check

- Anyone running Linux \>= 6c287605fd56466e645693eff3ae7c08fba56e0a, \< 5fcf81e308d1f4ae95f31690d2a80b7061385ff9; \>= 6c287605fd56466e645693eff3ae7c08fba56e0a, \< 3d2f78f08cd8388035ac375e731ec1ac1b79b09d
- Anyone running Linux 5.19

## Description

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

mm/mprotect: only reference swap pfn page if type match

Yu Zhao reported a bug after the commit "mm/swap: Add swp\_offset\_pfn() to
fetch PFN from swap entry" added a check in swp\_offset\_pfn() for swap type \[1\]:

  kernel BUG at include/linux/swapops.h:117!
  CPU: 46 PID: 5245 Comm: EventManager\_De Tainted: G S         O L 6.0.0-dbg-DEV \#2
  RIP: 0010:pfn\_swap\_entry\_to\_page+0x72/0xf0
  Code: c6 48 8b 36 48 83 fe ff 74 53 48 01 d1 48 83 c1 08 48 8b 09 f6
  c1 01 75 7b 66 90 48 89 c1 48 8b 09 f6 c1 01 74 74 5d c3 eb 9e \<0f\> 0b
  48 ba ff ff ff ff 03 00 00 00 eb ae a9 ff 0f 00 00 75 13 48
  RSP: 0018:ffffa59e73fabb80 EFLAGS: 00010282
  RAX: 00000000ffffffe8 RBX: 0c00000000000000 RCX: ffffcd5440000000
  RDX: 1ffffffffff7a80a RSI: 0000000000000000 RDI: 0c0000000000042b
  RBP: ffffa59e73fabb80 R08: ffff9965ca6e8bb8 R09: 0000000000000000
  R10: ffffffffa5a2f62d R11: 0000030b372e9fff R12: ffff997b79db5738
  R13: 000000000000042b R14: 0c0000000000042b R15: 1ffffffffff7a80a
  FS:  00007f549d1bb700(0000) GS:ffff99d3cf680000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  CR2: 0000440d035b3180 CR3: 0000002243176004 CR4: 00000000003706e0
  DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
  DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
  Call Trace:
   \<TASK\>
   change\_pte\_range+0x36e/0x880
   change\_p4d\_range+0x2e8/0x670
   change\_protection\_range+0x14e/0x2c0
   mprotect\_fixup+0x1ee/0x330
   do\_mprotect\_pkey+0x34c/0x440
   \_\_x64\_sys\_mprotect+0x1d/0x30

It triggers because pfn\_swap\_entry\_to\_page() could be called upon e.g. a
genuine swap entry.

Fix it by only calling it when it's a write migration entry where the page\*
is used.

\[1\] https://lore.kernel.org/lkml/CAOUHufaVC2Za-p8m0aiHw6YkheDcrO-C3wRGixwDS32VTS+k1w@mail.gmail.com/

## Affected and fixed versions

- Linux: \>= 6c287605fd56466e645693eff3ae7c08fba56e0a, \< 5fcf81e308d1f4ae95f31690d2a80b7061385ff9; \>= 6c287605fd56466e645693eff3ae7c08fba56e0a, \< 3d2f78f08cd8388035ac375e731ec1ac1b79b09d (cvelist)
- Linux: 5.19 (cvelist)

## Mitigation

- Upgrade Linux to 3d2f78f08cd8388035ac375e731ec1ac1b79b09d 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-49992. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-49992.md
Affected: Linux >= 6c287605fd56466e645693eff3ae7c08fba56e0a, < 5fcf81e308d1f4ae95f31690d2a80b7061385ff9; >= 6c287605fd56466e645693eff3ae7c08fba56e0a, < 3d2f78f08cd8388035ac375e731ec1ac1b79b09d; Linux 5.19
Fixed in: Linux 5fcf81e308d1f4ae95f31690d2a80b7061385ff9, Linux 3d2f78f08cd8388035ac375e731ec1ac1b79b09d

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-49992 being exploited?

There is no confirmed exploitation: CVE-2022-49992 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-49992?

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

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

Linux \>= 6c287605fd56466e645693eff3ae7c08fba56e0a, \< 5fcf81e308d1f4ae95f31690d2a80b7061385ff9; \>= 6c287605fd56466e645693eff3ae7c08fba56e0a, \< 3d2f78f08cd8388035ac375e731ec1ac1b79b09d; Linux 5.19.

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

Yes. Fixed in Linux 5fcf81e308d1f4ae95f31690d2a80b7061385ff9, Linux 3d2f78f08cd8388035ac375e731ec1ac1b79b09d. Upgrade Linux to 3d2f78f08cd8388035ac375e731ec1ac1b79b09d or later.

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

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/5fcf81e308d1f4ae95f31690d2a80b7061385ff9>
- patch: <https://git.kernel.org/stable/c/3d2f78f08cd8388035ac375e731ec1ac1b79b09d>

## 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-49992>

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