Vulnerability · Published May 17, 2024 · Assigned by Linux

CVE-2024-35803x86/efistub: Call mixed mode boot services on the firmware's stack

Medium 5.5

In plain English

A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 13% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS NVD)5.5Medium
Exploit odds (30 days)0.2%top 86.9% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12linux6.1.85-1DEBIAN-CVE-2024-35803
Debian:13linux6.7.12-1DEBIAN-CVE-2024-35803
Debian:14linux6.7.12-1DEBIAN-CVE-2024-35803
Ubuntu:22.04:LTSlinuxno fix listedUBUNTU-CVE-2024-35803
Ubuntu:24.04:LTSlinux6.8.0-35.35UBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-awsno fix listedUBUNTU-CVE-2024-35803
Ubuntu:24.04:LTSlinux-aws6.8.0-1009.9UBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-azureno fix listedUBUNTU-CVE-2024-35803
Ubuntu:24.04:LTSlinux-azure6.8.0-1008.8UBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-azure-fdeno fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-gcpno fix listedUBUNTU-CVE-2024-35803
Ubuntu:24.04:LTSlinux-gcp6.8.0-1008.9UBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-gkeno fix listedUBUNTU-CVE-2024-35803
Ubuntu:24.04:LTSlinux-gke6.8.0-1004.7UBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-gkeopno fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-ibmno fix listedUBUNTU-CVE-2024-35803
Ubuntu:24.04:LTSlinux-ibm6.8.0-1006.6UBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-intel-iot-realtimeno fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-intel-iotgno fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-kvmno fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-lowlatencyno fix listedUBUNTU-CVE-2024-35803
Ubuntu:24.04:LTSlinux-lowlatency6.8.0-35.35.1UBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-nvidiano fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-nvidia-tegrano fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-nvidia-tegra-igxno fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2024-35803
Ubuntu:24.04:LTSlinux-oem-6.86.8.0-1006.6UBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-oracleno fix listedUBUNTU-CVE-2024-35803
Ubuntu:24.04:LTSlinux-oracle6.8.0-1006.6UBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-raspino fix listedUBUNTU-CVE-2024-35803
Ubuntu:24.04:LTSlinux-raspi6.8.0-1005.5UBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2024-35803
Ubuntu:24.04:LTSlinux-riscv6.8.0-35.35.1UBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2024-35803
Ubuntu:22.04:LTSlinux-xilinx-zynqmpno fix listedUBUNTU-CVE-2024-35803

Affected products (as reported)

VendorProductVersions
Linux Linux b8ff87a6158886771677e6dc8139bac6e3cba717 – before 2149f8a56e2ed345c7a4d022a79f6b8fc53ae926b8ff87a6158886771677e6dc8139bac6e3cba717 – before 930775060ca348b8665f60eef14b204172d14f31b8ff87a6158886771677e6dc8139bac6e3cba717 – before fba7ee7187581b5bc222003e73e2592b398bb06db8ff87a6158886771677e6dc8139bac6e3cba717 – before 725351c036452b7db5771a7bed783564bc4b99ccb8ff87a6158886771677e6dc8139bac6e3cba717 – before cefcd4fe2e3aaf792c14c9e56dab89e3d7a65d02
Linux Linux 3.15

References