# CVE-2025-39836: efi: stmm: Fix incorrect buffer allocation method

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.16%, higher than 5% of CVEs (2026-12-01)
- Published: 2025-09-16T13:08:52.326Z
- Modified: 2026-10-19T21:10:00.160Z
- Weaknesses: CWE-787
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: Linux

## 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().

(As written by CVE List.)

## Affected

- Linux Linux: from c44b6be62e8dd4ee0a308c36a70620613e6fc55f before 77ff27ff0e4529a003c8a1c2492c111968c378d3; from c44b6be62e8dd4ee0a308c36a70620613e6fc55f before 630c0e6064daf84f17aad1a7d9ca76b562e3fe47; from c44b6be62e8dd4ee0a308c36a70620613e6fc55f before c5e81e672699e0c5557b2b755cc8f7a69aa92bff; 6.8 (not affected: before 6.8; from 6.12.45 up to 6.12.*; from 6.16.5 up to 6.16.*; from 6.17 up to *)
- linux linux_kernel: from 6.8 before 6.12.45; from 6.13 before 6.16.5; 6.17

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- CISA-ADP: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://git.kernel.org/stable/c/77ff27ff0e4529a003c8a1c2492c111968c378d3> (patch)
- <https://git.kernel.org/stable/c/630c0e6064daf84f17aad1a7d9ca76b562e3fe47> (patch)
- <https://git.kernel.org/stable/c/c5e81e672699e0c5557b2b755cc8f7a69aa92bff> (patch)

## Sources

- CVE List: [CVE-2025-39836](https://www.cve.org/CVERecord?id=CVE-2025-39836), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2025-39836](https://nvd.nist.gov/vuln/detail/CVE-2025-39836), Public domain, modified 2026-10-19

---

Page: https://cve.day/CVE-2025-39836 · Whole record: https://cve.day/CVE-2025-39836.json · Rebuilt by cve.day 2026-11-25T22:59:04.740Z
