Skip to content
Heist/ feed
Back to feed
HighFix available

zsmalloc: fix races between asynchronous zspage free and page migration

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: zsmalloc: fix races between asynchronous zspage free and page migration The asynchronous zspage free worker tries to lock a zspage's entire page list without defending against page migration. Since pages which haven't yet been locked can concurrently migrate off the zspage page list while lock_zspage() churns away, lock_zspage() can suffer from a few different lethal races. It can lock a page which no longer belongs to the zspage and unsafely dereference page_private(), it can unsafely dereference a torn pointer to the next page (since there's a data race), and it can observe a spurious NULL pointer to the next page and thus not lock all of the zspage's pages (since a single page migration will reconstruct the entire page list, and create_page_chain() unconditionally zeroes out each list pointer in the process). Fix the races by using migrate_read_lock() in lock_zspage() to synchronize with page migration.

Products
Kernel
Affected versions
Not specified
Fixed versions
4.14.282, 4.19.246, 5.10.120, 5.15.45, 5.17.13, 5.18.2, 5.4.197
CVEs
CVE-2022-49554
Confirmed fixed CVEs
Not specified
Updated in this feed
5 Nov 2026, 01:00 UTC · Revision 1

Source evidence

zsmalloc: fix races between asynchronous zspage free and page migration

core-osv · Original source

Published 26 Feb 2025, 02:14 UTC

In the Linux kernel, the following vulnerability has been resolved: zsmalloc: fix races between asynchronous zspage free and page migration The asynchronous zspage free worker tries to lock a zspage's entire page list without defending against page migration. Since pages which haven't yet been locked can concurrently migrate off the zspage page list while lock_zspage() churns away, lock_zspage() can suffer from a few different lethal races. It can lock a page which no longer belongs to the zspage and unsafely dereference page_private(), it can unsafely dereference a torn pointer to the next page (since there's a data race), and it can observe a spurious NULL pointer to the next page and thus not lock all of the zspage's pages (since a single page migration will reconstruct the entire page list, and create_page_chain() unconditionally zeroes out each list pointer in the process). Fix the races by using migrate_read_lock() in lock_zspage() to synchronize with page migration.

osv:CVE-2022-49554

Kernel

Fixed versions: 4.14.282, 4.19.246, 5.4.197, 5.10.120, 5.15.45, 5.17.13, 5.18.2

Complete source record
{
  "id": "f5f914279316af110402b566ba563cebf62c3e69346b7bf7184f7e93fd84355e",
  "url": "https://osv.dev/vulnerability/CVE-2022-49554",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "zsmalloc: fix races between asynchronous zspage free and page migration",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: zsmalloc: fix races between asynchronous zspage free and page migration The asynchronous zspage free worker tries to lock a zspage's entire page list without defending against page migration. Since pages which haven't yet been locked can concurrently migrate off the zspage page list while lock_zspage() churns away, lock_zspage() can suffer from a few different lethal races. It can lock a page which no longer belongs to the zspage and unsafely dereference page_private(), it can unsafely dereference a torn pointer to the next page (since there's a data race), and it can observe a spurious NULL pointer to the next page and thus not lock all of the zspage's pages (since a single page migration will reconstruct the entire page list, and create_page_chain() unconditionally zeroes out each list pointer in the process). Fix the races by using migrate_read_lock() in lock_zspage() to synchronize with page migration.",
    "evidence": "osv:CVE-2022-49554",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.14.282",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "4.19.246",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.4.197",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.10.120",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.45",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.17.13",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.18.2",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "CVE-2022-49554",
      "aliases": [
        "CVE-2022-49554"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "77ff465799c60294e248000cd22ae8171da3304c"
                },
                {
                  "fixed": "3674d8a8dadd03a447dd21069d4dacfc3399b63b"
                },
                {
                  "fixed": "645996efc2ae391246d595832aaa6f9d3cc338c7"
                },
                {
                  "fixed": "fc658c083904427abbf8f18280d517ee2668677c"
                },
                {
                  "fixed": "fae05b2314b147a78fbed1dc4c645d9a66313758"
                },
                {
                  "fixed": "3ec459c8810e658401be428d3168eacfc380bdd0"
                },
                {
                  "fixed": "8ba7b7c1dad1f6503c541778f31b33f7f62eb966"
                },
                {
                  "fixed": "c5402fb5f71f1a725f1e55d9c6799c0c7bec308f"
                },
                {
                  "fixed": "2505a981114dcb715f8977b8433f7540854851d8"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49554.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.14.0"
                },
                {
                  "fixed": "4.14.282"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.15.0"
                },
                {
                  "fixed": "4.19.246"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.20.0"
                },
                {
                  "fixed": "5.4.197"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.5.0"
                },
                {
                  "fixed": "5.10.120"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.45"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "5.17.13"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.18.0"
                },
                {
                  "fixed": "5.18.2"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49554.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:41.555475462Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/2505a981114dcb715f8977b8433f7540854851d8",
        "https://git.kernel.org/stable/c/3674d8a8dadd03a447dd21069d4dacfc3399b63b",
        "https://git.kernel.org/stable/c/3ec459c8810e658401be428d3168eacfc380bdd0",
        "https://git.kernel.org/stable/c/645996efc2ae391246d595832aaa6f9d3cc338c7",
        "https://git.kernel.org/stable/c/8ba7b7c1dad1f6503c541778f31b33f7f62eb966",
        "https://git.kernel.org/stable/c/c5402fb5f71f1a725f1e55d9c6799c0c7bec308f",
        "https://git.kernel.org/stable/c/fae05b2314b147a78fbed1dc4c645d9a66313758",
        "https://git.kernel.org/stable/c/fc658c083904427abbf8f18280d517ee2668677c",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49554.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-49554",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49554.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-49554",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 508848,
  "published_at": "2025-02-26T02:14:02.649+00:00"
}