engines/ccgost/gost_sign.c:170: error: INTEGER_OVERFLOW_L2
  ([0, `dsa->q->top`] - 1):unsigned64 by call to `BN_mod_exp`.
Showing all 21 steps of the trace


engines/ccgost/gost_sign.c:135:1: Parameter `dsa->q->top`
133.    */
134.   
135. > int gost_do_verify(const unsigned char *dgst, int dgst_len,
136.   	DSA_SIG *sig, DSA *dsa)
137.   	{

engines/ccgost/gost_sign.c:146:6: Call
144.   
145.   	BN_CTX_start(ctx);
146.   	if (BN_cmp(sig->s,dsa->q)>=1||
            ^
147.   		BN_cmp(sig->r,dsa->q)>=1)
148.   		{

crypto/bn/bn_lib.c:678:1: Parameter `a->top`
  676.   	}
  677.   
  678. > int BN_cmp(const BIGNUM *a, const BIGNUM *b)
  679.   	{
  680.   	int i;

engines/ccgost/gost_sign.c:147:3: Call
145.   	BN_CTX_start(ctx);
146.   	if (BN_cmp(sig->s,dsa->q)>=1||
147.   		BN_cmp(sig->r,dsa->q)>=1)
         ^
148.   		{
149.   		GOSTerr(GOST_F_GOST_DO_VERIFY,GOST_R_SIGNATURE_PARTS_GREATER_THAN_Q);

crypto/bn/bn_lib.c:678:1: Parameter `a->top`
  676.   	}
  677.   
  678. > int BN_cmp(const BIGNUM *a, const BIGNUM *b)
  679.   	{
  680.   	int i;

engines/ccgost/gost_sign.c:163:2: Call
161.   	u = BN_CTX_get(ctx);
162.   	
163.   	BN_mod(tmp,md,dsa->q,ctx);
        ^
164.   	if (BN_is_zero(tmp))
165.   		{

crypto/bn/bn_div.c:181:1: Parameter `divisor->top`
  179.   static int BN_div_no_branch(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num,
  180.           const BIGNUM *divisor, BN_CTX *ctx);
  181. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
  182.   	   BN_CTX *ctx)
  183.   	{

engines/ccgost/gost_sign.c:168:2: Call
166.   		BN_one(md);
167.   		}
168.   	BN_copy(q2,dsa->q);
        ^
169.   	BN_sub_word(q2,2);
170.   	BN_mod_exp(v,md,q2,dsa->q,ctx);

crypto/bn/bn_lib.c:497:1: Parameter `a->dmax`
  495.   	}
  496.   
  497. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
  498.   	{
  499.   	int i;

engines/ccgost/gost_sign.c:170:2: Call
168.   	BN_copy(q2,dsa->q);
169.   	BN_sub_word(q2,2);
170.   	BN_mod_exp(v,md,q2,dsa->q,ctx);
        ^
171.   	BN_mod_mul(z1,sig->s,v,dsa->q,ctx);
172.   	BN_sub(tmp,dsa->q,sig->r);

crypto/bn/bn_exp.c:163:1: Parameter `m->top`
  161.   
  162.   
  163. > int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m,
  164.   	       BN_CTX *ctx)
  165.   	{

crypto/bn/bn_exp.c:228:9: Call
  226.   #endif
  227.   #ifdef RECP_MUL_MOD
  228.   		{ ret=BN_mod_exp_recp(r,a,p,m,ctx); }
                 ^
  229.   #else
  230.   		{ ret=BN_mod_exp_simple(r,a,p,m,ctx); }

crypto/bn/bn_exp.c:238:1: Parameter `m->top`
    236.   
    237.   
    238. > int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
    239.   		    const BIGNUM *m, BN_CTX *ctx)
    240.   	{

crypto/bn/bn_exp.c:278:7: Call
    276.   	else
    277.   		{
    278.   		if (BN_RECP_CTX_set(&recp,m,ctx) <= 0) goto err;
                 ^
    279.   		}
    280.   

crypto/bn/bn_recp.c:94:1: Parameter `d->top`
      92.   	}
      93.   
      94. > int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *d, BN_CTX *ctx)
      95.   	{
      96.   	if (!BN_copy(&(recp->N),d)) return 0;

crypto/bn/bn_recp.c:96:7: Call
      94.   int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *d, BN_CTX *ctx)
      95.   	{
      96.   	if (!BN_copy(&(recp->N),d)) return 0;
                  ^
      97.   	BN_zero(&(recp->Nr));
      98.   	recp->num_bits=BN_num_bits(d);

crypto/bn/bn_lib.c:497:1: Parameter `a->dmax`
        495.   	}
        496.   
        497. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
        498.   	{
        499.   	int i;

crypto/bn/bn_recp.c:98:17: Call
      96.   	if (!BN_copy(&(recp->N),d)) return 0;
      97.   	BN_zero(&(recp->Nr));
      98.   	recp->num_bits=BN_num_bits(d);
                             ^
      99.   	recp->shift=0;
      100.   	return(1);

crypto/bn/bn_lib.c:248:1: <LHS trace>
246.   	}
247.   
248. > int BN_num_bits(const BIGNUM *a)
249.   	{
250.   	int i = a->top - 1;

crypto/bn/bn_lib.c:248:1: Parameter `a->top`
        246.   	}
        247.   
        248. > int BN_num_bits(const BIGNUM *a)
        249.   	{
        250.   	int i = a->top - 1;

crypto/bn/bn_lib.c:250:2: Binary operation: ([0, dsa->q->top] - 1):unsigned64 by call to `BN_mod_exp` 
        248.   int BN_num_bits(const BIGNUM *a)
        249.   	{
        250.   	int i = a->top - 1;
                ^
        251.   	bn_check_top(a);
        252.   
