CVE-2023-40548
High · 7.4CVSS
7.4
EPSS
0.4%
Published
Jan 29, 2024
CISA due date
—
Cloudanix analysis
A flaw in the boot security software on some 32-bit Linux systems can let a crafted file corrupt memory when the computer starts, potentially causing crashes or unreliable operation until fixed by an update.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- High
- Impact
- Full Compromise
- Component
- Firmware
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Heap-based buffer overflow in 32-bit Shim caused by unchecked addition of a user-controlled value parsed from a PE binary, used in subsequent memory allocation, resulting in memory corruption during the boot phase.
Why it matters to the business
Potential boot-time crashes or data integrity failures on affected 32-bit Linux systems using Shim for Secure Boot, increasing operational downtime risk for organizations relying on Debian or upstream Shim builds, though low exploit maturity reduces immediate urgency.
How an attack unfolds
An attacker supplies a specially crafted PE binary containing a large value that triggers an integer overflow during size calculation in Shim's 32-bit parsing logic; when Shim processes the binary at boot, the resulting heap overflow corrupts memory and may allow control-flow hijacking or denial of service.
How to fix it
Upgrade rhboot/shim to commit 5914984a1ffeab841f482c791426d7ca9935a5e6 or later; on Debian 12/13 install shim package version 5.16.11-1 or newer; rebuild and redeploy any custom Shim builds incorporating the fix; test boot integrity after update.
How to confirm the fix worked
Verify installed Shim binary or package version against fixed versions (5.16.11-1 or commit 5914984a1ffeab841f482c791426d7ca9935a5e6); inspect boot logs for absence of corruption symptoms on 32-bit systems; re-run any existing Secure Boot validation tests.
Typical attack path
- Craft malicious PE binary with oversized header field
- Place binary in a location loaded by Shim during boot (e.g., EFI partition or bootloader chain)
- Trigger system boot or reboot on 32-bit target
- Exploit memory corruption to crash or potentially execute attacker-controlled code
How to detect it
Review early boot logs and firmware event logs for unexpected crashes or memory errors during Shim initialization; look for failed Secure Boot measurements or integrity check failures on 32-bit systems; no widespread in-the-wild exploitation artifacts have been observed.
What your security team should do
- Prioritize patching all 32-bit Debian systems and custom Shim deployments within standard change windows
- Audit bootloader configurations to ensure only signed, updated Shim binaries are used
- Monitor EPSS and KEV status for any future increase in exploit activity
The record
A buffer overflow was found in Shim in the 32-bit system. The overflow happens due to an addition operation involving a user-controlled value parsed from the PE binary being used by Shim. This value is further used for memory allocation operations, leading to a heap-based buffer overflow. This flaw causes memory corruption and can lead to a crash or data integrity issues during the boot phase.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| AlmaLinux:8 | shim-aa64 | 0 | 15.8-4.el8_9.alma.1 |
| AlmaLinux:8 | shim-ia32 | 0 | 15.8-4.el8_9.alma.1 |
| AlmaLinux:8 | shim-x64 | 0 | 15.8-4.el8_9.alma.1 |
| AlmaLinux:9 | shim-aa64 | 0 | 15.8-4.el9_3.alma.1 |
| AlmaLinux:9 | shim-x64 | 0 | 15.8-4.el9_3.alma.1 |
| Debian:10 | shim | 0 | 15.8-1~deb10u1 |
| Debian:11 | shim | 0 | 15.8-1~deb11u1 |
| Debian:12 | shim | 0 | 15.8-1~deb12u1 |
| Debian:13 | shim | 0 | 15.8-1 |
| Debian:14 | shim | 0 | 15.8-1 |
| Red Hat:enterprise_linux:7::client | mokutil | 0 | 0:15.8-1.el7 |
| Red Hat:enterprise_linux:7::client | mokutil-debuginfo | 0 | 0:15.8-1.el7 |
| Red Hat:enterprise_linux:7::client | shim | 0 | 0:15.8-3.el7 |
| Red Hat:enterprise_linux:7::client | shim-ia32 | 0 | 0:15.8-1.el7 |
| Red Hat:enterprise_linux:7::client | shim-signed | 0 | 0:15.8-1.el7 |
| Red Hat:enterprise_linux:7::client | shim-unsigned-ia32 | 0 | 0:15.8-3.el7 |
| Red Hat:enterprise_linux:7::client | shim-unsigned-x64 | 0 | 0:15.8-3.el7 |
| Red Hat:enterprise_linux:7::client | shim-x64 | 0 | 0:15.8-1.el7 |
| Red Hat:enterprise_linux:7::server | mokutil | 0 | 0:15.8-1.el7 |
| Red Hat:enterprise_linux:7::server | mokutil-debuginfo | 0 | 0:15.8-1.el7 |
| Red Hat:enterprise_linux:7::server | shim | 0 | 0:15.8-3.el7 |
| Red Hat:enterprise_linux:7::server | shim-ia32 | 0 | 0:15.8-1.el7 |
| Red Hat:enterprise_linux:7::server | shim-signed | 0 | 0:15.8-1.el7 |
| Red Hat:enterprise_linux:7::server | shim-unsigned-ia32 | 0 | 0:15.8-3.el7 |
| Red Hat:enterprise_linux:7::server | shim-unsigned-x64 | 0 | 0:15.8-3.el7 |
| Red Hat:enterprise_linux:7::server | shim-x64 | 0 | 0:15.8-1.el7 |
| Red Hat:enterprise_linux:7::workstation | mokutil | 0 | 0:15.8-1.el7 |
| Red Hat:enterprise_linux:7::workstation | mokutil-debuginfo | 0 | 0:15.8-1.el7 |
| Red Hat:enterprise_linux:7::workstation | shim | 0 | 0:15.8-3.el7 |
| Red Hat:enterprise_linux:7::workstation | shim-ia32 | 0 | 0:15.8-1.el7 |
| Red Hat:enterprise_linux:7::workstation | shim-signed | 0 | 0:15.8-1.el7 |
| Red Hat:enterprise_linux:7::workstation | shim-unsigned-ia32 | 0 | 0:15.8-3.el7 |
| Red Hat:enterprise_linux:7::workstation | shim-unsigned-x64 | 0 | 0:15.8-3.el7 |
| Red Hat:enterprise_linux:7::workstation | shim-x64 | 0 | 0:15.8-1.el7 |
| Red Hat:enterprise_linux:8::baseos | shim | 0 | 0:15.8-4.el8_9 |
| Red Hat:enterprise_linux:8::baseos | shim-aa64 | 0 | 0:15.8-4.el8_9 |
| Red Hat:enterprise_linux:8::baseos | shim-ia32 | 0 | 0:15.8-4.el8_9 |
| Red Hat:enterprise_linux:8::baseos | shim-x64 | 0 | 0:15.8-4.el8_9 |
| Red Hat:enterprise_linux:9::baseos | shim | 0 | 0:15.8-4.el9_3 |
| Red Hat:enterprise_linux:9::baseos | shim-aa64 | 0 | 0:15.8-4.el9_3 |
| Red Hat:enterprise_linux:9::baseos | shim-x64 | 0 | 0:15.8-4.el9_3 |
| Red Hat:rhel_aus:8.2::baseos | shim | 0 | 0:15.8-2.el8_2 |
| Red Hat:rhel_aus:8.2::baseos | shim-ia32 | 0 | 0:15.8-2.el8_2 |
| Red Hat:rhel_aus:8.2::baseos | shim-x64 | 0 | 0:15.8-2.el8_2 |
| Red Hat:rhel_aus:8.4::baseos | shim | 0 | 0:15.8-2.el8_4 |
| Red Hat:rhel_aus:8.4::baseos | shim-ia32 | 0 | 0:15.8-2.el8_4 |
| Red Hat:rhel_aus:8.4::baseos | shim-x64 | 0 | 0:15.8-2.el8_4 |
| Red Hat:rhel_e4s:8.2::baseos | shim | 0 | 0:15.8-2.el8_2 |
| Red Hat:rhel_e4s:8.2::baseos | shim-ia32 | 0 | 0:15.8-2.el8_2 |
| Red Hat:rhel_e4s:8.2::baseos | shim-x64 | 0 | 0:15.8-2.el8_2 |
| Red Hat:rhel_e4s:8.4::baseos | shim | 0 | 0:15.8-2.el8_4 |
| Red Hat:rhel_e4s:8.4::baseos | shim-ia32 | 0 | 0:15.8-2.el8_4 |
| Red Hat:rhel_e4s:8.4::baseos | shim-x64 | 0 | 0:15.8-2.el8_4 |
| Red Hat:rhel_eus:8.6::baseos | shim | 0 | 0:15.8-2.el8_6 |
| Red Hat:rhel_eus:8.6::baseos | shim-aa64 | 0 | 0:15.8-2.el8_6 |
| Red Hat:rhel_eus:8.6::baseos | shim-ia32 | 0 | 0:15.8-2.el8_6 |
| Red Hat:rhel_eus:8.6::baseos | shim-x64 | 0 | 0:15.8-2.el8_6 |
| Red Hat:rhel_eus:8.8::baseos | shim | 0 | 0:15.8-2.el8 |
| Red Hat:rhel_eus:8.8::baseos | shim-aa64 | 0 | 0:15.8-2.el8 |
| Red Hat:rhel_eus:8.8::baseos | shim-ia32 | 0 | 0:15.8-2.el8 |
| Red Hat:rhel_eus:8.8::baseos | shim-x64 | 0 | 0:15.8-2.el8 |
| Red Hat:rhel_eus:8.8::crb | shim-unsigned-x64 | 0 | 0:15.8-2.el8 |
| Red Hat:rhel_eus:9.0::appstream | shim-unsigned-aarch64 | 0 | 0:15.8-2.el9 |
| Red Hat:rhel_eus:9.0::baseos | shim | 0 | 0:15.8-3.el9 |
| Red Hat:rhel_eus:9.0::baseos | shim-aa64 | 0 | 0:15.8-3.el9 |
| Red Hat:rhel_eus:9.0::baseos | shim-x64 | 0 | 0:15.8-3.el9 |
| Red Hat:rhel_eus:9.0::crb | shim-unsigned-x64 | 0 | 0:15.8-2.el9 |
| Red Hat:rhel_eus:9.2::baseos | shim | 0 | 0:15.8-3.el9_2 |
| Red Hat:rhel_eus:9.2::baseos | shim-aa64 | 0 | 0:15.8-3.el9_2 |
| Red Hat:rhel_eus:9.2::baseos | shim-x64 | 0 | 0:15.8-3.el9_2 |
| Red Hat:rhel_tus:8.2::baseos | shim | 0 | 0:15.8-2.el8_2 |
| Red Hat:rhel_tus:8.2::baseos | shim-ia32 | 0 | 0:15.8-2.el8_2 |
| Red Hat:rhel_tus:8.2::baseos | shim-x64 | 0 | 0:15.8-2.el8_2 |
| Red Hat:rhel_tus:8.4::baseos | shim | 0 | 0:15.8-2.el8_4 |
| Red Hat:rhel_tus:8.4::baseos | shim-ia32 | 0 | 0:15.8-2.el8_4 |
| Red Hat:rhel_tus:8.4::baseos | shim-x64 | 0 | 0:15.8-2.el8_4 |
| SUSE:Enterprise Storage 7.1 | shim | 0 | 15.8-150300.4.20.2 |
| SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | shim | 0 | 15.8-150100.3.38.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | shim | 0 | 15.8-150300.4.20.2 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | shim | 0 | 15.8-150300.4.20.2 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | shim | 0 | 15.8-150300.4.20.2 |
| SUSE:Linux Enterprise Micro 5.1 | shim | 0 | 15.8-150300.4.20.2 |
| SUSE:Linux Enterprise Micro 5.2 | shim | 0 | 15.8-150300.4.20.2 |
| SUSE:Linux Enterprise Micro 5.3 | shim | 0 | 15.8-150300.4.20.2 |
| SUSE:Linux Enterprise Micro 5.4 | shim | 0 | 15.8-150300.4.20.2 |
| SUSE:Linux Enterprise Micro 5.5 | shim | 0 | 15.8-150300.4.20.2 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP5 | shim | 0 | 15.8-150300.4.20.2 |
| SUSE:Linux Enterprise Server 12 SP5 | shim | 0 | 15.8-25.30.1 |
| SUSE:Linux Enterprise Server 15 SP2-LTSS | shim | 0 | 15.8-150100.3.38.1 |
| SUSE:Linux Enterprise Server 15 SP3-LTSS | shim | 0 | 15.8-150300.4.20.2 |
| SUSE:Linux Enterprise Server 15 SP4-LTSS | shim | 0 | 15.8-150300.4.20.2 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | shim | 0 | 15.8-25.30.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | shim | 0 | 15.8-150100.3.38.1 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | shim | 0 | 15.8-150300.4.20.2 |
| SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | shim | 0 | 15.8-150300.4.20.2 |
| SUSE:Manager Proxy 4.3 | shim | 0 | 15.8-150300.4.20.2 |
| SUSE:Manager Server 4.3 | shim | 0 | 15.8-150300.4.20.2 |
| Ubuntu:14.04:LTS | shim | 0 | No fix |
| Ubuntu:14.04:LTS | shim-signed | 0 | No fix |
| Ubuntu:16.04:LTS | shim | 0 | No fix |
| Ubuntu:16.04:LTS | shim-signed | 0 | No fix |
| Ubuntu:18.04:LTS | shim | 0 | No fix |
| Ubuntu:18.04:LTS | shim-signed | 0 | No fix |
| Ubuntu:20.04:LTS | shim | 0 | No fix |
| Ubuntu:20.04:LTS | shim | 0 | 15.8-0ubuntu1 |
| Ubuntu:20.04:LTS | shim-signed | 0 | No fix |
| Ubuntu:20.04:LTS | shim-signed | 0 | 1.40.10 |
| Ubuntu:22.04:LTS | shim | 0 | No fix |
| Ubuntu:22.04:LTS | shim | 0 | 15.8-0ubuntu1 |
| Ubuntu:22.04:LTS | shim-signed | 0 | No fix |
| Ubuntu:22.04:LTS | shim-signed | 0 | 1.51.4 |
| Ubuntu:24.04:LTS | shim | 0 | 15.8-0ubuntu1 |
| Ubuntu:24.04:LTS | shim-signed | 0 | 1.58 |
| Ubuntu:24.10 | shim | 0 | 15.8-0ubuntu1 |
| Ubuntu:24.10 | shim-signed | 0 | 1.58 |
| Ubuntu:Pro:14.04:LTS | shim | 0 | No fix |
| Ubuntu:Pro:14.04:LTS | shim-signed | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | shim | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | shim-signed | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | shim | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | shim-signed | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | shim | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | shim-signed | 0 | No fix |
| openSUSE:Leap 15.5 | shim | 0 | 15.8-150300.4.20.2 |
| openSUSE:Leap Micro 5.3 | shim | 0 | 15.8-150300.4.20.2 |
| openSUSE:Leap Micro 5.4 | shim | 0 | 15.8-150300.4.20.2 |
Related vulnerabilities
- CVE-2023-40547 A remote code execution vulnerability was found in Shim. Also affects shim-aa64
- CVE-2022-28736 There's a use-after-free vulnerability in grub_cmd_chainloader() function; The… Also affects shim-aa64
- CVE-2022-28735 The GRUB2's shim_lock verifier allows non-kernel files to be loaded on shim-powered… Also affects shim-aa64
- CVE-2022-28733 Integer underflow in grub_net_recv_ip4_packets; A malicious crafted IP packet can lead to… Also affects shim-aa64
- CVE-2022-28734 Out-of-bounds write when handling split HTTP headers; When handling split HTTP headers… Also affects shim-aa64
- CVE-2021-3695 A crafted 16-bit grayscale PNG image may lead to a out-of-bounds write in the heap area. Also affects shim-aa64
- CVE-2024-2312 GRUB2 does not call the module fini functions on exit, leading to Debian/Ubuntu's peimage… Also affects shim
- CVE-2021-3981 A flaw in grub2 was found where its configuration file, known as grub.cfg, is being… Also affects shim