Bug 2241797 (CVE-2023-40549)

Summary: CVE-2023-40549 shim: Out-of-bounds read in verify_buffer_authenticode() malformed PE file
Product: [Other] Security Response Reporter: Marco Benatto <mbenatto>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: mlewando, security-response-team
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:
An out-of-bounds read flaw was found in Shim due to the lack of proper boundary verification during the load of a PE binary. This flaw allows an attacker to load a crafted PE binary, triggering the issue and crashing Shim, resulting in a denial of service.
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-04-18 07:24:05 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: 2259923    
Bug Blocks: 2234588    

Description Marco Benatto 2023-10-02 18:15:36 UTC
An out-of-bounds read issue exists in the verify_buffer_authenticode() function in shim.c. This issue is due to adding an offset to a pointer and then accessing the result without proper bounds checking. This bug is reachable by providing a malformed PE file to shim. This code runs before signature validation of the PE file.

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

Affects: fedora-all [bug 2259923]

Comment 3 Marta Lewandowska 2024-04-16 07:42:19 UTC
shim 15.8-1.el7 passed sanity testing: signatures on efi binaries are correct, booting VM, netboot / httpboot over ipv4 and ipv6 all pass

Comment 4 Marta Lewandowska 2024-04-16 07:54:34 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 5 errata-xmlrpc 2024-04-16 13:33:31 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 6 errata-xmlrpc 2024-04-16 13:41:42 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 7 Marta Lewandowska 2024-04-17 10:11:01 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=2234589#c17

Comment 8 errata-xmlrpc 2024-04-18 01:37:23 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 9 errata-xmlrpc 2024-04-18 01:43:00 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 10 errata-xmlrpc 2024-04-18 01:51:09 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 11 errata-xmlrpc 2024-04-18 07:54:52 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 12 errata-xmlrpc 2024-04-18 07:57:27 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 16 errata-xmlrpc 2024-04-23 00:47:14 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 17 errata-xmlrpc 2024-04-29 02:16:50 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