CVE-2025-40031
tee: fix register_shm_helper()
Reported by linux · Published October 28, 2025
In the Linux kernel, the following vulnerability has been resolved: tee: fix register_shm_helper() In register_shm_helper(), fix incorrect error handling for a call to iov_iter_extract_pages(). A case is missing for when iov_iter_extract_pages() 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(TEE_IOC_SHM_REGISTER) where parts of the buffer isn't mapped.
EPSS 0.21% · 11.4th percentile
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| Linux | Linux | d5cf5b37064b1699d946e8b7ab4ac7d7d101814c, 9338093db954918558677a468d32e77041c65167, 6.8 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 7bdee41575919773818e525ea19e54eb817770af, 7bdee41575919773818e525ea19e54eb817770af, 7bdee41575919773818e525ea19e54eb817770af |
| Linux | Linux | 6.8, 0, 6.12.53 |
| Linux | Linux | 7bdee41575919773818e525ea19e54eb817770af, 6.17.3, 6.18 |
| linux | linux_kernel | 6.8, 6.8, 6.8 |
Timeline
- Oct 28, 2025 EPSS Score (30 in total, the first dated here)
- Oct 28, 2025 Coalition ESS Score (7 in total, the first dated here)
- Oct 28, 2025 CVE Published
- Dec 15, 2025 Security Advisory (127 in total, the first dated here)
- Dec 15, 2025 CVE Updated
- Mar 29, 2026 Distribution Patch (118 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2025-40031
vulnetix vdb fixes CVE-2025-40031
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-40031/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart