CVE-2022-49554CWE-362

CVE-2022-49554

High · published February 26, 2025

CVSS v3.1
7.8
EPSS
0%
Percentile
11.5
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v3.1
7.8 · HIGH
Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00217 · 11.5th percentile
Weakness
CWE-362 · Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Published
2025-02-26T12:01Z
Affected products (7)
ProductVersionsFixed in
linux/linux_kernel≥ 4.14, < 4.14.2824.14.282
linux/linux_kernel≥ 4.15, < 4.19.2464.19.246
linux/linux_kernel≥ 4.20, < 5.4.1975.4.197
linux/linux_kernel≥ 5.5, < 5.10.1205.10.120
linux/linux_kernel≥ 5.11, < 5.15.455.15.45
linux/linux_kernel≥ 5.16, < 5.17.135.17.13
linux/linux_kernel≥ 5.18, < 5.18.25.18.2
References (8)
EPSS history
Timeline
  • 26 FEB 02:14Z
    zsmalloc: fix races between asynchronous zspage free and page migration
    cvelistv5