libtpms/tpm2-Add-padding-to-OBJECT-for-32bit-targets.patch
Marcus Meissner 5aa17fdce9 - Add tpm2-Add-padding-to-OBJECT-for-32bit-targets.patch
- Update to 0.10.0:
  * tpm2: Support for profiles: default-v1 & custom
  * tpm2: Add new API call TPMLIB_SetProfile to enable user to set a
    profile
  * tpm2: Extende TPMLIB_GetInfo to return profiles-related info
  * tpm2: Implemented crypto tests and restrictions on crypto related
    to FIPS-140-3; can be enabled with profiles
  * tpm2: Enable Camellia-192 and AES-192
  * tpm2: Implement TPMLIB_WasManufactured API call
  * tpm2: Fixes for issues detected by static analyzers
  * tpm2: Use OpenSSL-based KDFe implementation if possible
  * tpm2: Update to TPM 2 spec rev 183 (many changes)
  * tpm2: Better support for OpenSSL 3.x
  * tpm2: Use Carmichael function for RSA priv. exponent D (>= 2048
    bits)
  * tpm2: Fixes for CVE-2023-1017 and CVE-2023-1018
  * tpm2: Fix of SignedCompareB().
- NOTE: This fix may result in backwards compatibility issues with PCR
  policies used by TPM2_PolicyCounterTimer and TPM2_PolicyNV when
  upgrading from v0.9 to v0.10.

OBS-URL: https://build.opensuse.org/package/show/security/libtpms?expand=0&rev=45
2024-12-04 12:48:14 +00:00

28 lines
961 B
Diff

From 806141196296150c03e5d826ab7e6c3602f41b98 Mon Sep 17 00:00:00 2001
From: Stefan Berger <stefanb@linux.ibm.com>
Date: Fri, 15 Nov 2024 08:07:23 -0500
Subject: [PATCH] tpm2: Add padding to OBJECT for 32bit targets
The nvram_offsets test fails on 32bit targets due to an unexpected size
of an OBJECT. This was due to missing padding.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
---
src/tpm2/Global.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/tpm2/Global.h b/src/tpm2/Global.h
index 910b940e3..c4d7176f3 100644
--- a/src/tpm2/Global.h
+++ b/src/tpm2/Global.h
@@ -265,6 +265,9 @@ typedef struct OBJECT
// this field carries additional metadata
// needed to derive the proof value for
// the object.
+#if __LONG_WIDTH__ == 32
+ UINT8 _pad1[4]; /* 32 bit targets need padding */
+#endif
// libtpms added: SEED_COMPAT_LEVEL to use for deriving child keys
SEED_COMPAT_LEVEL seedCompatLevel;