CVE-2025-39836 Details
Description
In the Linux kernel, the following vulnerability has been resolved: efi: stmm: Fix incorrect buffer allocation method The communication buffer allocated by setup_mm_hdr() is later on passed to tee_shm_register_kernel_buf(). The latter expects those buffers to be contiguous pages, but setup_mm_hdr() just uses kmalloc(). That can cause various corruptions or BUGs, specifically since commit 9aec2fb0fd5e ("slab: allocate frozen pages"), though it was broken before as well. Fix this by using alloc_pages_exact() instead of kmalloc().
A vulnerability exists in the Linux kernel's EFI STMM driver due to improper buffer allocation for communication with the Trusted Execution Environment (TEE). The function 'setup_mm_hdr()' allocates a buffer using 'kmalloc()', which does not guarantee contiguous pages as required by 'tee_shm_register_kernel_buf()'. This mismatch can lead to memory corruption or kernel bugs, a problem exacerbated by recent changes in the memory allocator. The vulnerability has been present since the introduction of the TEE-based EFI variable driver, but the incorrect allocation method was introduced in a prior version.
Users can upgrade to the latest version of the Linux kernel stable tree, where this vulnerability has been addressed by changing the buffer allocation method to use 'alloc_pages_exact()' instead of 'kmalloc()'.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jan 14, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://git.kernel.org/stable/c/630c0e6064daf84f17aad1a7d9ca76b562e3fe47 | kernel.org | Patch |
| https://git.kernel.org/stable/c/77ff27ff0e4529a003c8a1c2492c111968c378d3 | kernel.org | Patch |
| https://git.kernel.org/stable/c/c5e81e672699e0c5557b2b755cc8f7a69aa92bff | kernel.org | Patch |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-787 | Out-of-bounds Write | [email protected] |
| CWE-787 | Out-of-bounds Write | CISA-ADP |
Affected Products
| Product | Versions |
|---|---|
| linux linux kernel | >= 6.8, < 6.12.45 >= 6.13, < 6.16.5 6.17 rc1 6.17 rc2 6.17 rc3 |
CPE
Remediation
| |
Change History
6 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 19, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | kernel.org |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jan 14, 2026 | CVE Modified | CISA-ADP |
| Dec 1, 2025 | Initial Analysis | [email protected] |
| Sep 16, 2025 | New CVE Received | kernel.org |