Cloudanix VulnDB

CVE-2025-39836

None

CVSS

—

EPSS

0.2%

Published

Sep 16, 2025

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A memory-handling mistake in the Linux kernel can cause crashes or unexpected behavior during certain secure hardware communications.

Exploitation
Local Privilege
Attacker needs
Local User
Complexity
Moderate
Impact
Full Compromise
Component
OS kernel
Class
Memory Corruption
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The setup_mm_hdr() function allocates a communication buffer via kmalloc() and passes it to tee_shm_register_kernel_buf(), which requires contiguous pages; the mismatch produces memory corruptions or kernel BUGs.

Why it matters to the business

Linux systems handling EFI STMM communications may suffer kernel instability, crashes, or memory corruption that disrupts operations and increases security risk until kernels are updated.

How an attack unfolds

An attacker triggers the affected EFI STMM path so that the incorrectly allocated buffer is registered with the TEE shared-memory interface, resulting in corruption that may be leveraged for denial of service or further memory-safety violations.

How to fix it

Upgrade the Linux kernel to the commit 77ff27ff0e4529a003c8a1c2492c111968c378d3 or later; rebuild and reboot with the corrected alloc_pages_exact() allocation in setup_mm_hdr().

How to confirm the fix worked

Verify the kernel source contains alloc_pages_exact() in setup_mm_hdr(), confirm the running kernel reports the fixed commit, and test that tee_shm_register_kernel_buf() receives contiguous pages.

Typical attack path

  1. Obtain local or remote access that can invoke EFI STMM communication routines
  2. Force execution of setup_mm_hdr() to allocate the buffer with kmalloc()
  3. Pass the buffer to tee_shm_register_kernel_buf() to trigger the page-contiguity violation
  4. Exploit resulting memory corruption for denial of service or privilege escalation

How to detect it

Review kernel logs for BUG, oops, or slab corruption messages originating from EFI STMM or TEE shared-memory registration paths; correlate with processes that invoke tee_shm_register_kernel_buf().

What your security team should do

  • Prioritize kernel upgrades on all systems that use EFI STMM and TEE shared-memory interfaces
  • Apply the fix from commit 77ff27ff0e4529a003c8a1c2492c111968c378d3 and schedule staged rollouts
  • Monitor kernel logs for slab or memory-allocation BUGs related to EFI/TEE paths until remediation is complete

The record

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 packages

Ecosystem Package Introduced Fixed
Debian:13 linux 0 No fix
Debian:14 linux 0 6.16.5-1
Linux Kernel 6.8.0 6.12.45
openSUSE:Leap 16.0 dtb-aarch64 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-64kb 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-default 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-default-base 0 6.12.0-160000.6.1.160000.2.4
openSUSE:Leap 16.0 kernel-docs 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-kvmsmall 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-obs-build 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-obs-qa 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-rt 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-source 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-syms 0 6.12.0-160000.6.1
openSUSE:Leap 16.0 kernel-zfcpdump 0 6.12.0-160000.6.1

Related vulnerabilities