CVE-2025-39836 is a high-severity vulnerability in the Linux kernel related to incorrect buffer allocation in the EFI STMM subsystem. The issue arises because setup_mm_hdr() uses kmalloc() to allocate a communication buffer, but the buffer is expected to be contiguous pages by tee_shm_register_kernel_buf(). This mismatch can lead to memory corruption or kernel BUGs. The flaw has been present since before commit 9aec2fb0fd5e and was fixed by changing the allocation method to alloc_pages_exact().