CVE-2023-53171

vfio/type1: prevent underflow of locked_vm via exec()

MEDIUM
5.5
CVSS Score
Published: September 15, 2025 at 02:04 PM UTC
Updated: June 17, 2026 at 06:44 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.2%

Description

In the Linux kernel, the following vulnerability has been resolved: vfio/type1: prevent underflow of locked_vm via exec() When a vfio container is preserved across exec, the task does not change, but it gets a new mm with locked_vm=0, and loses the count from existing dma mappings. If the user later unmaps a dma mapping, locked_vm underflows to a large unsigned value, and a subsequent dma map request fails with ENOMEM in __account_locked_vm. To avoid underflow, grab and save the mm at the time a dma is mapped. Use that mm when adjusting locked_vm, rather than re-acquiring the saved task's mm, which may have changed. If the saved mm is dead, do nothing. locked_vm is incremented for existing mappings in a subsequent patch.

Affected

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

3.6 ≤ v < 5.10.1733.6 ≤ v < 5.15.993.6 ≤ v < 6.1.163.6 ≤ v < 6.2.33.6 ≤ v < 6.35.11 ≤ v < 5.15.995.16 ≤ v < 6.1.166.2 ≤ v < 6.2.33.673fa0d10d077d9521ee2dace2307ae2c9a965336
Vendor states this is fixed in 046eca5018f8a5dd1dc2cedf87fb5843b9ea3026 (fixed)
Vendor states this is fixed in 5a271242716846cc016736fb76be2b40ee49b0c3 (fixed)
Vendor states this is fixed in a6b2aabe664098d5cf877ae0fd96459464a30e17 (fixed)
Vendor states this is fixed in b0790dff0760b7734cf0961f497ad64628ca550b (fixed)
Vendor states this is fixed in eafb81c50da899dd80b340c841277acc4a1945b7 (fixed)
Vendor states this is fixed in 3.6 (unaffected)
Vendor states this is fixed in 5.10.173 (unaffected)
Vendor states this is fixed in 5.15.99 (unaffected)
Vendor states this is fixed in 6.1.16 (unaffected)
Vendor states this is fixed in 6.2.3 (unaffected)
Vendor states this is fixed in 6.3 (unaffected)

References (5)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/046eca5018f8a5dd1dc2cedf87fb5843b9ea3026
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/5a271242716846cc016736fb76be2b40ee49b0c3
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/a6b2aabe664098d5cf877ae0fd96459464a30e17
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/b0790dff0760b7734cf0961f497ad64628ca550b
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/eafb81c50da899dd80b340c841277acc4a1945b7

CVSS

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

Quick Info

StatusANALYZED
CWE
NVD-CWE-noinfo

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