efi: stmm: Fix incorrect buffer allocation method
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.12.456.16.56.17In 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().
From the CVE record · Linux
The Linux kernel's EFI STMM code allocates a communication buffer with kmalloc(), but a later function expects contiguous pages. This mismatch can cause memory corruption or kernel BUGs. The input does not specify an attack path, authentication requirements, or whether user interaction is needed.
Engineers running Linux kernels with EFI STMM should check their versions against the vendor advisory; affected versions are not specified in the input.