<?xml version="1.0" encoding="UTF-8"?>
<cvrfdoc xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:cpe="http://cpe.mitre.org/language/2.0" xmlns:cvrf="http://docs.oasis-open.org/csaf/ns/csaf-cvrf/v1.2/cvrf" xmlns:cvrf-common="http://docs.oasis-open.org/csaf/ns/csaf-cvrf/v1.2/common" xmlns:cvssv2="http://scap.nist.gov/schema/cvss-v2/1.0" xmlns:cvssv3="https://www.first.org/cvss/cvss-v3.0.xsd" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ns0="http://purl.org/dc/elements/1.1/" xmlns:prod="http://docs.oasis-open.org/csaf/ns/csaf-cvrf/v1.2/prod" xmlns:scap-core="http://scap.nist.gov/schema/scap-core/1.0" xmlns:sch="http://purl.oclc.org/dsdl/schematron" xmlns:vuln="http://docs.oasis-open.org/csaf/ns/csaf-cvrf/v1.2/vuln" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://docs.oasis-open.org/csaf/ns/csaf-cvrf/v1.2/cvrf">
  <DocumentTitle xml:lang="en">Security update for shim</DocumentTitle>
  <DocumentType>SUSE Patch</DocumentType>
  <DocumentPublisher Type="Vendor">
    <ContactDetails>security@suse.de</ContactDetails>
    <IssuingAuthority>SUSE Security Team</IssuingAuthority>
  </DocumentPublisher>
  <DocumentTracking>
    <Identification>
      <ID>SUSE-SU-2023:2150-1</ID>
    </Identification>
    <Status>Final</Status>
    <Version>1</Version>
    <RevisionHistory>
      <Revision>
        <Number>1</Number>
        <Date>2023-05-09T15:34:27Z</Date>
        <Description>current</Description>
      </Revision>
    </RevisionHistory>
    <InitialReleaseDate>2023-05-09T15:34:27Z</InitialReleaseDate>
    <CurrentReleaseDate>2023-05-09T15:34:27Z</CurrentReleaseDate>
    <Generator>
      <Engine>cve-database/bin/generate-cvrf.pl</Engine>
      <Date>2017-02-24T01:00:00Z</Date>
    </Generator>
  </DocumentTracking>
  <DocumentNotes>
    <Note Title="Topic" Type="Summary" Ordinal="1" xml:lang="en">Security update for shim</Note>
    <Note Title="Details" Type="General" Ordinal="2" xml:lang="en">This update for shim fixes the following issues:

