# CVE-2022-49052: mm: fix unexpected zeroed page mapping with zram swap

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

- **Severity:** HIGH 7.1
- **CVSS:** 7.1 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: High; 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.30% (percentile 15, 2026-11-26)
- **Published:** 2025-02-26T01:54:26.322Z
- **Modified:** 2026-08-05T08:53:36.785Z

## Who should check

- Anyone running Linux \>= 0bcac06f27d7528591c27ac2b093ccd71c5d0168, \< f86d55cf616199404c05f5b0c5c41b17351baa02; \>= 0bcac06f27d7528591c27ac2b093ccd71c5d0168, \< f098f8b9820fe3f2e41aefc4329dfe8a3859d1c1; \>= 0bcac06f27d7528591c27ac2b093ccd71c5d0168, \< 20ed94f8181a25212e7404e44958e234f407624b; \>= 0bcac06f27d7528591c27ac2b093ccd71c5d0168, \< 12ba1d38115a101c45d8e0ca3aa1181fd148e57f; \>= 0bcac06f27d7528591c27ac2b093ccd71c5d0168, \< afac4b88699a06c8b9369f9d759a1ec3c254b788; \>= 0bcac06f27d7528591c27ac2b093ccd71c5d0168, \< e914d8f00391520ecc4495dd0ca0124538ab7119
- Anyone running Linux 4.15

## Description

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

mm: fix unexpected zeroed page mapping with zram swap

Two processes under CLONE\_VM cloning, user process can be corrupted by
seeing zeroed page unexpectedly.

      CPU A                        CPU B

  do\_swap\_page                do\_swap\_page
  SWP\_SYNCHRONOUS\_IO path     SWP\_SYNCHRONOUS\_IO path
  swap\_readpage valid data
    swap\_slot\_free\_notify
      delete zram entry
                              swap\_readpage zeroed(invalid) data
                              pte\_lock
                              map the \*zero data\* to userspace
                              pte\_unlock
  pte\_lock
  if (!pte\_same)
    goto out\_nomap;
  pte\_unlock
  return and next refault will
  read zeroed data

The swap\_slot\_free\_notify is bogus for CLONE\_VM case since it doesn't
increase the refcount of swap slot at copy\_mm so it couldn't catch up
whether it's safe or not to discard data from backing device.  In the
case, only the lock it could rely on to synchronize swap slot freeing is
page table lock.  Thus, this patch gets rid of the swap\_slot\_free\_notify
function.  With this patch, CPU A will see correct data.

      CPU A                        CPU B

  do\_swap\_page                do\_swap\_page
  SWP\_SYNCHRONOUS\_IO path     SWP\_SYNCHRONOUS\_IO path
                              swap\_readpage original data
                              pte\_lock
                              map the original data
                              swap\_free
                                swap\_range\_free
                                  bd\_disk-\>fops-\>swap\_slot\_free\_notify
  swap\_readpage read zeroed data
                              pte\_unlock
  pte\_lock
  if (!pte\_same)
    goto out\_nomap;
  pte\_unlock
  return
  on next refault will see mapped data by CPU B

The concern of the patch would increase memory consumption since it
could keep wasted memory with compressed form in zram as well as
uncompressed form in address space.  However, most of cases of zram uses
no readahead and do\_swap\_page is followed by swap\_free so it will free
the compressed form from in zram quickly.

## Affected and fixed versions

- Linux: \>= 0bcac06f27d7528591c27ac2b093ccd71c5d0168, \< f86d55cf616199404c05f5b0c5c41b17351baa02; \>= 0bcac06f27d7528591c27ac2b093ccd71c5d0168, \< f098f8b9820fe3f2e41aefc4329dfe8a3859d1c1; \>= 0bcac06f27d7528591c27ac2b093ccd71c5d0168, \< 20ed94f8181a25212e7404e44958e234f407624b; \>= 0bcac06f27d7528591c27ac2b093ccd71c5d0168, \< 12ba1d38115a101c45d8e0ca3aa1181fd148e57f; \>= 0bcac06f27d7528591c27ac2b093ccd71c5d0168, \< afac4b88699a06c8b9369f9d759a1ec3c254b788; \>= 0bcac06f27d7528591c27ac2b093ccd71c5d0168, \< e914d8f00391520ecc4495dd0ca0124538ab7119 (cvelist)
- Linux: 4.15 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2022-49052.md
Affected: Linux >= 0bcac06f27d7528591c27ac2b093ccd71c5d0168, < f86d55cf616199404c05f5b0c5c41b17351baa02; >= 0bcac06f27d7528591c27ac2b093ccd71c5d0168, < f098f8b9820fe3f2e41aefc4329dfe8a3859d1c1; >= 0bcac06f27d7528591c27ac2b093ccd71c5d0168, < 20ed94f8181a25212e7404e44958e234f407624b; >= 0bcac06f27d7528591c27ac…
Fixed in: Linux 20ed94f8181a25212e7404e44958e234f407624b, Linux 12ba1d38115a101c45d8e0ca3aa1181fd148e57f

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

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

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

High: CVSS 7.1 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= 0bcac06f27d7528591c27ac2b093ccd71c5d0168, \< f86d55cf616199404c05f5b0c5c41b17351baa02; \>= 0bcac06f27d7528591c27ac2b093ccd71c5d0168, \< f098f8b9820fe3f2e41aefc4329dfe8a3859d1c1; \>= 0bcac06f27d7528591c27ac2b093ccd71c5d0168, \< 20ed94f8181a25212e7404e44958e234f407624b; \>= 0bcac06f27d7528591c27ac2b093ccd71c5d0168, \< 12ba1d38115a101c45d8e0ca3aa1181fd148e57f; \>= 0bcac06f27d7528591c27ac2b093ccd71c5d0168, \< afac4b88699a06c8b9369f9d759a1ec3c254b788; \>= 0bcac06f27d7528591c27ac2b093ccd71c5d0168, \< e914d8f00391520ecc4495dd0ca0124538ab7119; Linux 4.15.

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

Yes. Fixed in Linux 20ed94f8181a25212e7404e44958e234f407624b, Linux 12ba1d38115a101c45d8e0ca3aa1181fd148e57f. No fix listed yet: follow the vendor advisory.

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

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/f86d55cf616199404c05f5b0c5c41b17351baa02>
- patch: <https://git.kernel.org/stable/c/f098f8b9820fe3f2e41aefc4329dfe8a3859d1c1>
- patch: <https://git.kernel.org/stable/c/20ed94f8181a25212e7404e44958e234f407624b>
- patch: <https://git.kernel.org/stable/c/12ba1d38115a101c45d8e0ca3aa1181fd148e57f>
- patch: <https://git.kernel.org/stable/c/afac4b88699a06c8b9369f9d759a1ec3c254b788>
- patch: <https://git.kernel.org/stable/c/e914d8f00391520ecc4495dd0ca0124538ab7119>

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

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