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

- Priority: **Routine**
- Reason: Not severe (CVSS 7.8, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-09-16 · Modified: 2026-08-05
- Aliases: UBUNTU-CVE-2025-39836, DEBIAN-CVE-2025-39836
- Record: https://cvemate.com/vulnerability/CVE-2025-39836 · JSON: https://cvemate.com/vulnerability/CVE-2025-39836/json

## Description

```text
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().
```

## Signals

- CVSS: 7.8 high (v3.1, CVE.org) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.161%, percentile 5.436%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 126)

- debian linux (Debian): \< 6.12.48-1 \| \< 6.16.5-1
- ubuntu linux (Ubuntu): \< 6.8.0-106.106
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): \< 6.8.0-1050.53
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.14 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): \< 6.8.0-1050.53~22.04.1
- ubuntu linux-aws-fips (Ubuntu): \< 6.8.0-1050.53+fips1
- ubuntu linux-azure (Ubuntu): All versions (No fix recorded) \| \< 6.8.0-1051.57
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.3 (Ubuntu): All versions (No fix recorded)

## References

- <https://git.kernel.org/stable/c/77ff27ff0e4529a003c8a1c2492c111968c378d3>
- <https://git.kernel.org/stable/c/630c0e6064daf84f17aad1a7d9ca76b562e3fe47>
- <https://git.kernel.org/stable/c/c5e81e672699e0c5557b2b755cc8f7a69aa92bff>
- <https://ubuntu.com/security/CVE-2025-39836>
- <https://www.cve.org/CVERecord?id=CVE-2025-39836>
- <https://git.kernel.org/linus/c5e81e672699e0c5557b2b755cc8f7a69aa92bff>
- <https://ubuntu.com/security/notices/USN-8095-1>
- <https://ubuntu.com/security/notices/USN-8100-1>
- <https://ubuntu.com/security/notices/USN-8095-2>
- <https://ubuntu.com/security/notices/USN-8095-3>
- <https://ubuntu.com/security/notices/USN-8095-4>
- <https://ubuntu.com/security/notices/USN-8125-1>
- <https://ubuntu.com/security/notices/USN-8126-1>
- <https://ubuntu.com/security/notices/USN-8095-5>
- <https://ubuntu.com/security/notices/USN-8165-1>
- <https://ubuntu.com/security/notices/USN-8261-1>
- <https://security-tracker.debian.org/tracker/CVE-2025-39836>

---

Data as of 2026-12-05T04:39:36.635Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
