CVE-2022-49052 (GCVE-0-2022-49052)

Vulnerability from cvelistv5 – Published: 2025-02-26 01:54 – Updated: 2026-08-05 08:53
VLAI
Title
mm: fix unexpected zeroed page mapping with zram swap
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.
Assigner
Linux CNA
Impacted products
Vendor Product Version
Linux Linux Affected: 0bcac06f27d7528591c27ac2b093ccd71c5d0168 , < f86d55cf616199404c05f5b0c5c41b17351baa02 (git)
Affected: 0bcac06f27d7528591c27ac2b093ccd71c5d0168 , < f098f8b9820fe3f2e41aefc4329dfe8a3859d1c1 (git)
Affected: 0bcac06f27d7528591c27ac2b093ccd71c5d0168 , < 20ed94f8181a25212e7404e44958e234f407624b (git)
Affected: 0bcac06f27d7528591c27ac2b093ccd71c5d0168 , < 12ba1d38115a101c45d8e0ca3aa1181fd148e57f (git)
Affected: 0bcac06f27d7528591c27ac2b093ccd71c5d0168 , < afac4b88699a06c8b9369f9d759a1ec3c254b788 (git)
Affected: 0bcac06f27d7528591c27ac2b093ccd71c5d0168 , < e914d8f00391520ecc4495dd0ca0124538ab7119 (git)
Create a notification for this product.
Linux Linux Affected: 4.15
Unaffected: 0 , < 4.15 (semver)
Unaffected: 4.19.242 , ≤ 4.19.* (semver)
Unaffected: 5.4.193 , ≤ 5.4.* (semver)
Unaffected: 5.10.112 , ≤ 5.10.* (semver)
Unaffected: 5.15.35 , ≤ 5.15.* (semver)
Unaffected: 5.17.4 , ≤ 5.17.* (semver)
Unaffected: 5.18 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "mm/page_io.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "f86d55cf616199404c05f5b0c5c41b17351baa02",
              "status": "affected",
              "version": "0bcac06f27d7528591c27ac2b093ccd71c5d0168",
              "versionType": "git"
            },
            {
              "lessThan": "f098f8b9820fe3f2e41aefc4329dfe8a3859d1c1",
              "status": "affected",
              "version": "0bcac06f27d7528591c27ac2b093ccd71c5d0168",
              "versionType": "git"
            },
            {
              "lessThan": "20ed94f8181a25212e7404e44958e234f407624b",
              "status": "affected",
              "version": "0bcac06f27d7528591c27ac2b093ccd71c5d0168",
              "versionType": "git"
            },
            {
              "lessThan": "12ba1d38115a101c45d8e0ca3aa1181fd148e57f",
              "status": "affected",
              "version": "0bcac06f27d7528591c27ac2b093ccd71c5d0168",
              "versionType": "git"
            },
            {
              "lessThan": "afac4b88699a06c8b9369f9d759a1ec3c254b788",
              "status": "affected",
              "version": "0bcac06f27d7528591c27ac2b093ccd71c5d0168",
              "versionType": "git"
            },
            {
              "lessThan": "e914d8f00391520ecc4495dd0ca0124538ab7119",
              "status": "affected",
              "version": "0bcac06f27d7528591c27ac2b093ccd71c5d0168",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "mm/page_io.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "4.15"
            },
            {
              "lessThan": "4.15",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.19.*",
              "status": "unaffected",
              "version": "4.19.242",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.193",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.112",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.35",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.17.*",
              "status": "unaffected",
              "version": "5.17.4",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "5.18",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.19.242",
                  "versionStartIncluding": "4.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.4.193",
                  "versionStartIncluding": "4.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.112",
                  "versionStartIncluding": "4.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.35",
                  "versionStartIncluding": "4.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.17.4",
                  "versionStartIncluding": "4.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.18",
                  "versionStartIncluding": "4.15",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm: fix unexpected zeroed page mapping with zram swap\n\nTwo processes under CLONE_VM cloning, user process can be corrupted by\nseeing zeroed page unexpectedly.\n\n      CPU A                        CPU B\n\n  do_swap_page                do_swap_page\n  SWP_SYNCHRONOUS_IO path     SWP_SYNCHRONOUS_IO path\n  swap_readpage valid data\n    swap_slot_free_notify\n      delete zram entry\n                              swap_readpage zeroed(invalid) data\n                              pte_lock\n                              map the *zero data* to userspace\n                              pte_unlock\n  pte_lock\n  if (!pte_same)\n    goto out_nomap;\n  pte_unlock\n  return and next refault will\n  read zeroed data\n\nThe swap_slot_free_notify is bogus for CLONE_VM case since it doesn\u0027t\nincrease the refcount of swap slot at copy_mm so it couldn\u0027t catch up\nwhether it\u0027s safe or not to discard data from backing device.  In the\ncase, only the lock it could rely on to synchronize swap slot freeing is\npage table lock.  Thus, this patch gets rid of the swap_slot_free_notify\nfunction.  With this patch, CPU A will see correct data.\n\n      CPU A                        CPU B\n\n  do_swap_page                do_swap_page\n  SWP_SYNCHRONOUS_IO path     SWP_SYNCHRONOUS_IO path\n                              swap_readpage original data\n                              pte_lock\n                              map the original data\n                              swap_free\n                                swap_range_free\n                                  bd_disk-\u003efops-\u003eswap_slot_free_notify\n  swap_readpage read zeroed data\n                              pte_unlock\n  pte_lock\n  if (!pte_same)\n    goto out_nomap;\n  pte_unlock\n  return\n  on next refault will see mapped data by CPU B\n\nThe concern of the patch would increase memory consumption since it\ncould keep wasted memory with compressed form in zram as well as\nuncompressed form in address space.  However, most of cases of zram uses\nno readahead and do_swap_page is followed by swap_free so it will free\nthe compressed form from in zram quickly."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.1,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The bug is reached only through the local anonymous page-fault path (el0 fault \u2192 handle_mm_fault \u2192 do_swap_page \u2192 swap_readpage \u2192 zram), which an unprivileged process exercises by touching its own swapped pages; it is not reachable from network protocol handlers or physical device I/O.\nAC:L - An attacker who creates CLONE_VM threads, forces their anon pages into zram swap, and faults the same PTE from both CPUs fully controls both sides of the race; the public reproducer triggers it reliably, so success does not depend on conditions outside the attacker\u2019s influence.\nPR:L - Any unprivileged local user can clone with CLONE_VM, allocate memory, and induce swap faults; swapon/zram setup needs CAP_SYS_ADMIN but is a pre-existing deployment condition (e.g. Android), not a privilege the attacker must hold.\nUI:N - The attacker triggers the race solely by running their own multi-threaded process under memory pressure; no separate victim action such as mounting a filesystem or opening a crafted file is required.\nS:U - Impact stays within the local kernel/process memory authority (wrong PTE contents for the shared mm); there is no VM escape, IOMMU bypass, or other cross-boundary effect.\nC:N - After the premature zram_slot_free_notify, the second swap_readpage sees a cleared handle and zram_read_from_zspool fills the page with zeros; the swap slot is not returned to the free pool until later swap_free, so this does not disclose other processes\u2019 data.\nI:H - The race maps full pages of zeros over valid anonymous memory in a shared mm, permanently corrupting userspace state (observed as zeroed pointers and RocksDB on-disk corruption); that is total loss of integrity for the affected process memory.\nA:H - Corrupted pages cause process crashes/coredumps and service failures under zram swap pressure, denying availability of the affected multi-threaded workloads; when scoring between limited disruption and hard failure, High is appropriate."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T08:53:36.785Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/f86d55cf616199404c05f5b0c5c41b17351baa02"
        },
        {
          "url": "https://git.kernel.org/stable/c/f098f8b9820fe3f2e41aefc4329dfe8a3859d1c1"
        },
        {
          "url": "https://git.kernel.org/stable/c/20ed94f8181a25212e7404e44958e234f407624b"
        },
        {
          "url": "https://git.kernel.org/stable/c/12ba1d38115a101c45d8e0ca3aa1181fd148e57f"
        },
        {
          "url": "https://git.kernel.org/stable/c/afac4b88699a06c8b9369f9d759a1ec3c254b788"
        },
        {
          "url": "https://git.kernel.org/stable/c/e914d8f00391520ecc4495dd0ca0124538ab7119"
        }
      ],
      "title": "mm: fix unexpected zeroed page mapping with zram swap",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-49052",
    "datePublished": "2025-02-26T01:54:26.322Z",
    "dateReserved": "2025-02-26T01:49:39.242Z",
    "dateUpdated": "2026-08-05T08:53:36.785Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2022-49052",
      "date": "2026-11-19",
      "epss": "0.0029",
      "percentile": "0.2193"
    },
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-11-05T09:36:12+00:00",
      "cve": "CVE-2022-49052",
      "id": "CVE-2022-49052",
      "initial_release_date": "2022-01-01T00:00:00+00:00",
      "product_status:known_affected": "199",
      "product_status:known_not_affected": "1",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: mm: fix unexpected zeroed page mapping with zram swap",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2022/cve-2022-49052.json",
      "version": "3"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.