CVE-2024-35803
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
17/05/2024
Last modified:
26/09/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
x86/efistub: Call mixed mode boot services on the firmware&#39;s stack<br />
<br />
Normally, the EFI stub calls into the EFI boot services using the stack<br />
that was live when the stub was entered. According to the UEFI spec,<br />
this stack needs to be at least 128k in size - this might seem large but<br />
all asynchronous processing and event handling in EFI runs from the same<br />
stack and so quite a lot of space may be used in practice.<br />
<br />
In mixed mode, the situation is a bit different: the bootloader calls<br />
the 32-bit EFI stub entry point, which calls the decompressor&#39;s 32-bit<br />
entry point, where the boot stack is set up, using a fixed allocation<br />
of 16k. This stack is still in use when the EFI stub is started in<br />
64-bit mode, and so all calls back into the EFI firmware will be using<br />
the decompressor&#39;s limited boot stack.<br />
<br />
Due to the placement of the boot stack right after the boot heap, any<br />
stack overruns have gone unnoticed. However, commit<br />
<br />
5c4feadb0011983b ("x86/decompressor: Move global symbol references to C code")<br />
<br />
moved the definition of the boot heap into C code, and now the boot<br />
stack is placed right at the base of BSS, where any overruns will<br />
corrupt the end of the .data section.<br />
<br />
While it would be possible to work around this by increasing the size of<br />
the boot stack, doing so would affect all x86 systems, and mixed mode<br />
systems are a tiny (and shrinking) fraction of the x86 installed base.<br />
<br />
So instead, record the firmware stack pointer value when entering from<br />
the 32-bit firmware, and switch to this stack every time a EFI boot<br />
service call is made.
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.1.84 (excluding) | |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.6.24 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.7.12 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.8 (including) | 6.8.3 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/2149f8a56e2ed345c7a4d022a79f6b8fc53ae926
- https://git.kernel.org/stable/c/725351c036452b7db5771a7bed783564bc4b99cc
- https://git.kernel.org/stable/c/930775060ca348b8665f60eef14b204172d14f31
- https://git.kernel.org/stable/c/cefcd4fe2e3aaf792c14c9e56dab89e3d7a65d02
- https://git.kernel.org/stable/c/fba7ee7187581b5bc222003e73e2592b398bb06d
- https://git.kernel.org/stable/c/2149f8a56e2ed345c7a4d022a79f6b8fc53ae926
- https://git.kernel.org/stable/c/725351c036452b7db5771a7bed783564bc4b99cc
- https://git.kernel.org/stable/c/930775060ca348b8665f60eef14b204172d14f31
- https://git.kernel.org/stable/c/cefcd4fe2e3aaf792c14c9e56dab89e3d7a65d02
- https://git.kernel.org/stable/c/fba7ee7187581b5bc222003e73e2592b398bb06d



