crypto/bn/bn_gf2m.c:778: error: BUFFER_OVERRUN_L3
  Offset: [1, +oo] Size: [0, 8388607] by call to `BN_GF2m_mod_inv`.
Showing all 25 steps of the trace


crypto/bn/bn_gf2m.c:773:18: Call
771.       bn_check_top(xx);
772.       BN_CTX_start(ctx);
773.       if ((field = BN_CTX_get(ctx)) == NULL)
                        ^
774.           goto err;
775.       if (!BN_GF2m_arr2poly(p, field))

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:365:15: Assignment
    363.       a->neg = 0;
    364.       a->d[0] = w;
    365.       a->top = (w ? 1 : 0);
                         ^
    366.       a->flags &= ~BN_FLG_FIXED_TOP;
    367.       bn_check_top(a);

crypto/bn/bn_lib.c:365:5: Assignment
    363.       a->neg = 0;
    364.       a->d[0] = w;
    365.       a->top = (w ? 1 : 0);
               ^
    366.       a->flags &= ~BN_FLG_FIXED_TOP;
    367.       bn_check_top(a);

crypto/bn/bn_gf2m.c:778:11: Call
776.           goto err;
777.   
778.       ret = BN_GF2m_mod_inv(r, xx, field, ctx);
                 ^
779.       bn_check_top(r);
780.   

crypto/bn/bn_gf2m.c:724:1: Parameter `p->top`
  722.    * But it does eliminate first order deduction on the input.
  723.    */
  724. > int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
  725.   {
  726.       BIGNUM *b = NULL;

crypto/bn/bn_gf2m.c:735:30: Call
  733.       /* generate blinding value */
  734.       do {
  735.           if (!BN_priv_rand(b, BN_num_bits(p) - 1,
                                      ^
  736.                             BN_RAND_TOP_ANY, BN_RAND_BOTTOM_ANY))
  737.               goto err;

crypto/bn/bn_lib.c:139:9: Call
    137.       bn_check_top(a);
    138.   
    139.       if (BN_is_zero(a))
                   ^
    140.           return 0;
    141.       return ((i * BN_BITS2) + BN_num_bits_word(a->d[i]));

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

crypto/bn/bn_gf2m.c:741:10: Call
  739.   
  740.       /* r := a * b */
  741.       if (!BN_GF2m_mod_mul(r, a, b, p, ctx))
                  ^
  742.           goto err;
  743.   

crypto/bn/bn_gf2m.c:465:1: Parameter `p->top`
    463.    * BN_GF2m_mod_mul_arr function.
    464.    */
    465. > int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
    466.                       const BIGNUM *p, BN_CTX *ctx)
    467.   {

crypto/bn/bn_gf2m.c:469:21: Call
    467.   {
    468.       int ret = 0;
    469.       const int max = BN_num_bits(p) + 1;
                               ^
    470.       int *arr = NULL;
    471.       bn_check_top(a);

crypto/bn/bn_lib.c:139:9: Call
      137.       bn_check_top(a);
      138.   
      139.       if (BN_is_zero(a))
                     ^
      140.           return 0;
      141.       return ((i * BN_BITS2) + BN_num_bits_word(a->d[i]));

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

crypto/bn/bn_gf2m.c:745:10: Call
  743.   
  744.       /* r := 1/(a * b) */
  745.       if (!BN_GF2m_mod_inv_vartime(r, r, p, ctx))
                  ^
  746.           goto err;
  747.   

crypto/bn/bn_gf2m.c:630:14: <Offset trace>
628.           bdp = b->d;
629.           bdp[0] = 1;
630.           for (i = 1; i < top; i++)
                    ^
631.               bdp[i] = 0;
632.           b->top = top;

crypto/bn/bn_gf2m.c:630:14: Assignment
    628.           bdp = b->d;
    629.           bdp[0] = 1;
    630.           for (i = 1; i < top; i++)
                        ^
    631.               bdp[i] = 0;
    632.           b->top = top;

crypto/bn/bn_gf2m.c:563:9: <Length trace>
561.       BN_CTX_start(ctx);
562.   
563.       b = BN_CTX_get(ctx);
               ^
564.       c = BN_CTX_get(ctx);
565.       u = BN_CTX_get(ctx);

crypto/bn/bn_gf2m.c:563:9: Call
    561.       BN_CTX_start(ctx);
    562.   
    563.       b = BN_CTX_get(ctx);
                   ^
    564.       c = BN_CTX_get(ctx);
    565.       u = 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.       ctx->used++;
      231.       CTXDBG_RET(ctx, ret);

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

crypto/bn/bn_lib.c:361:9: Call
        359.   {
        360.       bn_check_top(a);
        361.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                       ^
        362.           return 0;
        363.       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_gf2m.c:628:9: Assignment
    626.           if (!bn_wexpand(b, top))
    627.             goto err;
    628.           bdp = b->d;
                   ^
    629.           bdp[0] = 1;
    630.           for (i = 1; i < top; i++)

crypto/bn/bn_gf2m.c:631:13: Array access: Offset: [1, +oo] Size: [0, 8388607] by call to `BN_GF2m_mod_inv` 
    629.           bdp[0] = 1;
    630.           for (i = 1; i < top; i++)
    631.               bdp[i] = 0;
                       ^
    632.           b->top = top;
    633.           if (!bn_wexpand(c, top))
