CVE-2025-39836
JSON

7.8high

efi: stmm: Fix incorrect buffer allocation method

Severity
7.8high CVSS:3.1 by Linux
Exploit likelihood
0.16% (higher than 5% of CVEs; EPSS, by FIRST)
Published
Last changed
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().

Affected

Product or packageVersionsReported by
Linux Linuxfrom 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 *
CVE List
linux linux_kernelfrom 6.8 before 6.12.45, from 6.13 before 6.16.5, 6.17NVD

All scores

Linux7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CISA-ADP7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-787

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

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

NVD (es)

En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: efi: stmm: Corrección del método incorrecto de asignación de búfer El búfer de comunicación asignado por setup_mm_hdr() se pasa posteriormente a tee_shm_register_kernel_buf(). Este último espera que esos búferes sean páginas contiguas, pero setup_mm_hdr() simplemente usa kmalloc(). Esto puede causar varias corrupciones o BUGs, específicamente desde el commit 9aec2fb0fd5e ('slab: allocate frozen pages'), aunque ya estaba roto antes también. Solucione esto utilizando alloc_pages_exact() en lugar de kmalloc().

References

Sources

SourceRecordLicence
CVE ListCVE-2025-39836 changed 2026-08-05CVE Terms of Use
NVDCVE-2025-39836 changed 2026-10-19Public domain