crypto/cms/cms_smime.c:691: error: BUFFER_OVERRUN_L3
  Offset added: [4, +oo] (⇐ 4 + [0, +oo]) Size: [1, +oo] by call to `CMS_RecipientInfo_decrypt`.
Showing all 17 steps of the trace


crypto/cms/cms_smime.c:691:17: Call
689.           if (!id || (CMS_RecipientInfo_kekri_id_cmp(ri, id, idlen) == 0)) {
690.               CMS_RecipientInfo_set0_key(ri, key, keylen);
691.               r = CMS_RecipientInfo_decrypt(cms, ri);
                       ^
692.               CMS_RecipientInfo_set0_key(ri, NULL, 0);
693.               if (r > 0)

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

crypto/cms/cms_smime.c:691:17: Call
689.           if (!id || (CMS_RecipientInfo_kekri_id_cmp(ri, id, idlen) == 0)) {
690.               CMS_RecipientInfo_set0_key(ri, key, keylen);
691.               r = CMS_RecipientInfo_decrypt(cms, ri);
                       ^
692.               CMS_RecipientInfo_set0_key(ri, NULL, 0);
693.               if (r > 0)

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

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

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

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

crypto/cms/cms_pwri.c:211:13: <Offset trace>
209.           || !EVP_DecryptInit_ex(ctx, NULL, NULL, NULL, NULL)
210.           /* Decrypt again */
211.           || !EVP_DecryptUpdate(ctx, tmp, &outl, tmp, inlen))
                   ^
212.           goto err;
213.       /* Check check bytes */

crypto/cms/cms_pwri.c:211:13: Call
      209.           || !EVP_DecryptInit_ex(ctx, NULL, NULL, NULL, NULL)
      210.           /* Decrypt again */
      211.           || !EVP_DecryptUpdate(ctx, tmp, &outl, tmp, inlen))
                         ^
      212.           goto err;
      213.       /* Check check bytes */

crypto/evp/evp_enc.c:443:1: Parameter `ctx->buf[*]`
        441.   }
        442.   
        443. > int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
        444.                         const unsigned char *in, int inl)
        445.   {

crypto/cms/cms_pwri.c:222:5: Assignment
      220.           goto err;
      221.       }
      222.       *outlen = (size_t)tmp[0];
                 ^
      223.       memcpy(out, tmp + 4, *outlen);
      224.       rv = 1;

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:16: Call
      189.           return 0;
      190.       }
      191.       if ((tmp = OPENSSL_malloc(inlen)) == NULL) {
                            ^
      192.           CMSerr(CMS_F_KEK_UNWRAP_KEY, ERR_R_MALLOC_FAILURE);
      193.           return 0;

crypto/mem.c:201:9: Assignment
        199.   
        200.       if (num == 0)
        201.           return NULL;
                       ^
        202.   
        203.       FAILTEST();

crypto/cms/cms_pwri.c:191:10: Assignment
      189.           return 0;
      190.       }
      191.       if ((tmp = OPENSSL_malloc(inlen)) == NULL) {
                      ^
      192.           CMSerr(CMS_F_KEK_UNWRAP_KEY, ERR_R_MALLOC_FAILURE);
      193.           return 0;

crypto/cms/cms_pwri.c:223:5: Array access: Offset added: [4, +oo] (⇐ 4 + [0, +oo]) Size: [1, +oo] by call to `CMS_RecipientInfo_decrypt` 
      221.       }
      222.       *outlen = (size_t)tmp[0];
      223.       memcpy(out, tmp + 4, *outlen);
                 ^
      224.       rv = 1;
      225.    err:
