-
Bug
-
Resolution: Unresolved
-
Critical
-
rhel-8.8.0.z, rhel-9.2.0.z, rhel-10.0.beta
-
nss-3.101.0-7.el10
-
Yes
-
None
-
1
-
rhel-sst-security-crypto
-
ssg_security
-
29
-
30
-
3
-
False
-
-
No
-
Crypto24Q3
-
Approved Exception
-
Unspecified Release Note Type - Unknown
-
None
There seems to be an ABI breakage between NSS 3.90 and NSS 3.101:
Abridged description:
NSSCMSKeyAgreeRecipientInfo's .ukm has changed types from SECItem* to SECItem;
size change propagates to NSSCMSRecipientInfo, referenced by pointer in NSSCMSEnvelopedData.
All of these structs are public.
Detailed description:
NSSCMSKeyAgreeRecipientInfoStr was defined as
struct NSSCMSKeyAgreeRecipientInfoStr { SECItem version; NSSCMSOriginatorIdentifierOrKey originatorIdentifierOrKey; SECItem *ukm; /* optional */ // <- a pointer SECAlgorithmID keyEncAlg; NSSCMSRecipientEncryptedKey **recipientEncryptedKeys; };
but https://phabricator.services.mozilla.com/D204654 changed it to
struct NSSCMSKeyAgreeRecipientInfoStr { SECItem version; NSSCMSOriginatorIdentifierOrKey originatorIdentifierOrKey; SECItem ukm; /* optional */ // <- it's a value now, growing in size SECAlgorithmID keyEncAlg; NSSCMSRecipientEncryptedKey **recipientEncryptedKeys; }; typedef struct NSSCMSKeyAgreeRecipientInfoStr NSSCMSKeyAgreeRecipientInfo;
Not only this happens in a public header (nss3/cmst.h),
now the grown NSSCMSKeyAgreeRecipientInfo is used inside a union inside a NSSCMSRecipientInfo
struct NSSCMSRecipientInfoStr { // <- changes size as well NSSCMSRecipientInfoIDSelector recipientInfoType; union { // <- could've dampened the size change, but no, the growing member is the largest one NSSCMSKeyTransRecipientInfo keyTransRecipientInfo; NSSCMSKeyAgreeRecipientInfo keyAgreeRecipientInfo; // <- here's the growing struct NSSCMSKEKRecipientInfo kekRecipientInfo; NSSCMSKeyTransRecipientInfoEx keyTransRecipientInfoEx; } ri; /* --------- local; not part of encoding --------- */ NSSCMSMessage *cmsg; /* back pointer to message */ // <- offset changes CERTCertificate *cert; /* recipient's certificate */ // <- offset changes }; typedef struct NSSCMSRecipientInfoStr NSSCMSRecipientInfo;
NSSCMSRecipientInfo, in turn, is accessible from NSSCMSEnvelopedData through a pointer:
struct NSSCMSEnvelopedDataStr { ... NSSCMSRecipientInfo **recipientInfos; ... }; typedef struct NSSCMSEnvelopedDataStr NSSCMSEnvelopedData;
and NSSCMSEnvelopedData is exposed in nss3/cms.h
- links to
-
RHBA-2024:136536 nss bug fix and enhancement update