crypto/bn/bn_mont.c:427: error: BUFFER_OVERRUN_L3
  Offset: [3, +oo] (⇐ [0, +oo] + 3) Size: [0, 8388607] by call to `BN_mod_inverse`.
Showing all 22 steps of the trace


crypto/bn/bn_mont.c:357:15: Call
355.   
356.       BN_CTX_start(ctx);
357.       if ((Ri = BN_CTX_get(ctx)) == NULL)
                     ^
358.           goto err;
359.       R = &(mont->RR);            /* grab RR as a temp */

crypto/bn/bn_ctx.c:275:5: Call
  273.       }
  274.       /* OK, make sure the returned bignum is "zero" */
  275.       BN_zero(ret);
             ^
  276.       ctx->used++;
  277.       CTXDBG_RET(ctx, ret);

crypto/bn/bn_lib.c:520:1: Parameter `*a->d`
    518.   }
    519.   
    520. > int BN_set_word(BIGNUM *a, BN_ULONG w)
    521.   {
    522.       bn_check_top(a);

crypto/bn/bn_lib.c:523:9: Call
    521.   {
    522.       bn_check_top(a);
    523.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                   ^
    524.           return (0);
    525.       a->neg = 0;

crypto/bn/bn_lcl.h:777:1: Parameter `*a->d`
      775.   int bn_probable_prime_dh_coprime(BIGNUM *rnd, int bits, BN_CTX *ctx);
      776.   
      777. > static ossl_inline BIGNUM *bn_expand(BIGNUM *a, int bits)
      778.   {
      779.       if (bits > (INT_MAX - BN_BITS2 + 1))

crypto/bn/bn_mont.c:427:14: Call
425.           tmod.top = buf[0] != 0 ? 1 : 0;
426.           /* Ri = R^-1 mod N */
427.           if ((BN_mod_inverse(Ri, R, &tmod, ctx)) == NULL)
                    ^
428.               goto err;
429.           if (!BN_lshift(Ri, Ri, BN_BITS2))

crypto/bn/bn_gcd.c:225:1: Parameter `*in->d`
  223.                                           BN_CTX *ctx);
  224.   
  225. > BIGNUM *BN_mod_inverse(BIGNUM *in,
  226.                          const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx)
  227.   {

crypto/bn/bn_gcd.c:230:10: Call
  228.       BIGNUM *rv;
  229.       int noinv;
  230.       rv = int_bn_mod_inverse(in, a, n, ctx, &noinv);
                  ^
  231.       if (noinv)
  232.           BNerr(BN_F_BN_MOD_INVERSE, BN_R_NO_INVERSE);

crypto/bn/bn_gcd.c:236:1: Parameter `*in->d`
    234.   }
    235.   
    236. > BIGNUM *int_bn_mod_inverse(BIGNUM *in,
    237.                              const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx,
    238.                              int *pnoinv)

crypto/bn/bn_gcd.c:249:16: Call
    247.       if ((BN_get_flags(a, BN_FLG_CONSTTIME) != 0)
    248.           || (BN_get_flags(n, BN_FLG_CONSTTIME) != 0)) {
    249.           return BN_mod_inverse_no_branch(in, a, n, ctx);
                          ^
    250.       }
    251.   

crypto/bn/bn_gcd.c:556:1: Parameter `*in->d`
      554.    * not contain branches that may leak sensitive information.
      555.    */
      556. > static BIGNUM *BN_mod_inverse_no_branch(BIGNUM *in,
      557.                                           const BIGNUM *a, const BIGNUM *n,
      558.                                           BN_CTX *ctx)

crypto/bn/bn_gcd.c:704:18: Call
      702.           /* Y*a == 1  (mod |n|) */
      703.           if (!Y->neg && BN_ucmp(Y, n) < 0) {
      704.               if (!BN_copy(R, Y))
                              ^
      705.                   goto err;
      706.           } else {

crypto/bn/bn_lib.c:419:1: Parameter `*a->d`
        417.   }
        418.   
        419. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
        420.   {
        421.       int i;

crypto/bn/bn_lib.c:429:9: Call
        427.       if (a == b)
        428.           return (a);
        429.       if (bn_wexpand(a, b->top) == NULL)
                       ^
        430.           return (NULL);
        431.   

crypto/bn/bn_lib.c:1071:1: Parameter `*a->d`
          1069.   }
          1070.   
          1071. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
          1072.   {
          1073.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_lib.c:1073:37: Call
          1071.   BIGNUM *bn_wexpand(BIGNUM *a, int words)
          1072.   {
          1073.       return (words <= a->dmax) ? a : bn_expand2(a, words);
                                                      ^
          1074.   }
          1075.   

crypto/bn/bn_lib.c:380:1: Parameter `*b->d`
            378.    */
            379.   
            380. > BIGNUM *bn_expand2(BIGNUM *b, int words)
            381.   {
            382.       bn_check_top(b);

crypto/bn/bn_lib.c:385:23: Call
            383.   
            384.       if (words > b->dmax) {
            385.           BN_ULONG *a = bn_expand_internal(b, words);
                                         ^
            386.           if (!a)
            387.               return NULL;

crypto/bn/bn_lib.c:299:1: <Length trace>
297.   /* This is used by bn_expand2() */
298.   /* The caller MUST check that words > b->dmax before calling this */
299. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
300.   {
301.       BN_ULONG *A, *a = NULL;

crypto/bn/bn_lib.c:299:1: Parameter `*b->d`
              297.   /* This is used by bn_expand2() */
              298.   /* The caller MUST check that words > b->dmax before calling this */
              299. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
              300.   {
              301.       BN_ULONG *A, *a = NULL;

crypto/bn/bn_lib.c:325:5: Assignment
              323.   
              324.   #if 1
              325.       B = b->d;
                         ^
              326.       /* Check if the previous number needs to be copied */
              327.       if (B != NULL) {

crypto/bn/bn_lib.c:342:18: Array access: Offset: [3, +oo] (⇐ [0, +oo] + 3) Size: [0, 8388607] by call to `BN_mod_inverse` 
              340.               a1 = B[1];
              341.               a2 = B[2];
              342.               a3 = B[3];
                                      ^
              343.               A[0] = a0;
              344.               A[1] = a1;
