crypto/pem/pvkfmt.c:312: error: BUFFER_OVERRUN_L3
  Offset: [1, +oo] Size: [0, 8388607] by call to `BN_mod_exp`.
Showing all 21 steps of the trace


crypto/pem/pvkfmt.c:294:10: Call
292.       if (dsa == NULL || ret == NULL)
293.           goto memerr;
294.       if (!read_lebn(&p, nbyte, &dsa->p))
                ^
295.           goto memerr;
296.       if (!read_lebn(&p, 20, &dsa->q))

crypto/pem/pvkfmt.c:96:10: Call
  94.   static int read_lebn(const unsigned char **in, unsigned int nbyte, BIGNUM **r)
  95.   {
  96.       *r = BN_lebin2bn(*in, nbyte, NULL);
                 ^
  97.       if (*r == NULL)
  98.           return 0;

crypto/bn/bn_lib.c:631:9: Assignment
    629.       n = len;
    630.       if (n == 0) {
    631.           ret->top = 0;
                   ^
    632.           return ret;
    633.       }

crypto/pem/pvkfmt.c:312:14: Call
310.               goto memerr;
311.   
312.           if (!BN_mod_exp(dsa->pub_key, dsa->g, dsa->priv_key, dsa->p, ctx))
                    ^
313.               goto memerr;
314.           BN_CTX_free(ctx);

crypto/bn/bn_exp.c:190:1: Parameter `a->top`
  188.   }
  189.   
  190. > int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
  191.                  BN_CTX *ctx)
  192.   {

crypto/bn/bn_exp.c:250:19: Call
  248.           } else
  249.   # endif
  250.               ret = BN_mod_exp_mont(r, a, p, m, ctx, NULL);
                           ^
  251.       } else
  252.   #endif

crypto/bn/bn_exp.c:400:1: Parameter `a->top`
    398.   }
    399.   
    400. > int BN_mod_exp_mont(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
    401.                       const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
    402.   {

crypto/bn/bn_exp.c:412:16: Call
    410.   
    411.       if (BN_get_flags(p, BN_FLG_CONSTTIME) != 0) {
    412.           return BN_mod_exp_mont_consttime(rr, a, p, m, ctx, in_mont);
                          ^
    413.       }
    414.   

crypto/bn/bn_exp.c:654:1: Parameter `a->top`
      652.    * http://www.daemonology.net/hyperthreading-considered-harmful/)
      653.    */
      654. > int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
      655.                                 const BIGNUM *m, BN_CTX *ctx,
      656.                                 BN_MONT_CTX *in_mont)

crypto/bn/bn_exp.c:807:14: Call
      805.       /* prepare a^1 in Montgomery domain */
      806.       if (a->neg || BN_ucmp(a, m) >= 0) {
      807.           if (!BN_mod(&am, a, m, ctx))
                          ^
      808.               goto err;
      809.           if (!BN_to_montgomery(&am, &am, mont, ctx))

crypto/bn/bn_div.c:188:1: Parameter `num->top`
        186.    * If 'dv' or 'rm' is NULL, the respective value is not returned.
        187.    */
        188. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
        189.              BN_CTX *ctx)
        190.   {

crypto/bn/bn_div.c:258:11: Call
        256.       sdiv->neg = 0;
        257.       norm_shift += BN_BITS2;
        258.       if (!(BN_lshift(snum, num, norm_shift)))
                         ^
        259.           goto err;
        260.       snum->neg = 0;

crypto/bn/bn_shift.c:129:1: <Offset trace>
127.   }
128.   
129. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
130.   {
131.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:129:1: Parameter `n`
          127.   }
          128.   
          129. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
          130.   {
          131.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:144:5: Assignment
          142.   
          143.       r->neg = a->neg;
          144.       nw = n / BN_BITS2;
                     ^
          145.       if (bn_wexpand(r, a->top + nw + 1) == NULL)
          146.           return (0);

crypto/bn/bn_shift.c:129:1: <Length trace>
127.   }
128.   
129. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
130.   {
131.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:129:1: Parameter `*r->d`
          127.   }
          128.   
          129. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
          130.   {
          131.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:145:9: Call
          143.       r->neg = a->neg;
          144.       nw = n / BN_BITS2;
          145.       if (bn_wexpand(r, a->top + nw + 1) == NULL)
                         ^
          146.           return (0);
          147.       lb = n % BN_BITS2;

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_shift.c:150:5: Assignment
          148.       rb = BN_BITS2 - lb;
          149.       f = a->d;
          150.       t = r->d;
                     ^
          151.       t[a->top + nw] = 0;
          152.       if (lb == 0)

crypto/bn/bn_shift.c:158:13: Array access: Offset: [1, +oo] Size: [0, 8388607] by call to `BN_mod_exp` 
          156.           for (i = a->top - 1; i >= 0; i--) {
          157.               l = f[i];
          158.               t[nw + i + 1] |= (l >> rb) & BN_MASK2;
                             ^
          159.               t[nw + i] = (l << lb) & BN_MASK2;
          160.           }
