crypto/bn/bn_prime.c:256: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_mod_mul`.
Showing all 23 steps of the trace


crypto/bn/bn_prime.c:245:1: Parameter `a->top`
243.   }
244.   
245. > static int witness(BIGNUM *w, const BIGNUM *a, const BIGNUM *a1,
246.                      const BIGNUM *a1_odd, int k, BN_CTX *ctx,
247.                      BN_MONT_CTX *mont)

crypto/bn/bn_prime.c:249:10: Call
247.                      BN_MONT_CTX *mont)
248.   {
249.       if (!BN_mod_exp_mont(w, w, a1_odd, a, ctx, mont)) /* w := w^a1_odd mod a */
                ^
250.           return -1;
251.       if (BN_is_one(w))

crypto/bn/bn_exp.c:296:1: Parameter `m->top`
  294.   }
  295.   
  296. > int BN_mod_exp_mont(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
  297.                       const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
  298.   {

crypto/bn/bn_exp.c:317:10: Call
  315.       bn_check_top(m);
  316.   
  317.       if (!BN_is_odd(m)) {
                  ^
  318.           BNerr(BN_F_BN_MOD_EXP_MONT, BN_R_CALLED_WITH_EVEN_MODULUS);
  319.           return 0;

crypto/bn/bn_lib.c:858:1: Parameter `a->top`
    856.   }
    857.   
    858. > int BN_is_odd(const BIGNUM *a)
    859.   {
    860.       return (a->top > 0) && (a->d[0] & 1);

crypto/bn/bn_prime.c:256:14: Call
254.           return 0;               /* w == -1 (mod a), 'a' is probably prime */
255.       while (--k) {
256.           if (!BN_mod_mul(w, w, w, a, ctx)) /* w := w^2 mod a */
                    ^
257.               return -1;
258.           if (BN_is_one(w))

crypto/bn/bn_mod.c:193:1: Parameter `m->top`
  191.   
  192.   /* slow but works */
  193. > int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
  194.                  BN_CTX *ctx)
  195.   {

crypto/bn/bn_mod.c:213:10: Call
  211.               goto err;
  212.       }
  213.       if (!BN_nnmod(r, t, m, ctx))
                  ^
  214.           goto err;
  215.       bn_check_top(r);

crypto/bn/bn_mod.c:13:1: Parameter `d->top`
    11.   #include "bn_lcl.h"
    12.   
    13. > int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx)
    14.   {
    15.       /*

crypto/bn/bn_mod.c:20:11: Call
    18.        */
    19.   
    20.       if (!(BN_mod(r, m, d, ctx)))
                    ^
    21.           return 0;
    22.       if (!r->neg)

crypto/bn/bn_div.c:209:1: Parameter `divisor->top`
      207.    * If 'dv' or 'rm' is NULL, the respective value is not returned.
      208.    */
      209. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
      210.              BN_CTX *ctx)
      211.   {

crypto/bn/bn_div.c:214:9: Call
      212.       int ret;
      213.   
      214.       if (BN_is_zero(divisor)) {
                     ^
      215.           BNerr(BN_F_BN_DIV, BN_R_DIV_BY_ZERO);
      216.           return 0;

crypto/bn/bn_lib.c:843:1: Parameter `a->top`
        841.   }
        842.   
        843. > int BN_is_zero(const BIGNUM *a)
        844.   {
        845.       return a->top == 0;

crypto/bn/bn_div.c:229:11: Call
      227.       }
      228.   
      229.       ret = bn_div_fixed_top(dv, rm, num, divisor, ctx);
                       ^
      230.   
      231.       if (ret) {

crypto/bn/bn_div.c:264:1: Parameter `divisor->top`
        262.    *       divisor's length is considered public;
        263.    */
        264. > int bn_div_fixed_top(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num,
        265.                        const BIGNUM *divisor, BN_CTX *ctx)
        266.   {

crypto/bn/bn_div.c:289:10: Call
        287.   
        288.       /* First we normalise the numbers */
        289.       if (!BN_copy(sdiv, divisor))
                        ^
        290.           goto err;
        291.       norm_shift = bn_left_align(sdiv);

crypto/bn/bn_lib.c:281:1: <Offset trace>
279.   }
280.   
281. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
282.   {
283.       bn_check_top(b);

crypto/bn/bn_lib.c:281:1: Parameter `b->top`
          279.   }
          280.   
          281. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
          282.   {
          283.       bn_check_top(b);

crypto/bn/bn_lib.c:281:1: <Length trace>
279.   }
280.   
281. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
282.   {
283.       bn_check_top(b);

crypto/bn/bn_lib.c:281:1: Parameter `*a->d`
          279.   }
          280.   
          281. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
          282.   {
          283.       bn_check_top(b);

crypto/bn/bn_lib.c:287:9: Call
          285.       if (a == b)
          286.           return a;
          287.       if (bn_wexpand(a, b->top) == NULL)
                         ^
          288.           return NULL;
          289.   

crypto/bn/bn_lib.c:939:1: Parameter `*a->d`
            937.   }
            938.   
            939. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
            940.   {
            941.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_lib.c:291:9: Array access: Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_mod_mul` 
          289.   
          290.       if (b->top > 0)
          291.           memcpy(a->d, b->d, sizeof(b->d[0]) * b->top);
                         ^
          292.   
          293.       a->neg = b->neg;
