Bug 2056491 (CVE-2022-23645)

Summary: CVE-2022-23645 swtpm: Unchecked header size indicator against expected size
Product: [Other] Security Response Reporter: Avinash Hanwate <ahanwate>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: davide, ddepaula, marcandre.lureau, stefanb, virt-maint
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: swtpm 0.5.3, 0.6.2 or 0.7.1 Doc Type: If docs needed, set a value
Doc Text:
An out-of-bounds read vulnerability was found in swtpm. The vulnerability exists due to a boundary condition when the byte array representing the state of the TPM is accessed. This flaw allows an attacker to send a specially crafted header, triggering an out-of-bounds read access on the byte array containing the TPM's state. This issue can crash swtpm or prevent it from starting.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-12-05 02:37:14 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: 2056493, 2056517, 2056518, 2061245    
Bug Blocks: 2056494    

Description Avinash Hanwate 2022-02-21 11:07:09 UTC
swtpm is a libtpms-based TPM emulator with socket, character device, and Linux CUSE interface. Versions prior to 0.5.3, 0.6.2, and 0.7.1 are vulnerable to out-of-bounds read. A specially crafted header of swtpm's state, where the blobheader's hdrsize indicator has an invalid value, may cause an out-of-bounds access when the byte array representing the state of the TPM is accessed. This will likely crash swtpm or prevent it from starting since the state cannot be understood. Users should upgrade to swtpm v0.5.3, v0.6.2, or v0.7.1 to receive a patch. There are currently no known workarounds.

https://github.com/stefanberger/swtpm/security/advisories/GHSA-2qgm-8xf4-3hqw
https://github.com/stefanberger/swtpm/commit/9f740868fc36761de27df3935513bdebf8852d19
https://github.com/stefanberger/swtpm/releases/tag/v0.5.3
https://github.com/stefanberger/swtpm/releases/tag/v0.6.2
https://github.com/stefanberger/swtpm/releases/tag/v0.7.1

Comment 1 Avinash Hanwate 2022-02-21 11:07:50 UTC
Created swtpm tracking bugs for this issue:

Affects: fedora-all [bug 2056493]

Comment 7 errata-xmlrpc 2022-11-08 09:13:49 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2022:7472 https://access.redhat.com/errata/RHSA-2022:7472

Comment 8 errata-xmlrpc 2022-11-15 10:15:50 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2022:8100 https://access.redhat.com/errata/RHSA-2022:8100

Comment 9 Product Security DevOps Team 2022-12-05 02:37:12 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2022-23645