crypto/rsa/rsa_chk.c:122: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_sub`.
Showing all 17 steps of the trace


crypto/rsa/rsa_chk.c:118:10: Call
116.   
117.       /* d*e = 1  mod \lambda(n)? */
118.       if (!BN_sub(i, key->p, BN_value_one())) {
                ^
119.           ret = -1;
120.           goto err;

crypto/bn/bn_add.c:59:19: Call
  57.           if (cmp_res > 0) {
  58.               r_neg = a->neg;
  59.               ret = BN_usub(r, a, b);
                          ^
  60.           } else if (cmp_res < 0) {
  61.               r_neg = !b->neg;

crypto/bn/bn_add.c:125:1: Parameter `r->top`
    123.   
    124.   /* unsigned subtraction of b from a, a must be larger than b. */
    125. > int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
    126.   {
    127.       int max, min, dif;

crypto/rsa/rsa_chk.c:122:10: Call
120.           goto err;
121.       }
122.       if (!BN_sub(j, key->q, BN_value_one())) {
                ^
123.           ret = -1;
124.           goto err;

crypto/bn/bn_add.c:45:1: Parameter `*r->d`
  43.   
  44.   /* signed sub of b from a. */
  45. > int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
  46.   {
  47.       int ret, r_neg, cmp_res;

crypto/bn/bn_add.c:54:15: Call
  52.       if (a->neg != b->neg) {
  53.           r_neg = a->neg;
  54.           ret = BN_uadd(r, a, b);
                      ^
  55.       } else {
  56.           cmp_res = BN_ucmp(a, b);

crypto/bn/bn_add.c:76:1: Parameter `*r->d`
    74.   
    75.   /* unsigned add of b to a, r can be equal to a or b. */
    76. > int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
    77.   {
    78.       int max, min, dif;

crypto/bn/bn_add.c:96:9: Call
    94.       dif = max - min;
    95.   
    96.       if (bn_wexpand(r, max + 1) == NULL)
                  ^
    97.           return 0;
    98.   

crypto/bn/bn_lib.c:962:1: Parameter `*a->d`
      960.   }
      961.   
      962. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
      963.   {
      964.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_lib.c:964:37: Call
      962.   BIGNUM *bn_wexpand(BIGNUM *a, int words)
      963.   {
      964.       return (words <= a->dmax) ? a : bn_expand2(a, words);
                                                 ^
      965.   }
      966.   

crypto/bn/bn_lib.c:245:1: Parameter `*b->d`
        243.    */
        244.   
        245. > BIGNUM *bn_expand2(BIGNUM *b, int words)
        246.   {
        247.       if (words > b->dmax) {

crypto/bn/bn_lib.c:248:23: Call
        246.   {
        247.       if (words > b->dmax) {
        248.           BN_ULONG *a = bn_expand_internal(b, words);
                                     ^
        249.           if (!a)
        250.               return NULL;

crypto/bn/bn_lib.c:209:1: <Offset trace>
207.   /* This is used by bn_expand2() */
208.   /* The caller MUST check that words > b->dmax before calling this */
209. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
210.   {
211.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:209:1: Parameter `b->top`
          207.   /* This is used by bn_expand2() */
          208.   /* The caller MUST check that words > b->dmax before calling this */
          209. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
          210.   {
          211.       BN_ULONG *a = NULL;

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

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

crypto/bn/bn_lib.c:232:9: Array access: Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_sub` 
          230.       assert(b->top <= words);
          231.       if (b->top > 0)
          232.           memcpy(a, b->d, sizeof(*a) * b->top);
                         ^
          233.   
          234.       return a;