- Updated shim signature after shim 15.7 be signed back:
  signature-sles.x86_64.asc, signature-sles.aarch64.asc (bsc#1198458)

- Add POST_PROCESS_PE_FLAGS=-N to the build command in shim.spec to
  disable the NX compatibility flag when using post-process-pe because
  grub2 is not ready. (bsc#1205588)

- Enable the NX compatibility flag by default. (jsc#PED-127) 

Update to 15.7 (bsc#1198458) (jsc#PED-127):

- Make SBAT variable payload introspectable
- Reference MokListRT instead of MokList
- Add a link to the test plan in the readme.
- [V3] Enable TDX measurement to RTMR register
- Discard load-options that start with a NUL
- Fixed load_cert_file bugs
- Add -malign-double to IA32 compiler flags
- pe: Fix image section entry-point validation
- make-archive: Build reproducible tarball
- mok: remove MokListTrusted from PCR 7

Other fixes:

- Support enhance shim measurement to TD RTMR. (jsc#PED-1273) 

- shim-install: ensure grub.cfg created is not overwritten after installing grub related files
- Add logic to shim.spec to only set sbat policy when efivarfs is writeable.  (bsc#1201066)
- Add logic to shim.spec for detecting --set-sbat-policy option before using mokutil to set sbat policy. (bsc#1202120)
- Change the URL in SBAT section to mail:security@suse.de. (bsc#1193282)

Update to 15.6 (bsc#1198458):

- MokManager: removed Locate graphic output protocol fail error message
- shim: implement SBAT verification for the shim_lock protocol
- post-process-pe: Fix a missing return code check
- Update github actions matrix to be more useful
- post-process-pe: Fix format string warnings on 32-bit platforms
- Allow MokListTrusted to be enabled by default
- Re-add ARM AArch64 support
- Use ASCII as fallback if Unicode Box Drawing characters fail
- make: don't treat cert.S specially
- shim: use SHIM_DEVEL_VERBOSE when built in devel mode
- Break out of the inner sbat loop if we find the entry.
- Support loading additional certificates
- Add support for NX (W^X) mitigations.
- Fix preserve_sbat_uefi_variable() logic
- SBAT Policy latest should be a one-shot
- pe: Fix a buffer overflow when SizeOfRawData &gt; VirtualSize
- pe: Perform image verification earlier when loading grub
- Update advertised sbat generation number for shim
- Update SBAT generation requirements for 05/24/22
- Also avoid CVE-2022-28737 in verify_image() by @vathpela

Update to 15.5 (bsc#1198458):

- Broken ia32 relocs and an unimportant submodule change.
- mok: allocate MOK config table as BootServicesData
- Don't call QueryVariableInfo() on EFI 1.10 machines (bsc#1187260)
- Relax the check for import_mok_state()  (bsc#1185261)
- SBAT.md: trivial changes
- shim: another attempt to fix load options handling
- Add tests for our load options parsing.
- arm/aa64: fix the size of .rela* sections
- mok: fix potential buffer overrun in import_mok_state
- mok: relax the maximum variable size check
- Don't unhook ExitBootServices when EBS protection is disabled
- fallback: find_boot_option() needs to return the index for the boot entry in optnum
- httpboot: Ignore case when checking HTTP headers
- Fallback allocation errors
- shim: avoid BOOTx64.EFI in message on other architectures
- str: remove duplicate parameter check
- fallback: add compile option FALLBACK_NONINTERACTIVE
- Test mok mirror
- Modify sbat.md to help with readability.
- csv: detect end of csv file correctly
- Specify that the .sbat section is ASCII not UTF-8
- tests: add 'include-fixed' GCC directory to include directories
- pe: simplify generate_hash()
- Don't make shim abort when TPM log event fails (RHBZ #2002265)
- Fallback to default loader if parsed one does not exist
- fallback: Fix for BootOrder crash when index returned
- Better console checks
- docs: update SBAT UEFI variable name
- Don't parse load options if invoked from removable media path
- fallback: fix fallback not passing arguments of the first boot option
- shim: Don't stop forever at 'Secure Boot not enabled' notification
- Allocate mokvar table in runtime memory.
- Remove post-process-pe on 'make clean'
- pe: missing perror argument


- CVE-2022-28737: Fixed a buffer overflow when SizeOfRawData &gt; VirtualSize (bsc#1198458)

- Add mokutil command to post script for setting sbat policy to latest mode
  when the SbatPolicy-605dab50-e046-4300-abb6-3dd810dd8b23 is not created.
  (bsc#1198458)

- Updated vendor dbx binary and script (bsc#1198458)

  - Updated dbx-cert.tar.xz and vendor-dbx-sles.bin for adding
    SLES-UEFI-SIGN-Certificate-2021-05.crt to vendor dbx list.
  - Updated dbx-cert.tar.xz and vendor-dbx-opensuse.bin for adding
    openSUSE-UEFI-SIGN-Certificate-2021-05.crt to vendor dbx list.
  - Updated vendor-dbx.bin for adding SLES-UEFI-SIGN-Certificate-2021-05.crt
    and openSUSE-UEFI-SIGN-Certificate-2021-05.crt for testing environment.
  - Updated generate-vendor-dbx.sh script for generating a vendor-dbx.bin
    file which includes all .der for testing environment.

- avoid buffer overflow when copying data to the MOK config table (bsc#1185232)
- Disable exporting vendor-dbx to MokListXRT since writing a large RT variable could crash some machines (bsc#1185261)
- ignore the odd LoadOptions length (bsc#1185232)
- shim-install: reset def_shim_efi to 'shim.efi' if the given file doesn't exist
- relax the maximum variable size check for u-boot (bsc#1185621)
- handle ignore_db and user_insecure_mode correctly (bsc#1185441, bsc#1187071)

- Split the keys in vendor-dbx.bin to vendor-dbx-sles and
  vendor-dbx-opensuse for shim-sles and shim-opensuse to reduce
  the size of MokListXRT (bsc#1185261) 
  + Also update generate-vendor-dbx.sh in dbx-cert.tar.xz

Update shim to 15.4-4.7.1, Version: 15.4, 'Thu Jul 15 2021'

- Update the SLE signatures
- Includes fixes for MOK and boot problems (bsc#1187696, bsc#1185261, bsc#1185441,
  bsc#1187071, bsc#1185621, bsc#1185261, bsc#1185232, bsc#1185261,
  bsc#1187260, bsc#1185232)

</Note>
    <Note Title="Terms of Use" Type="Legal Disclaimer" Ordinal="3" xml:lang="en">The CVRF data is provided by SUSE under the Creative Commons License 4.0 with Attribution (CC-BY-4.0).</Note>
    <Note Title="Patchnames" Type="Details" Ordinal="4" xml:lang="en">SUSE-2023-2150,SUSE-SLE-SERVER-12-SP2-BCL-2023-2150</Note>
  </DocumentNotes>
  <DocumentDistribution xml:lang="en">Copyright SUSE LLC under the Creative Commons License 4.0 with Attribution (CC-BY-4.0)</DocumentDistribution>
  <DocumentReferences>
    <Reference Type="Self">
      <URL>https://www.suse.com/support/update/announcement/2023/suse-su-20232150-1/</URL>
      <Description>Link for SUSE-SU-2023:2150-1</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://lists.suse.com/pipermail/sle-updates/2023-May/029298.html</URL>
      <Description>E-Mail link for SUSE-SU-2023:2150-1</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://www.suse.com/support/security/rating/</URL>
      <Description>SUSE Security Ratings</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://bugzilla.suse.com/1185232</URL>
      <Description>SUSE Bug 1185232</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://bugzilla.suse.com/1185261</URL>
      <Description>SUSE Bug 1185261</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://bugzilla.suse.com/1185441</URL>
      <Description>SUSE Bug 1185441</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://bugzilla.suse.com/1185621</URL>
      <Description>SUSE Bug 1185621</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://bugzilla.suse.com/1187071</URL>
      <Description>SUSE Bug 1187071</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://bugzilla.suse.com/1187260</URL>
      <Description>SUSE Bug 1187260</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://bugzilla.suse.com/1187696</URL>
      <Description>SUSE Bug 1187696</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://bugzilla.suse.com/1193282</URL>
      <Description>SUSE Bug 1193282</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://bugzilla.suse.com/1198458</URL>
      <Description>SUSE Bug 1198458</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://bugzilla.suse.com/1201066</URL>
      <Description>SUSE Bug 1201066</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://bugzilla.suse.com/1202120</URL>
      <Description>SUSE Bug 1202120</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://bugzilla.suse.com/1205588</URL>
      <Description>SUSE Bug 1205588</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://www.suse.com/security/cve/CVE-2022-28737/</URL>
      <Description>SUSE CVE CVE-2022-28737 page</Description>
    </Reference>
  </DocumentReferences>
  <ProductTree xmlns="http://docs.oasis-open.org/csaf/ns/csaf-cvrf/v1.2/prod">
    <Branch Type="Product Family" Name="SUSE Linux Enterprise Server 12 SP2-BCL">
      <Branch Type="Product Name" Name="SUSE Linux Enterprise Server 12 SP2-BCL">
        <FullProductName ProductID="SUSE Linux Enterprise Server 12 SP2-BCL" CPE="cpe:/o:suse:sles-bcl:12:sp2">SUSE Linux Enterprise Server 12 SP2-BCL</FullProductName>
      </Branch>
    </Branch>
    <Branch Type="Product Version" Name="shim-15.7-22.15.1">
      <FullProductName ProductID="shim-15.7-22.15.1">shim-15.7-22.15.1</FullProductName>
    </Branch>
    <Relationship ProductReference="shim-15.7-22.15.1" RelationType="Default Component Of" RelatesToProductReference="SUSE Linux Enterprise Server 12 SP2-BCL">
      <FullProductName ProductID="SUSE Linux Enterprise Server 12 SP2-BCL:shim-15.7-22.15.1">shim-15.7-22.15.1 as a component of SUSE Linux Enterprise Server 12 SP2-BCL</FullProductName>
    </Relationship>
  </ProductTree>
  <vuln:Vulnerability xmlns="http://docs.oasis-open.org/csaf/ns/csaf-cvrf/v1.2/vuln" Ordinal="1">
    <Notes>
      <Note Title="Vulnerability Description" Type="General" Ordinal="1" xml:lang="en">There's a possible overflow in handle_image() when shim tries to load and execute crafted EFI executables; The handle_image() function takes into account the SizeOfRawData field from each section to be loaded. An attacker can leverage this to perform out-of-bound writes into memory. Arbitrary code execution is not discarded in such scenario.</Note>
    </Notes>
    <CVE>CVE-2022-28737</CVE>
    <ProductStatuses>
      <Status Type="Fixed">
        <ProductID>SUSE Linux Enterprise Server 12 SP2-BCL:shim-15.7-22.15.1</ProductID>
      </Status>
    </ProductStatuses>
    <Threats>
      <Threat Type="Impact">
        <Description>important</Description>
      </Threat>
    </Threats>
    <CVSSScoreSets>
      <ScoreSetV3>
        <BaseScoreV3>8.4</BaseScoreV3>
        <VectorV3>CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H</VectorV3>
      </ScoreSetV3>
    </CVSSScoreSets>
    <Remediations>
      <Remediation Type="Vendor Fix">
        <Description xml:lang="en">To install this SUSE Security Update use the SUSE recommended installation methods like YaST online_update or "zypper patch".
</Description>
        <URL>https://www.suse.com/support/update/announcement/2023/suse-su-20232150-1/</URL>
      </Remediation>
    </Remediations>
    <References>
      <Reference>
        <URL>https://www.suse.com/security/cve/CVE-2022-28737.html</URL>
        <Description>CVE-2022-28737</Description>
      </Reference>
      <Reference>
        <URL>https://bugzilla.suse.com/1198458</URL>
        <Description>SUSE Bug 1198458</Description>
      </Reference>
      <Reference>
        <URL>https://bugzilla.suse.com/1205065</URL>
        <Description>SUSE Bug 1205065</Description>
      </Reference>
      <Reference>
        <URL>https://bugzilla.suse.com/1205066</URL>
        <Description>SUSE Bug 1205066</Description>
      </Reference>
      <Reference>
        <URL>https://bugzilla.suse.com/1205831</URL>
        <Description>SUSE Bug 1205831</Description>
      </Reference>
    </References>
  </vuln:Vulnerability>
</cvrfdoc>
