crypto/ec/ecdsa_ossl.c:423: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned32 by call to `BN_mod_inverse`.
Showing all 22 steps of the trace


crypto/ec/ecdsa_ossl.c:399:5: Call
397.           return -1;
398.       }
399.       BN_CTX_start(ctx);
           ^
400.       u1 = BN_CTX_get(ctx);
401.       u2 = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:235:1: Parameter `ctx->stack.depth`
  233.   }
  234.   
  235. > void BN_CTX_start(BN_CTX *ctx)
  236.   {
  237.       CTXDBG_ENTRY("BN_CTX_start", ctx);

crypto/ec/ecdsa_ossl.c:423:10: Call
421.       }
422.       /* calculate tmp1 = inv(S) mod order */
423.       if (!BN_mod_inverse(u2, sig->s, order, ctx)) {
                ^
424.           ECerr(EC_F_OSSL_ECDSA_VERIFY_SIG, ERR_R_BN_LIB);
425.           goto err;

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:235:1: Parameter `ctx->stack.depth`
        233.   }
        234.   
        235. > void BN_CTX_start(BN_CTX *ctx)
        236.   {
        237.       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:188:1: Parameter `ctx->stack.depth`
          186.    * If 'dv' or 'rm' is NULL, the respective value is not returned.
          187.    */
          188. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
          189.              BN_CTX *ctx)
          190.   {

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:235:1: Parameter `ctx->stack.depth`
            233.   }
            234.   
            235. > void BN_CTX_start(BN_CTX *ctx)
            236.   {
            237.       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:249:1: Parameter `ctx->stack.depth`
            247.   }
            248.   
            249. > void BN_CTX_end(BN_CTX *ctx)
            250.   {
            251.       CTXDBG_ENTRY("BN_CTX_end", ctx);

crypto/bn/bn_ctx.c:255:27: Call
            253.           ctx->err_stack--;
            254.       else {
            255.           unsigned int fp = BN_STACK_pop(&ctx->stack);
                                             ^
            256.           /* Does this stack frame have anything to release? */
            257.           if (fp < ctx->used)

crypto/bn/bn_ctx.c:325:1: <LHS trace>
323.   }
324.   
325. > static unsigned int BN_STACK_pop(BN_STACK *st)
326.   {
327.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:325:1: Parameter `st->depth`
              323.   }
              324.   
              325. > static unsigned int BN_STACK_pop(BN_STACK *st)
              326.   {
              327.       return st->indexes[--(st->depth)];

crypto/bn/bn_ctx.c:327:12: Binary operation: ([0, +oo] - 1):unsigned32 by call to `BN_mod_inverse` 
              325.   static unsigned int BN_STACK_pop(BN_STACK *st)
              326.   {
              327.       return st->indexes[--(st->depth)];
                                ^
              328.   }
              329.   
