crypto/bn/bn_sqrt.c:223: error: BUFFER_OVERRUN_L3
  Offset: 0 Size: [0, 8388607] by call to `BN_mod_exp`.
Showing all 15 steps of the trace


crypto/bn/bn_sqrt.c:60:9: Call
58.   
59.       BN_CTX_start(ctx);
60.       A = BN_CTX_get(ctx);
              ^
61.       b = BN_CTX_get(ctx);
62.       q = 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:398:1: Parameter `*a->d`
    396.   }
    397.   
    398. > int BN_set_word(BIGNUM *a, BN_ULONG w)
    399.   {
    400.       bn_check_top(a);

crypto/bn/bn_lib.c:401:9: Call
    399.   {
    400.       bn_check_top(a);
    401.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                   ^
    402.           return (0);
    403.       a->neg = 0;

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

crypto/bn/bn_sqrt.c:223:10: Call
221.        * by computing its q'th power.
222.        */
223.       if (!BN_mod_exp(y, y, q, p, ctx))
                ^
224.           goto end;
225.       if (BN_is_one(y)) {

crypto/bn/bn_exp.c:89:1: Parameter `*r->d`
  87.   }
  88.   
  89. > int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
  90.                  BN_CTX *ctx)
  91.   {

crypto/bn/bn_exp.c:141:19: Call
  139.               && (BN_get_flags(m, BN_FLG_CONSTTIME) == 0)) {
  140.               BN_ULONG A = a->d[0];
  141.               ret = BN_mod_exp_mont_word(r, A, p, m, ctx, NULL);
                           ^
  142.           } else
  143.   # endif

crypto/bn/bn_exp.c:1095:1: Parameter `*rr->d`
    1093.   }
    1094.   
    1095. > int BN_mod_exp_mont_word(BIGNUM *rr, BN_ULONG a, const BIGNUM *p,
    1096.                            const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
    1097.   {

crypto/bn/bn_exp.c:1143:13: Call
    1141.           if (BN_is_one(m)) {
    1142.               ret = 1;
    1143.               BN_zero(rr);
                        ^
    1144.           } else {
    1145.               ret = BN_one(rr);

crypto/bn/bn_lib.c:398:1: <Length trace>
396.   }
397.   
398. > int BN_set_word(BIGNUM *a, BN_ULONG w)
399.   {
400.       bn_check_top(a);

crypto/bn/bn_lib.c:398:1: Parameter `*a->d`
      396.   }
      397.   
      398. > int BN_set_word(BIGNUM *a, BN_ULONG w)
      399.   {
      400.       bn_check_top(a);

crypto/bn/bn_lib.c:401:9: Call
      399.   {
      400.       bn_check_top(a);
      401.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                     ^
      402.           return (0);
      403.       a->neg = 0;

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

crypto/bn/bn_lib.c:404:5: Array access: Offset: 0 Size: [0, 8388607] by call to `BN_mod_exp` 
      402.           return (0);
      403.       a->neg = 0;
      404.       a->d[0] = w;
                 ^
      405.       a->top = (w ? 1 : 0);
      406.       bn_check_top(a);
