CVE-2022-49077

mmmremap.c: avoid pointless invalidate_range_start/end on mremap(old_size=0)

MEDIUM
5.5
CVSS Score
Published: February 26, 2025 at 01:54 AM UTC
Updated: June 17, 2026 at 05:17 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.3%

Description

In the Linux kernel, the following vulnerability has been resolved: mmmremap.c: avoid pointless invalidate_range_start/end on mremap(old_size=0) If an mremap() syscall with old_size=0 ends up in move_page_tables(), it will call invalidate_range_start()/invalidate_range_end() unnecessarily, i.e. with an empty range. This causes a WARN in KVM's mmu_notifier. In the past, empty ranges have been diagnosed to be off-by-one bugs, hence the WARNing. Given the low (so far) number of unique reports, the benefits of detecting more buggy callers seem to outweigh the cost of having to fix cases such as this one, where userspace is doing something silly. In this particular case, an early return from move_page_tables() is enough to fix the issue.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 4.9.3113.2 ≤ v < 4.14.2763.2 ≤ v < 4.19.2383.2 ≤ v < 4.9.3113.2 ≤ v < 5.10.1113.2 ≤ v < 5.15.343.2 ≤ v < 5.16.203.2 ≤ v < 5.17.33.2 ≤ v < 5.183.2 ≤ v < 5.4.1894.10 ≤ v < 4.14.2764.15 ≤ v < 4.19.2384.20 ≤ v < 5.4.1895.11 ≤ v < 5.15.345.16 ≤ v < 5.16.205.17 ≤ v < 5.17.35.5 ≤ v < 5.10.1113.25.18 rc17b6efc2bc4f19952b25ebf9b236e5ac43cd386c2
Vendor states this is fixed in 01e67e04c28170c47700c2c226d732bbfedb1ad0 (fixed)
Vendor states this is fixed in 04bc13dae4a27b8d030843c85ae452bb2f1d9c1f (fixed)
Vendor states this is fixed in 2358aa84ef6dafcf544a557caaa6b91afb4a0bd2 (fixed)
Vendor states this is fixed in 7d659cb1763ff17d1c6ee082fa6feb4267c7a30b (fixed)
Vendor states this is fixed in a04cb99c5d4668fe3f5c0e5b6da1cecd34c3f219 (fixed)
Vendor states this is fixed in a05540f3903bd8295e8c4cd90dd3d416239a115b (fixed)
Vendor states this is fixed in c19d8de4e682ec4b0ea2b04a832cd8cc0be3bb31 (fixed)
Vendor states this is fixed in e2c328c2a8f9de8b761bd4025b66c63120c55761 (fixed)
Vendor states this is fixed in eeaf28e2a0128147d687237e59d5407ee1b14693 (fixed)
Vendor states this is fixed in 3.2 (unaffected)
Vendor states this is fixed in 4.14.276 (unaffected)
Vendor states this is fixed in 4.19.238 (unaffected)
Vendor states this is fixed in 4.9.311 (unaffected)
Vendor states this is fixed in 5.10.111 (unaffected)
Vendor states this is fixed in 5.15.34 (unaffected)
Vendor states this is fixed in 5.16.20 (unaffected)
Vendor states this is fixed in 5.17.3 (unaffected)
Vendor states this is fixed in 5.18 (unaffected)
Vendor states this is fixed in 5.4.189 (unaffected)

References (9)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/01e67e04c28170c47700c2c226d732bbfedb1ad0
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/04bc13dae4a27b8d030843c85ae452bb2f1d9c1f
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/2358aa84ef6dafcf544a557caaa6b91afb4a0bd2
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/7d659cb1763ff17d1c6ee082fa6feb4267c7a30b
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/a04cb99c5d4668fe3f5c0e5b6da1cecd34c3f219
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/a05540f3903bd8295e8c4cd90dd3d416239a115b
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/c19d8de4e682ec4b0ea2b04a832cd8cc0be3bb31
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/e2c328c2a8f9de8b761bd4025b66c63120c55761

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-193

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card