CVE-2022-49052 json
mm: fix unexpected zeroed page mapping with zram swap
published 2025-02-26 20 mo ago modified 2026-08-05 3 mo ago also EUVD-2022-55152
- cvss
- 7.1
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 21%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- Linux Linux 4.19.242, 5.4.193, 5.10.112, 5.15.35, 5.17.4, 5.18
- linux Debian 14, Debian 13, Debian 12 5.17.6-1
debian advisories DEBIAN-CVE-2022-49052
- linux Ubuntu 18.04 LTS 4.15.0-191.202
- linux Ubuntu 20.04 LTS 5.4.0-124.140
- linux Ubuntu 22.04 LTS 5.15.0-37.39
- linux-aws Ubuntu 18.04 LTS 4.15.0-1139.150
- linux-aws Ubuntu 20.04 LTS 5.4.0-1083.90
- linux-aws Ubuntu 22.04 LTS 5.15.0-1011.14
- linux-gcp Ubuntu 20.04 LTS 5.4.0-1086.94
- linux-gcp Ubuntu 22.04 LTS 5.15.0-1008.12
ubuntu advisories UBUNTU-CVE-2022-49052
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- git.kernel.org/stable/c/f86d55cf616199404c05f5b0c5c41b17351baa02 commit
- git.kernel.org/stable/c/f098f8b9820fe3f2e41aefc4329dfe8a3859d1c1 commit
- git.kernel.org/stable/c/20ed94f8181a25212e7404e44958e234f407624b commit
- git.kernel.org/stable/c/12ba1d38115a101c45d8e0ca3aa1181fd148e57f commit
- git.kernel.org/stable/c/afac4b88699a06c8b9369f9d759a1ec3c254b788 commit
- git.kernel.org/stable/c/e914d8f00391520ecc4495dd0ca0124538ab7119 commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2022-49052 updated cvss 5.5
kernel: mm: fix unexpected zeroed page mapping with zram swap
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 moreaffected: workaround, no fix planned “Out of support scope”
-
Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 moreaffected: workaround, no fix available, no fix planned “Will not fix”
-
Red Hat Enterprise Linux 10 kernelnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
0.29% chance of exploitation in the next 30 days, higher than 21% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H |
| NVD | 3.1 | 5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Affected products
- Linux Linux
Classification
- Technology feeds
References
-
git.kernel.org
/stable/c/f86d55cf616199404c05f5b0c5c41b17351baa02
patch
-
git.kernel.org
/stable/c/f098f8b9820fe3f2e41aefc4329dfe8a3859d1c1
patch
-
git.kernel.org
/stable/c/20ed94f8181a25212e7404e44958e234f407624b
patch
-
git.kernel.org
/stable/c/12ba1d38115a101c45d8e0ca3aa1181fd148e57f
patch
-
git.kernel.org
/stable/c/afac4b88699a06c8b9369f9d759a1ec3c254b788
patch
-
git.kernel.org
/stable/c/e914d8f00391520ecc4495dd0ca0124538ab7119
patch
Sources
- CVE List CVE-2022-49052
- NVD CVE-2022-49052
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.