crypto/bn/bn_gcd.c:537: error: BUFFER_OVERRUN_L3
  Offset: [1, +oo] Size: [0, 8388607] by call to `BN_div`.
Showing all 15 steps of the trace


crypto/bn/bn_gcd.c:470:9: Call
468.   
469.       BN_CTX_start(ctx);
470.       A = BN_CTX_get(ctx);
               ^
471.       B = BN_CTX_get(ctx);
472.       X = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:229:5: Call
  227.       }
  228.       /* OK, make sure the returned bignum is "zero" */
  229.       BN_zero(ret);
             ^
  230.       /* clear BN_FLG_CONSTTIME if leaked from previous frames */
  231.       ret->flags &= (~BN_FLG_CONSTTIME);

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

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

crypto/bn/bn_lcl.h:660:1: Parameter `*a->d`
      658.                            const BIGNUM *add, const BIGNUM *rem, BN_CTX *ctx);
      659.   
      660. > static ossl_inline BIGNUM *bn_expand(BIGNUM *a, int bits)
      661.   {
      662.       if (bits > (INT_MAX - BN_BITS2 + 1))

crypto/bn/bn_gcd.c:537:18: Call
535.   
536.               /* (D, M) := (A/B, A%B) ... */
537.               if (!BN_div(D, M, &local_A, B, ctx))
                        ^
538.                   goto err;
539.               /* Ensure local_A goes out of scope before any further use of A */

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 `dv->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:233:13: Call
  231.       if (ret) {
  232.           if (dv != NULL)
  233.               bn_correct_top(dv);
                     ^
  234.           if (rm != NULL)
  235.               bn_correct_top(rm);

crypto/bn/bn_lib.c:944:1: <Offset trace>
942.   }
943.   
944. > void bn_correct_top(BIGNUM *a)
945.   {
946.       BN_ULONG *ftl;

crypto/bn/bn_lib.c:944:1: Parameter `a->top`
    942.   }
    943.   
    944. > void bn_correct_top(BIGNUM *a)
    945.   {
    946.       BN_ULONG *ftl;

crypto/bn/bn_lib.c:947:5: Assignment
    945.   {
    946.       BN_ULONG *ftl;
    947.       int tmp_top = a->top;
               ^
    948.   
    949.       if (tmp_top > 0) {

crypto/bn/bn_lib.c:944:1: <Length trace>
942.   }
943.   
944. > void bn_correct_top(BIGNUM *a)
945.   {
946.       BN_ULONG *ftl;

crypto/bn/bn_lib.c:944:1: Parameter `*a->d`
    942.   }
    943.   
    944. > void bn_correct_top(BIGNUM *a)
    945.   {
    946.       BN_ULONG *ftl;

crypto/bn/bn_lib.c:950:14: Array access: Offset: [1, +oo] Size: [0, 8388607] by call to `BN_div` 
    948.   
    949.       if (tmp_top > 0) {
    950.           for (ftl = &(a->d[tmp_top]); tmp_top > 0; tmp_top--) {
                        ^
    951.               ftl--;
    952.               if (*ftl != 0)
