Bug 1939664 (CVE-2021-3446)

Summary: CVE-2021-3446 libtpms: return of wrong initialization vector when certain symmetric ciphers are used
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: marcandre.lureau, stefanb, virt-maint
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libtpms 0.7.7, libtpms 0.8.2 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in libtpms. The commonly used integration of libtpms with OpenSSL contained a vulnerability related to the returned IV (initialization vector) when certain symmetric ciphers were used. Instead of returning the last IV it returned the initial IV to the caller, thus weakening the subsequent encryption and decryption steps. The highest threat from this vulnerability is to data confidentiality.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-29 09:59:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1939665, 1942902, 1942903, 1942904    
Bug Blocks: 1934217, 1939659    

Description Guilherme de Almeida Suckevicz 2021-03-16 19:05:58 UTC
The commonly used integration of libtpms with OpenSSL contained a vulnerability related to the returned IV (initialization vector) when certain symmetric ciphers were used. Instead of returning the last IV it returned the initial IV to the caller. The fix for this required the copying of the last-used IV from OpenSSL so it can be return back to the caller and used in subsequent encryption and decryption steps. The side-effect of the fix is that previously chain-encrypted data will not be decryptable anymore with the TPM 2.

Reference and upstream patch:
https://github.com/stefanberger/libtpms/commit/32c159ab53db703749a8f90430cdc7b20b00975e

Comment 1 Guilherme de Almeida Suckevicz 2021-03-16 19:06:23 UTC
Created libtpms tracking bugs for this issue:

Affects: fedora-all [bug 1939665]

Comment 3 Mauro Matteo Cascella 2021-03-25 10:42:19 UTC
Statement:

The versions of `libtpms` as shipped with Red Hat Enterprise Linux 8 Advanced Virtualization are affected by this issue. A future update may fix the code.

Comment 5 Stefan Berger 2021-10-14 21:13:55 UTC
This bug has been fixed a while ago. I think this bugzilla can be closed.