crypto/bn/bn_exp.c:354: error: BUFFER_OVERRUN_L3
  Offset: 0 Size: [0, 8388607] by call to `BN_nnmod`.
Showing all 17 steps of the trace


crypto/bn/bn_exp.c:334:9: Call
332.   
333.       BN_CTX_start(ctx);
334.       d = BN_CTX_get(ctx);
               ^
335.       r = BN_CTX_get(ctx);
336.       val[0] = 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_exp.c:354:14: Call
352.   
353.       if (a->neg || BN_ucmp(a, m) >= 0) {
354.           if (!BN_nnmod(val[0], a, m, ctx))
                    ^
355.               goto err;
356.           aa = val[0];

crypto/bn/bn_mod.c:13:1: Parameter `*r->d`
  11.   #include "bn_lcl.h"
  12.   
  13. > int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx)
  14.   {
  15.       /*

crypto/bn/bn_mod.c:20:11: Call
  18.        */
  19.   
  20.       if (!(BN_mod(r, m, d, ctx)))
                  ^
  21.           return 0;
  22.       if (!r->neg)

crypto/bn/bn_div.c:137:1: Parameter `*rm->d`
    135.    * If 'dv' or 'rm' is NULL, the respective value is not returned.
    136.    */
    137. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
    138.              BN_CTX *ctx)
    139.   {

crypto/bn/bn_div.c:404:9: Call
    402.            */
    403.           int neg = num->neg;
    404.           BN_rshift(rm, snum, norm_shift);
                   ^
    405.           if (!BN_is_zero(rm))
    406.               rm->neg = neg;

crypto/bn/bn_shift.c:122:1: Parameter `*r->d`
      120.   }
      121.   
      122. > int BN_rshift(BIGNUM *r, const BIGNUM *a, int n)
      123.   {
      124.       int i, j, nw, lb, rb;

crypto/bn/bn_shift.c:140:9: Call
      138.       lb = BN_BITS2 - rb;
      139.       if (nw >= a->top || a->top == 0) {
      140.           BN_zero(r);
                     ^
      141.           return 1;
      142.       }

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

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_lib.c:364:5: Array access: Offset: 0 Size: [0, 8388607] by call to `BN_nnmod` 
        362.           return 0;
        363.       a->neg = 0;
        364.       a->d[0] = w;
                   ^
        365.       a->top = (w ? 1 : 0);
        366.       a->flags &= ~BN_FLG_FIXED_TOP;
