CVE-2023-53171

Source
https://cve.org/CVERecord?id=CVE-2023-53171
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-53171.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2023-53171
Downstream
Related
Published
2025-09-15T14:04:04.544Z
Modified
2026-04-11T12:46:42.471284Z
Summary
vfio/type1: prevent underflow of locked_vm via exec()
Details

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 lockedvm=0, and loses the count from existing dma mappings. If the user later unmaps a dma mapping, lockedvm underflows to a large unsigned value, and a subsequent dma map request fails with ENOMEM in __accountlockedvm.

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.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53171.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
73fa0d10d077d9521ee2dace2307ae2c9a965336
Fixed
5a271242716846cc016736fb76be2b40ee49b0c3
Fixed
eafb81c50da899dd80b340c841277acc4a1945b7
Fixed
a6b2aabe664098d5cf877ae0fd96459464a30e17
Fixed
b0790dff0760b7734cf0961f497ad64628ca550b
Fixed
046eca5018f8a5dd1dc2cedf87fb5843b9ea3026

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-53171.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.6.0
Fixed
5.10.173
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.99
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.16
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.2.3

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-53171.json"