crypto/rsa/rsa_ossl.c:574: error: BUFFER_OVERRUN_L3
  Offset: 0 Size: [0, 8388607] by call to `BN_sub`.
Showing all 13 steps of the trace


crypto/rsa/rsa_ossl.c:537:9: Call
535.           goto err;
536.       BN_CTX_start(ctx);
537.       f = BN_CTX_get(ctx);
               ^
538.       ret = BN_CTX_get(ctx);
539.       num = BN_num_bytes(rsa->n);

crypto/bn/bn_ctx.c:229:5: Call
  227.       }
  228.       /* OK, make sure the returned bignum is "zero" */
  229.       BN_zero(ret);
             ^
  230.       ctx->used++;
  231.       CTXDBG_RET(ctx, ret);

crypto/bn/bn_lib.c:357:1: Parameter `*a->d`
    355.   }
    356.   
    357. > int BN_set_word(BIGNUM *a, BN_ULONG w)
    358.   {
    359.       bn_check_top(a);

crypto/bn/bn_lib.c:360:9: Call
    358.   {
    359.       bn_check_top(a);
    360.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                   ^
    361.           return 0;
    362.       a->neg = 0;

crypto/bn/bn_lcl.h:651:1: Parameter `*a->d`
      649.                            const BIGNUM *add, const BIGNUM *rem, BN_CTX *ctx);
      650.   
      651. > static ossl_inline BIGNUM *bn_expand(BIGNUM *a, int bits)
      652.   {
      653.       if (bits > (INT_MAX - BN_BITS2 + 1))

crypto/rsa/rsa_ossl.c:574:14: Call
572.   
573.       if ((padding == RSA_X931_PADDING) && ((bn_get_words(ret)[0] & 0xf) != 12))
574.           if (!BN_sub(ret, rsa->n, ret))
                    ^
575.               goto err;
576.   

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:65:13: Call
  63.           } else {
  64.               r_neg = 0;
  65.               BN_zero(r);
                    ^
  66.               ret = 1;
  67.           }

crypto/bn/bn_lib.c:357:1: <Length trace>
355.   }
356.   
357. > int BN_set_word(BIGNUM *a, BN_ULONG w)
358.   {
359.       bn_check_top(a);

crypto/bn/bn_lib.c:357:1: Parameter `*a->d`
    355.   }
    356.   
    357. > int BN_set_word(BIGNUM *a, BN_ULONG w)
    358.   {
    359.       bn_check_top(a);

crypto/bn/bn_lib.c:360:9: Call
    358.   {
    359.       bn_check_top(a);
    360.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                   ^
    361.           return 0;
    362.       a->neg = 0;

crypto/bn/bn_lcl.h:651:1: Parameter `*a->d`
      649.                            const BIGNUM *add, const BIGNUM *rem, BN_CTX *ctx);
      650.   
      651. > static ossl_inline BIGNUM *bn_expand(BIGNUM *a, int bits)
      652.   {
      653.       if (bits > (INT_MAX - BN_BITS2 + 1))

crypto/bn/bn_lib.c:363:5: Array access: Offset: 0 Size: [0, 8388607] by call to `BN_sub` 
    361.           return 0;
    362.       a->neg = 0;
    363.       a->d[0] = w;
               ^
    364.       a->top = (w ? 1 : 0);
    365.       bn_check_top(a);
