First published: Fri May 17 2024(Updated: )
In the Linux kernel, the following vulnerability has been resolved: x86/efistub: Call mixed mode boot services on the firmware's stack Normally, the EFI stub calls into the EFI boot services using the stack that was live when the stub was entered. According to the UEFI spec, this stack needs to be at least 128k in size - this might seem large but all asynchronous processing and event handling in EFI runs from the same stack and so quite a lot of space may be used in practice. In mixed mode, the situation is a bit different: the bootloader calls the 32-bit EFI stub entry point, which calls the decompressor's 32-bit entry point, where the boot stack is set up, using a fixed allocation of 16k. This stack is still in use when the EFI stub is started in 64-bit mode, and so all calls back into the EFI firmware will be using the decompressor's limited boot stack. Due to the placement of the boot stack right after the boot heap, any stack overruns have gone unnoticed. However, commit 5c4feadb0011983b ("x86/decompressor: Move global symbol references to C code") moved the definition of the boot heap into C code, and now the boot stack is placed right at the base of BSS, where any overruns will corrupt the end of the .data section. While it would be possible to work around this by increasing the size of the boot stack, doing so would affect all x86 systems, and mixed mode systems are a tiny (and shrinking) fraction of the x86 installed base. So instead, record the firmware stack pointer value when entering from the 32-bit firmware, and switch to this stack every time a EFI boot service call is made.
Credit: 416baaa9-dc9f-4396-8d5f-8c081fb06d67 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Affected Software | Affected Version | How to fix |
---|---|---|
ubuntu/linux | <6.8.0-35.35 | 6.8.0-35.35 |
ubuntu/linux | <6.9~ | 6.9~ |
ubuntu/linux-aws | <6.8.0-1009.9 | 6.8.0-1009.9 |
ubuntu/linux-aws | <6.9~ | 6.9~ |
ubuntu/linux-aws-5.15 | <6.9~ | 6.9~ |
ubuntu/linux-aws-5.4 | <6.9~ | 6.9~ |
ubuntu/linux-aws-6.5 | <6.9~ | 6.9~ |
ubuntu/linux-aws-fips | <6.9~ | 6.9~ |
ubuntu/linux-aws-hwe | <6.9~ | 6.9~ |
ubuntu/linux-azure | <6.8.0-1008.8 | 6.8.0-1008.8 |
ubuntu/linux-azure | <6.9~ | 6.9~ |
ubuntu/linux-azure-4.15 | <6.9~ | 6.9~ |
ubuntu/linux-azure-5.15 | <6.9~ | 6.9~ |
ubuntu/linux-azure-5.4 | <6.9~ | 6.9~ |
ubuntu/linux-azure-6.5 | <6.9~ | 6.9~ |
ubuntu/linux-azure-fde | <6.9~ | 6.9~ |
ubuntu/linux-azure-fde-5.15 | <6.9~ | 6.9~ |
ubuntu/linux-azure-fips | <6.9~ | 6.9~ |
ubuntu/linux-bluefield | <6.9~ | 6.9~ |
ubuntu/linux-fips | <6.9~ | 6.9~ |
ubuntu/linux-gcp | <6.8.0-1008.9 | 6.8.0-1008.9 |
ubuntu/linux-gcp | <6.9~ | 6.9~ |
ubuntu/linux-gcp-4.15 | <6.9~ | 6.9~ |
ubuntu/linux-gcp-5.15 | <6.9~ | 6.9~ |
ubuntu/linux-gcp-5.4 | <6.9~ | 6.9~ |
ubuntu/linux-gcp-6.5 | <6.9~ | 6.9~ |
ubuntu/linux-gcp-fips | <6.9~ | 6.9~ |
ubuntu/linux-gke | <6.8.0-1004.7 | 6.8.0-1004.7 |
ubuntu/linux-gke | <6.9~ | 6.9~ |
ubuntu/linux-gkeop | <6.9~ | 6.9~ |
ubuntu/linux-gkeop-5.15 | <6.9~ | 6.9~ |
ubuntu/linux-hwe | <6.9~ | 6.9~ |
ubuntu/linux-hwe-5.15 | <6.9~ | 6.9~ |
ubuntu/linux-hwe-5.4 | <6.9~ | 6.9~ |
ubuntu/linux-hwe-6.5 | <6.9~ | 6.9~ |
ubuntu/linux-ibm | <6.8.0-1006.6 | 6.8.0-1006.6 |
ubuntu/linux-ibm | <6.9~ | 6.9~ |
ubuntu/linux-ibm-5.15 | <6.9~ | 6.9~ |
ubuntu/linux-ibm-5.4 | <6.9~ | 6.9~ |
ubuntu/linux-intel | <6.9~ | 6.9~ |
ubuntu/linux-intel-iotg | <6.9~ | 6.9~ |
ubuntu/linux-intel-iotg-5.15 | <6.9~ | 6.9~ |
ubuntu/linux-iot | <6.9~ | 6.9~ |
ubuntu/linux-kvm | <6.9~ | 6.9~ |
ubuntu/linux-laptop | <6.9~ | 6.9~ |
ubuntu/linux-lowlatency | <6.8.0-35.35.1 | 6.8.0-35.35.1 |
ubuntu/linux-lowlatency | <6.9~ | 6.9~ |
ubuntu/linux-lowlatency-hwe-5.15 | <6.9~ | 6.9~ |
ubuntu/linux-lowlatency-hwe-6.5 | <6.9~ | 6.9~ |
ubuntu/linux-lts-xenial | <6.9~ | 6.9~ |
ubuntu/linux-nvidia | <6.9~ | 6.9~ |
ubuntu/linux-nvidia-6.5 | <6.9~ | 6.9~ |
ubuntu/linux-oem-6.5 | <6.9~ | 6.9~ |
ubuntu/linux-oem-6.8 | <6.8.0-1006.6 | 6.8.0-1006.6 |
ubuntu/linux-oem-6.8 | <6.9~ | 6.9~ |
ubuntu/linux-oracle | <6.8.0-1006.6 | 6.8.0-1006.6 |
ubuntu/linux-oracle | <6.9~ | 6.9~ |
ubuntu/linux-oracle-5.15 | <6.9~ | 6.9~ |
ubuntu/linux-oracle-5.4 | <6.9~ | 6.9~ |
ubuntu/linux-oracle-6.5 | <6.9~ | 6.9~ |
ubuntu/linux-raspi | <6.8.0-1005.5 | 6.8.0-1005.5 |
ubuntu/linux-raspi | <6.9~ | 6.9~ |
ubuntu/linux-raspi-5.4 | <6.9~ | 6.9~ |
ubuntu/linux-riscv | <6.8.0-35.35.1 | 6.8.0-35.35.1 |
ubuntu/linux-riscv | <6.9~ | 6.9~ |
ubuntu/linux-riscv-5.15 | <6.9~ | 6.9~ |
ubuntu/linux-riscv-6.5 | <6.9~ | 6.9~ |
ubuntu/linux-starfive | <6.9~ | 6.9~ |
ubuntu/linux-starfive-6.5 | <6.9~ | 6.9~ |
ubuntu/linux-xilinx-zynqmp | <6.9~ | 6.9~ |
debian/linux | <=5.10.218-1<=5.10.221-1 | 6.1.94-1 6.1.99-1 6.9.9-1 6.9.10-1 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
(Appears in the following advisories)