Bug 2234589 (CVE-2023-40547)

Summary: CVE-2023-40547 shim: RCE in http boot support may lead to Secure Boot bypass
Product: [Other] Security Response Reporter: Marco Benatto <mbenatto>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: chaekim, cylopez, dbodnarc, dornelas, gcovolo, jgamba, jmcdonald, kyoshida, mlewando, pasik, pdwyer, prodsec-ir-bot, sbalasub, security-response-team, torrent-santiago, troels
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: shim 15.8 Doc Type: If docs needed, set a value
Doc Text:
A remote code execution vulnerability was found in Shim. The Shim boot support trusts attacker-controlled values when parsing an HTTP response. This flaw allows an attacker to craft a specific malicious HTTP request, leading to a completely controlled out-of-bounds write primitive and complete system compromise. This flaw is only exploitable during the early boot phase, an attacker needs to perform a Man-in-the-Middle or compromise the boot server to be able to exploit this vulnerability successfully.
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-04-18 07:24:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2259914    
Bug Blocks: 2234588    

Description Marco Benatto 2023-08-24 19:13:52 UTC
The MSRC Vulnerability & Mitigations (V&M) team discovered a critical Remote Code Execution vulnerability in the latest version of the Linux shim (https://github.com/rhboot/shim). The shim's http boot support (httpboot.c) trusts attacker-controlled values when parsing an HTTP response, leading to a completely controlled out-of-bounds write primitive.

Comment 2 Marco Benatto 2024-01-23 20:05:13 UTC
Created shim tracking bugs for this issue:

Affects: fedora-all [bug 2259914]

Comment 13 Marta Lewandowska 2024-04-16 07:39:31 UTC
reproduced using shim-15.6-3.el7_9
verified using shim 15.8-1.el7: CVE is mitigated
Sanity testing passed: efi binary signatures, booting VM, netboot / httpboot all work with new shim

Comment 14 Marta Lewandowska 2024-04-16 07:54:17 UTC
Important update information:
The new shim revokes ALL PREVIOUS VERSIONS of GRUB2. Therefore GRUB2 MUST be updated to the latest version: grub2-2.02-0.87.el7_9.14 (RHSA-2024:128440-02) BEFORE OR SIMULTANEOUSLY with this shim in order for Secure Boot to continue to work. Failure to update GRUB2 will result in an UNBOOTABLE system.

Comment 15 errata-xmlrpc 2024-04-16 13:33:27 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.2 Advanced Update Support
  Red Hat Enterprise Linux 8.2 Update Services for SAP Solutions
  Red Hat Enterprise Linux 8.2 Telecommunications Update Service

Via RHSA-2024:1834 https://access.redhat.com/errata/RHSA-2024:1834

Comment 16 errata-xmlrpc 2024-04-16 13:41:37 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.0 Extended Update Support

Via RHSA-2024:1835 https://access.redhat.com/errata/RHSA-2024:1835

Comment 17 Marta Lewandowska 2024-04-17 10:10:10 UTC
all shim builds were tested against CVE reproducer as well as sanity tests: signatures on efi binaries, VM booting with SB disabled/enabled, http/netboot
shim-15.8-3 (fc)
shim-15.8-1.el7
shim-15.8-2.el8
shim-15.8-2.el8_1
shim-15.8-2.el8_2
shim-15.8-2.el8_4
shim-15.8-2.el8_6
shim-15.8-4.el8_9
shim-15.8-2.el8_10
shim-15.8-2.el9
shim-15.8-3.el9
shim-15.8-3.el9_2
shim-15.8-4.el9_3
shim-15.8-3.el9_4

Comment 18 errata-xmlrpc 2024-04-18 01:37:18 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support
  Red Hat Enterprise Linux 8.4 Update Services for SAP Solutions
  Red Hat Enterprise Linux 8.4 Telecommunications Update Service

Via RHSA-2024:1873 https://access.redhat.com/errata/RHSA-2024:1873

Comment 19 errata-xmlrpc 2024-04-18 01:42:55 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.2 Extended Update Support

Via RHSA-2024:1876 https://access.redhat.com/errata/RHSA-2024:1876

Comment 20 errata-xmlrpc 2024-04-18 01:51:04 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.8 Extended Update Support

Via RHSA-2024:1883 https://access.redhat.com/errata/RHSA-2024:1883

Comment 21 errata-xmlrpc 2024-04-18 07:54:47 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2024:1903 https://access.redhat.com/errata/RHSA-2024:1903

Comment 22 errata-xmlrpc 2024-04-18 07:57:32 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2024:1902 https://access.redhat.com/errata/RHSA-2024:1902

Comment 31 errata-xmlrpc 2024-04-23 00:47:11 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2024:1959 https://access.redhat.com/errata/RHSA-2024:1959

Comment 34 errata-xmlrpc 2024-04-29 02:16:45 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.6 Extended Update Support

Via RHSA-2024:2086 https://access.redhat.com/errata/RHSA-2024:2086