{"id":"CVE-2023-53171","aliases":["CVE-2023-53171"],"related":[],"kind":"vulnerability","state":"published","title":"vfio/type1: prevent underflow of locked_vm via exec()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nvfio/type1: prevent underflow of locked_vm via exec()\n\nWhen a vfio container is preserved across exec, the task does not change,\nbut it gets a new mm with locked_vm=0, and loses the count from existing\ndma mappings.  If the user later unmaps a dma mapping, locked_vm underflows\nto a large unsigned value, and a subsequent dma map request fails with\nENOMEM in __account_locked_vm.\n\nTo avoid underflow, grab and save the mm at the time a dma is mapped.\nUse that mm when adjusting locked_vm, rather than re-acquiring the saved\ntask's mm, which may have changed.  If the saved mm is dead, do nothing.\n\nlocked_vm is incremented for existing mappings in a subsequent patch.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nvfio/type1: prevent underflow of locked_vm via exec()\n\nWhen a vfio container is preserved across exec, the task does not change,\nbut it gets a new mm with locked_vm=0, and loses the count from existing\ndma mappings.  If the user later unmaps a dma mapping, locked_vm underflows\nto a large unsigned value, and a subsequent dma map request fails with\nENOMEM in __account_locked_vm.\n\nTo avoid underflow, grab and save the mm at the time a dma is mapped.\nUse that mm when adjusting locked_vm, rather than re-acquiring the saved\ntask's mm, which may have changed.  If the saved mm is dead, do nothing.\n\nlocked_vm is incremented for existing mappings in a subsequent patch.","source":"cvelist"}],"published":"2025-09-15T14:04:04.544Z","modified":"2026-11-05T21:17:17.777Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"73fa0d10d077d9521ee2dace2307ae2c9a965336","fixed":"5a271242716846cc016736fb76be2b40ee49b0c3","status":"affected"},{"type":"git","introduced":"73fa0d10d077d9521ee2dace2307ae2c9a965336","fixed":"eafb81c50da899dd80b340c841277acc4a1945b7","status":"affected"},{"type":"git","introduced":"73fa0d10d077d9521ee2dace2307ae2c9a965336","fixed":"a6b2aabe664098d5cf877ae0fd96459464a30e17","status":"affected"},{"type":"git","introduced":"73fa0d10d077d9521ee2dace2307ae2c9a965336","fixed":"b0790dff0760b7734cf0961f497ad64628ca550b","status":"affected"},{"type":"git","introduced":"73fa0d10d077d9521ee2dace2307ae2c9a965336","fixed":"046eca5018f8a5dd1dc2cedf87fb5843b9ea3026","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"3.6","status":"affected"},{"type":"semver","introduced":"0","fixed":"3.6","status":"unaffected"},{"type":"semver","introduced":"5.10.173","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.99","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.16","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.2.3","lastAffected":"6.2.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.3","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"3.6","fixed":"5.10.173"},{"status":"affected","introduced":"5.11","fixed":"5.15.99"},{"status":"affected","introduced":"5.16","fixed":"6.1.16"},{"status":"affected","introduced":"6.2","fixed":"6.2.3"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/5a271242716846cc016736fb76be2b40ee49b0c3","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/eafb81c50da899dd80b340c841277acc4a1945b7","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a6b2aabe664098d5cf877ae0fd96459464a30e17","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b0790dff0760b7734cf0961f497ad64628ca550b","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/046eca5018f8a5dd1dc2cedf87fb5843b9ea3026","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-05T20:19:31.308Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-53171","url":"https://www.cve.org/CVERecord?id=CVE-2023-53171","licence":"CVE Terms of Use","modified":"2026-11-05T20:21:06.077Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-53171","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-53171","licence":"Public domain","modified":"2026-11-05T21:17:17.777Z"}],"updatedAt":"2026-11-25T22:58:34.757Z","epss":{"score":0.00167,"percentile":0.06296,"date":"2026-12-01T12:00:22.000Z"}}