{"id":"CVE-2022-49554","state":"PUBLISHED","title":"zsmalloc: fix races between asynchronous zspage free and page migration","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nzsmalloc: fix races between asynchronous zspage free and page migration\n\nThe asynchronous zspage free worker tries to lock a zspage's entire page\nlist without defending against page migration.  Since pages which haven't\nyet been locked can concurrently migrate off the zspage page list while\nlock_zspage() churns away, lock_zspage() can suffer from a few different\nlethal races.\n\nIt can lock a page which no longer belongs to the zspage and unsafely\ndereference page_private(), it can unsafely dereference a torn pointer to\nthe next page (since there's a data race), and it can observe a spurious\nNULL pointer to the next page and thus not lock all of the zspage's pages\n(since a single page migration will reconstruct the entire page list, and\ncreate_page_chain() unconditionally zeroes out each list pointer in the\nprocess).\n\nFix the races by using migrate_read_lock() in lock_zspage() to synchronize\nwith page migration.","publishedAt":"2025-02-26T02:14:02.649Z","updatedAt":"2026-10-15T21:21:07.734Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"77ff465799c60294e248000cd22ae8171da3304c","status":"affected","lessThan":"3674d8a8dadd03a447dd21069d4dacfc3399b63b","versionType":"git"},{"version":"77ff465799c60294e248000cd22ae8171da3304c","status":"affected","lessThan":"645996efc2ae391246d595832aaa6f9d3cc338c7","versionType":"git"},{"version":"77ff465799c60294e248000cd22ae8171da3304c","status":"affected","lessThan":"fc658c083904427abbf8f18280d517ee2668677c","versionType":"git"},{"version":"77ff465799c60294e248000cd22ae8171da3304c","status":"affected","lessThan":"fae05b2314b147a78fbed1dc4c645d9a66313758","versionType":"git"},{"version":"77ff465799c60294e248000cd22ae8171da3304c","status":"affected","lessThan":"3ec459c8810e658401be428d3168eacfc380bdd0","versionType":"git"},{"version":"77ff465799c60294e248000cd22ae8171da3304c","status":"affected","lessThan":"8ba7b7c1dad1f6503c541778f31b33f7f62eb966","versionType":"git"},{"version":"77ff465799c60294e248000cd22ae8171da3304c","status":"affected","lessThan":"c5402fb5f71f1a725f1e55d9c6799c0c7bec308f","versionType":"git"},{"version":"77ff465799c60294e248000cd22ae8171da3304c","status":"affected","lessThan":"2505a981114dcb715f8977b8433f7540854851d8","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/zsmalloc.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.14","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.14","versionType":"semver"},{"version":"4.14.282","status":"unaffected","lessThanOrEqual":"4.14.*","versionType":"semver"},{"version":"4.19.246","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.197","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.120","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.45","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.17.13","status":"unaffected","lessThanOrEqual":"5.17.*","versionType":"semver"},{"version":"5.18.2","status":"unaffected","lessThanOrEqual":"5.18.*","versionType":"semver"},{"version":"5.19","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/zsmalloc.c"]}],"references":["https://git.kernel.org/stable/c/3674d8a8dadd03a447dd21069d4dacfc3399b63b","https://git.kernel.org/stable/c/645996efc2ae391246d595832aaa6f9d3cc338c7","https://git.kernel.org/stable/c/fc658c083904427abbf8f18280d517ee2668677c","https://git.kernel.org/stable/c/fae05b2314b147a78fbed1dc4c645d9a66313758","https://git.kernel.org/stable/c/3ec459c8810e658401be428d3168eacfc380bdd0","https://git.kernel.org/stable/c/8ba7b7c1dad1f6503c541778f31b33f7f62eb966","https://git.kernel.org/stable/c/c5402fb5f71f1a725f1e55d9c6799c0c7bec308f","https://git.kernel.org/stable/c/2505a981114dcb715f8977b8433f7540854851d8"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/49xxx/CVE-2022-49554.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-49554","state":"PUBLISHED","datePublished":"2025-02-26T02:14:02.649Z","dateUpdated":"2026-10-15T21:21:07.734Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-02-26T02:08:31.590Z"},"containers":{"cna":{"title":"zsmalloc: fix races between asynchronous zspage free and page migration","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nzsmalloc: fix races between asynchronous zspage free and page migration\n\nThe asynchronous zspage free worker tries to lock a zspage's entire page\nlist without defending against page migration.  Since pages which haven't\nyet been locked can concurrently migrate off the zspage page list while\nlock_zspage() churns away, lock_zspage() can suffer from a few different\nlethal races.\n\nIt can lock a page which no longer belongs to the zspage and unsafely\ndereference page_private(), it can unsafely dereference a torn pointer to\nthe next page (since there's a data race), and it can observe a spurious\nNULL pointer to the next page and thus not lock all of the zspage's pages\n(since a single page migration will reconstruct the entire page list, and\ncreate_page_chain() unconditionally zeroes out each list pointer in the\nprocess).\n\nFix the races by using migrate_read_lock() in lock_zspage() to synchronize\nwith page migration."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"77ff465799c60294e248000cd22ae8171da3304c","status":"affected","lessThan":"3674d8a8dadd03a447dd21069d4dacfc3399b63b","versionType":"git"},{"version":"77ff465799c60294e248000cd22ae8171da3304c","status":"affected","lessThan":"645996efc2ae391246d595832aaa6f9d3cc338c7","versionType":"git"},{"version":"77ff465799c60294e248000cd22ae8171da3304c","status":"affected","lessThan":"fc658c083904427abbf8f18280d517ee2668677c","versionType":"git"},{"version":"77ff465799c60294e248000cd22ae8171da3304c","status":"affected","lessThan":"fae05b2314b147a78fbed1dc4c645d9a66313758","versionType":"git"},{"version":"77ff465799c60294e248000cd22ae8171da3304c","status":"affected","lessThan":"3ec459c8810e658401be428d3168eacfc380bdd0","versionType":"git"},{"version":"77ff465799c60294e248000cd22ae8171da3304c","status":"affected","lessThan":"8ba7b7c1dad1f6503c541778f31b33f7f62eb966","versionType":"git"},{"version":"77ff465799c60294e248000cd22ae8171da3304c","status":"affected","lessThan":"c5402fb5f71f1a725f1e55d9c6799c0c7bec308f","versionType":"git"},{"version":"77ff465799c60294e248000cd22ae8171da3304c","status":"affected","lessThan":"2505a981114dcb715f8977b8433f7540854851d8","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/zsmalloc.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.14","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.14","versionType":"semver"},{"version":"4.14.282","status":"unaffected","lessThanOrEqual":"4.14.*","versionType":"semver"},{"version":"4.19.246","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.197","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.120","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.45","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.17.13","status":"unaffected","lessThanOrEqual":"5.17.*","versionType":"semver"},{"version":"5.18.2","status":"unaffected","lessThanOrEqual":"5.18.*","versionType":"semver"},{"version":"5.19","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["mm/zsmalloc.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/3674d8a8dadd03a447dd21069d4dacfc3399b63b"},{"url":"https://git.kernel.org/stable/c/645996efc2ae391246d595832aaa6f9d3cc338c7"},{"url":"https://git.kernel.org/stable/c/fc658c083904427abbf8f18280d517ee2668677c"},{"url":"https://git.kernel.org/stable/c/fae05b2314b147a78fbed1dc4c645d9a66313758"},{"url":"https://git.kernel.org/stable/c/3ec459c8810e658401be428d3168eacfc380bdd0"},{"url":"https://git.kernel.org/stable/c/8ba7b7c1dad1f6503c541778f31b33f7f62eb966"},{"url":"https://git.kernel.org/stable/c/c5402fb5f71f1a725f1e55d9c6799c0c7bec308f"},{"url":"https://git.kernel.org/stable/c/2505a981114dcb715f8977b8433f7540854851d8"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable path is in mm/zsmalloc.c (async_free_zspage → lock_zspage racing with zs_page_migrate), reached when an unprivileged local process drives zram/zswap alloc/free via swap or compressed-page I/O and concurrent compaction; it is not reachable from the network stack.\nAC:L - A local attacker can drive both sides of the race by allocating/freeing zsmalloc-backed swap objects (zs_free → deferred free) while inducing compaction/migration of those movable zspages, so success does not depend on conditions outside attacker influence.\nPR:L - On common deployments (e.g. Android with zram swap, or zswap with zsmalloc), any unprivileged local user can trigger zs_malloc/zs_free and memory pressure without capabilities or init-namespace root.\nUI:N - Exploitation requires no victim action beyond the system already using zsmalloc-backed zram/zswap; the attacker triggers the race solely through their own memory and I/O activity.\nS:U - Impact stays within the host kernel's authority (local memory corruption / privilege escalation); this is not a VM escape, IOMMU bypass, or other cross-boundary break.\nC:H - The race can lock the wrong page and dereference page_private(), follow a torn page->index pointer, or free a zspage while unlocked pages remain in use—UAF/memory-corruption primitives that enable arbitrary kernel reads.\nI:H - Incomplete locking of the zspage chain while migration rebuilds it via create_page_chain() allows freeing or resetting pages still under migration, yielding heap corruption exploitable for arbitrary writes and control-flow hijacking.\nA:H - The same races produce NULL/invalid pointer dereferences, use-after-free crashes, and kernel oops/panic when page_private or list links are observed inconsistently during free versus migration."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T08:55:40.785Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.14","versionEndExcluding":"4.14.282"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.14","versionEndExcluding":"4.19.246"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.14","versionEndExcluding":"5.4.197"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.14","versionEndExcluding":"5.10.120"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.14","versionEndExcluding":"5.15.45"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.14","versionEndExcluding":"5.17.13"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.14","versionEndExcluding":"5.18.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.14","versionEndExcluding":"5.19"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2022-49554","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-15T21:18:04.837104Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-15T21:21:07.734Z"}}]}}}