crypto/cms/cms_smime.c:637: error: BUFFER_OVERRUN_L3
  Offset: 6 Size: [1, +oo] by call to `CMS_RecipientInfo_decrypt`.
Showing all 13 steps of the trace


crypto/cms/cms_smime.c:635:28: Call
633.            * all.
634.            */
635.           else if (!cert || !CMS_RecipientInfo_ktri_cert_cmp(ri, cert)) {
                                  ^
636.               CMS_RecipientInfo_set0_pkey(ri, pk);
637.               r = CMS_RecipientInfo_decrypt(cms, ri);

crypto/cms/cms_env.c:269:1: Parameter `ri->d.ktri->rid->d.issuerAndSerialNumber->issuer->length`
  267.   }
  268.   
  269. > int CMS_RecipientInfo_ktri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert)
  270.   {
  271.       if (ri->type != CMS_RECIPINFO_TRANS) {

crypto/cms/cms_smime.c:637:17: Call
635.           else if (!cert || !CMS_RecipientInfo_ktri_cert_cmp(ri, cert)) {
636.               CMS_RecipientInfo_set0_pkey(ri, pk);
637.               r = CMS_RecipientInfo_decrypt(cms, ri);
                       ^
638.               CMS_RecipientInfo_set0_pkey(ri, NULL);
639.               if (cert) {

crypto/cms/cms_env.c:738:1: Parameter `ri->d.pwri->encryptedKey->length`
  736.   }
  737.   
  738. > int CMS_RecipientInfo_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri)
  739.   {
  740.       switch (ri->type) {

crypto/cms/cms_env.c:748:16: Call
  746.   
  747.       case CMS_RECIPINFO_PASS:
  748.           return cms_RecipientInfo_pwri_crypt(cms, ri, 0);
                        ^
  749.   
  750.       default:

crypto/cms/cms_pwri.c:275:1: Parameter `ri->d.pwri->encryptedKey->length`
    273.   /* Encrypt/Decrypt content key in PWRI recipient info */
    274.   
    275. > int cms_RecipientInfo_pwri_crypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri,
    276.                                    int en_de)
    277.   {

crypto/cms/cms_pwri.c:368:14: Call
    366.               goto err;
    367.           }
    368.           if (!kek_unwrap_key(key, &keylen,
                        ^
    369.                               pwri->encryptedKey->data,
    370.                               pwri->encryptedKey->length, kekctx)) {

crypto/cms/cms_pwri.c:176:1: <Length trace>
174.    */
175.   
176. > static int kek_unwrap_key(unsigned char *out, size_t *outlen,
177.                             const unsigned char *in, size_t inlen,
178.                             EVP_CIPHER_CTX *ctx)

crypto/cms/cms_pwri.c:176:1: Parameter `inlen`
      174.    */
      175.   
      176. > static int kek_unwrap_key(unsigned char *out, size_t *outlen,
      177.                             const unsigned char *in, size_t inlen,
      178.                             EVP_CIPHER_CTX *ctx)

crypto/cms/cms_pwri.c:191:11: Call
      189.           return 0;
      190.       }
      191.       tmp = OPENSSL_malloc(inlen);
                       ^
      192.       if (tmp == NULL)
      193.           return 0;

crypto/mem.c:166:9: Assignment
        164.   
        165.       if (num == 0)
        166.           return NULL;
                       ^
        167.   
        168.       FAILTEST();

crypto/cms/cms_pwri.c:191:5: Assignment
      189.           return 0;
      190.       }
      191.       tmp = OPENSSL_malloc(inlen);
                 ^
      192.       if (tmp == NULL)
      193.           return 0;

crypto/cms/cms_pwri.c:213:60: Array access: Offset: 6 Size: [1, +oo] by call to `CMS_RecipientInfo_decrypt` 
      211.           goto err;
      212.       /* Check check bytes */
      213.       if (((tmp[1] ^ tmp[4]) & (tmp[2] ^ tmp[5]) & (tmp[3] ^ tmp[6])) != 0xff) {
                                                                        ^
      214.           /* Check byte failure */
      215.           goto err;
