Open Bug 303165 Opened 19 years ago Updated 2 years ago

smime: NSSCMSKeyAgreeRecipientInfoTemplate template does not match the struct NSSCMSKeyAgreeRecipientInfoStr

Categories

(NSS :: Libraries, defect, P2)

x86
All

Tracking

(Not tracked)

People

(Reporter: alvolkov.bgs, Unassigned)

Details

One more case of template missmatch in smime library. Here we have ukm
as a pointer to a SECItem, where according to template

    { SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED | SEC_ASN1_EXPLICIT |
      SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 1,
	  offsetof(NSSCMSKeyAgreeRecipientInfo,ukm),
	  SEC_ASN1_SUB(SEC_OctetStringTemplate) },

is suppose to be a SECItem - a member of the structure.


nss/lib/smime/cmst.h:380 :

struct NSSCMSKeyAgreeRecipientInfoStr {
    SECItem				version;
    NSSCMSOriginatorIdentifierOrKey	originatorIdentifierOrKey;
    SECItem *				ukm;				/* optional */
    SECAlgorithmID			keyEncAlg;
    NSSCMSRecipientEncryptedKey **	recipientEncryptedKeys;
};
typedef struct NSSCMSKeyAgreeRecipientInfoStr NSSCMSKeyAgreeRecipientInfo;

nss/lib/smime/cmsasn1.c:372: 
const SEC_ASN1Template NSSCMSKeyAgreeRecipientInfoTemplate[] = {
    { SEC_ASN1_SEQUENCE,
	  0, NULL, sizeof(NSSCMSKeyAgreeRecipientInfo) },
    { SEC_ASN1_INTEGER,
	  offsetof(NSSCMSKeyAgreeRecipientInfo,version) },
    { SEC_ASN1_EXPLICIT | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 0,
	  offsetof(NSSCMSKeyAgreeRecipientInfo,originatorIdentifierOrKey),
	  NSSCMSOriginatorIdentifierOrKeyTemplate },
    { SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED | SEC_ASN1_EXPLICIT |
      SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 1,
	  offsetof(NSSCMSKeyAgreeRecipientInfo,ukm),
	  SEC_ASN1_SUB(SEC_OctetStringTemplate) },
    { SEC_ASN1_INLINE | SEC_ASN1_XTRN,
	  offsetof(NSSCMSKeyAgreeRecipientInfo,keyEncAlg),
	  SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate) },
    { SEC_ASN1_SEQUENCE_OF,
	  offsetof(NSSCMSKeyAgreeRecipientInfo,recipientEncryptedKeys),
	  NSSCMSRecipientEncryptedKeyTemplate },
    { 0 }
};
Assignee: wtchang → alexei.volkov.bugs
Adding Bob to ASN.1 encoder/decoder related bugs
QA Contact: jason.m.reid → libraries
assigning target relase
Target Milestone: --- → 3.12
Version: 3.10 → 3.12
Priority: -- → P2
NSS_CMSRecipientInfo_Encode can be used to exploit the problem. See bug 192590.
Version: 3.12 → trunk
Unsetting target milestone in unresolved bugs whose targets have passed.
Target Milestone: 3.12 → ---

The bug assignee is inactive on Bugzilla, and this bug has priority 'P2'.
:beurdouche, could you have a look please?

For more information, please visit auto_nag documentation.

Assignee: alvolkov.bgs → nobody
Flags: needinfo?(bbeurdouche)
Severity: normal → S3

We have modified the bot to only consider P1 as high priority, so I'm cancelling the needinfo here.

Flags: needinfo?(bbeurdouche)
You need to log in before you can comment on or make changes to this bug.