CVE-2025-40031

Source
https://cve.org/CVERecord?id=CVE-2025-40031
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40031.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-40031
Downstream
Related
Published
2025-10-28T11:48:13.644Z
Modified
2026-05-15T04:13:45.121358947Z
Summary
tee: fix register_shm_helper()
Details

In the Linux kernel, the following vulnerability has been resolved:

tee: fix registershmhelper()

In registershmhelper(), fix incorrect error handling for a call to ioviterextractpages(). A case is missing for when ioviterextractpages() only got some pages and return a number larger than 0, but not the requested amount.

This fixes a possible NULL pointer dereference following a bad input from ioctl(TEEIOCSHM_REGISTER) where parts of the buffer isn't mapped.

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

Affected packages

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.8.0
Fixed
6.12.53
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.17.3

Database specific

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