crypto/dsa/dsa_ossl.c:365: error: BUFFER_OVERRUN_L3
  Offset: [-1, +oo] Size: [1, +oo] by call to `BN_mod_inverse`.
Showing all 21 steps of the trace


crypto/dsa/dsa_ossl.c:365:10: Call
363.        * Calculate W = inv(S) mod Q save W in u2
364.        */
365.       if ((BN_mod_inverse(u2, s, dsa->q, ctx)) == NULL)
                ^
366.           goto err;
367.   

crypto/bn/bn_gcd.c:225:1: Parameter `ctx->stack.depth`
  223.                                           BN_CTX *ctx);
  224.   
  225. > BIGNUM *BN_mod_inverse(BIGNUM *in,
  226.                          const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx)
  227.   {

crypto/bn/bn_gcd.c:230:10: Call
  228.       BIGNUM *rv;
  229.       int noinv;
  230.       rv = int_bn_mod_inverse(in, a, n, ctx, &noinv);
                  ^
  231.       if (noinv)
  232.           BNerr(BN_F_BN_MOD_INVERSE, BN_R_NO_INVERSE);

crypto/bn/bn_gcd.c:236:1: Parameter `ctx->stack.depth`
    234.   }
    235.   
    236. > BIGNUM *int_bn_mod_inverse(BIGNUM *in,
    237.                              const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx,
    238.                              int *pnoinv)

crypto/bn/bn_gcd.c:249:16: Call
    247.       if ((BN_get_flags(a, BN_FLG_CONSTTIME) != 0)
    248.           || (BN_get_flags(n, BN_FLG_CONSTTIME) != 0)) {
    249.           return BN_mod_inverse_no_branch(in, a, n, ctx);
                          ^
    250.       }
    251.   

crypto/bn/bn_gcd.c:556:1: Parameter `ctx->stack.depth`
      554.    * not contain branches that may leak sensitive information.
      555.    */
      556. > static BIGNUM *BN_mod_inverse_no_branch(BIGNUM *in,
      557.                                           const BIGNUM *a, const BIGNUM *n,
      558.                                           BN_CTX *ctx)

crypto/bn/bn_gcd.c:567:5: Call
      565.       bn_check_top(n);
      566.   
      567.       BN_CTX_start(ctx);
                 ^
      568.       A = BN_CTX_get(ctx);
      569.       B = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:227:1: Parameter `ctx->stack.depth`
        225.   }
        226.   
        227. > void BN_CTX_start(BN_CTX *ctx)
        228.   {
        229.       CTXDBG_ENTRY("BN_CTX_start", ctx);

crypto/bn/bn_gcd.c:602:18: Call
      600.               bn_init(&local_B);
      601.               BN_with_flags(&local_B, B, BN_FLG_CONSTTIME);
      602.               if (!BN_nnmod(B, &local_B, A, ctx))
                              ^
      603.                   goto err;
      604.               /* Ensure local_B goes out of scope before any further use of B */

crypto/bn/bn_mod.c:118:1: Parameter `ctx->stack.depth`
        116.   #include "bn_lcl.h"
        117.   
        118. > int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx)
        119.   {
        120.       /*

crypto/bn/bn_mod.c:125:11: Call
        123.        */
        124.   
        125.       if (!(BN_mod(r, m, d, ctx)))
                         ^
        126.           return 0;
        127.       if (!r->neg)

crypto/bn/bn_div.c:241:5: Call
          239.       }
          240.   
          241.       BN_CTX_start(ctx);
                     ^
          242.       tmp = BN_CTX_get(ctx);
          243.       snum = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:227:1: Parameter `*ctx->stack.indexes`
            225.   }
            226.   
            227. > void BN_CTX_start(BN_CTX *ctx)
            228.   {
            229.       CTXDBG_ENTRY("BN_CTX_start", ctx);

crypto/bn/bn_div.c:460:5: Call
          458.       if (no_branch)
          459.           bn_correct_top(res);
          460.       BN_CTX_end(ctx);
                     ^
          461.       return (1);
          462.    err:

crypto/bn/bn_ctx.c:241:1: Parameter `*ctx->stack.indexes`
            239.   }
            240.   
            241. > void BN_CTX_end(BN_CTX *ctx)
            242.   {
            243.       CTXDBG_ENTRY("BN_CTX_end", ctx);

crypto/bn/bn_ctx.c:247:27: Call
            245.           ctx->err_stack--;
            246.       else {
            247.           unsigned int fp = BN_STACK_pop(&ctx->stack);
                                             ^
            248.           /* Does this stack frame have anything to release? */
            249.           if (fp < ctx->used)

crypto/bn/bn_ctx.c:317:1: <Offset trace>
315.   }
316.   
317. > static unsigned int BN_STACK_pop(BN_STACK *st)
318.   {
319.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:317:1: Parameter `st->depth`
              315.   }
              316.   
              317. > static unsigned int BN_STACK_pop(BN_STACK *st)
              318.   {
              319.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:317:1: <Length trace>
315.   }
316.   
317. > static unsigned int BN_STACK_pop(BN_STACK *st)
318.   {
319.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:317:1: Parameter `*st->indexes`
              315.   }
              316.   
              317. > static unsigned int BN_STACK_pop(BN_STACK *st)
              318.   {
              319.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:319:12: Array access: Offset: [-1, +oo] Size: [1, +oo] by call to `BN_mod_inverse` 
              317.   static unsigned int BN_STACK_pop(BN_STACK *st)
              318.   {
              319.       return st->indexes[--(st->depth)];
                                ^
              320.   }
              321.   
