crypto/rsa/rsa_chk.c:78: error: BUFFER_OVERRUN_L3
  Offset: [-1, +oo] Size: 12 by call to `BN_is_prime`.
Showing all 42 steps of the trace


crypto/rsa/rsa_chk.c:68:8: Call
66.   	l = BN_new();
67.   	m = BN_new();
68.   	ctx = BN_CTX_new();
             ^
69.   	if (i == NULL || j == NULL || k == NULL || l == NULL ||
70.   		m == NULL || ctx == NULL)

crypto/bn/bn_ctx.c:79:2: Call
  77.   		}
  78.   
  79.   	BN_CTX_init(ret);
         ^
  80.   	ret->flags=BN_FLG_MALLOCED;
  81.   	return(ret);

crypto/bn/bn_ctx.c:89:2: Assignment
    87.   	ctx->tos = 0;
    88.   	ctx->flags = 0;
    89.   	ctx->depth = 0;
           ^
    90.   	ctx->too_many = 0;
    91.   	for (i = 0; i < BN_CTX_NUM; i++)

crypto/rsa/rsa_chk.c:78:6: Call
76.   	
77.   	/* p prime? */
78.   	r = BN_is_prime(key->p, BN_prime_checks, NULL, NULL, NULL);
           ^
79.   	if (r != 1)
80.   		{

crypto/bn/bn_prime.c:211:1: Parameter `ctx_passed->depth`
  209.   	}
  210.   
  211. > int BN_is_prime(const BIGNUM *a, int checks, void (*callback)(int,int,void *),
  212.   	BN_CTX *ctx_passed, void *cb_arg)
  213.   	{

crypto/bn/bn_prime.c:214:9: Call
  212.   	BN_CTX *ctx_passed, void *cb_arg)
  213.   	{
  214.   	return BN_is_prime_fasttest(a, checks, callback, ctx_passed, cb_arg, 0);
                 ^
  215.   	}
  216.   

crypto/bn/bn_prime.c:217:1: Parameter `ctx_passed->depth`
    215.   	}
    216.   
    217. > int BN_is_prime_fasttest(const BIGNUM *a, int checks,
    218.   		void (*callback)(int,int,void *),
    219.   		BN_CTX *ctx_passed, void *cb_arg,

crypto/bn/bn_prime.c:248:2: Call
    246.   		if ((ctx=BN_CTX_new()) == NULL)
    247.   			goto err;
    248.   	BN_CTX_start(ctx);
            ^
    249.   
    250.   	/* A := abs(a) */

crypto/bn/bn_ctx.c:108:1: Parameter `ctx->depth`
      106.   	}
      107.   
      108. > void BN_CTX_start(BN_CTX *ctx)
      109.   	{
      110.   	if (ctx->depth < BN_CTX_NUM_POS)

crypto/bn/bn_ctx.c:112:2: Assignment
      110.   	if (ctx->depth < BN_CTX_NUM_POS)
      111.   		ctx->pos[ctx->depth] = ctx->tos;
      112.   	ctx->depth++;
              ^
      113.   	}
      114.   

crypto/bn/bn_prime.c:261:7: Call
    259.   	else
    260.   		A = a;
    261.   	A1 = BN_CTX_get(ctx);
                 ^
    262.   	A1_odd = BN_CTX_get(ctx);
    263.   	check = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:116:1: Parameter `ctx->depth`
      114.   
      115.   
      116. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
      117.   	{
      118.   	/* Note: If BN_CTX_get is ever changed to allocate BIGNUMs dynamically,

crypto/bn/bn_prime.c:262:11: Call
    260.   		A = a;
    261.   	A1 = BN_CTX_get(ctx);
    262.   	A1_odd = BN_CTX_get(ctx);
                     ^
    263.   	check = BN_CTX_get(ctx);
    264.   	if (check == NULL) goto err;

crypto/bn/bn_ctx.c:116:1: Parameter `ctx->depth`
      114.   
      115.   
      116. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
      117.   	{
      118.   	/* Note: If BN_CTX_get is ever changed to allocate BIGNUMs dynamically,

crypto/bn/bn_prime.c:263:10: Call
    261.   	A1 = BN_CTX_get(ctx);
    262.   	A1_odd = BN_CTX_get(ctx);
    263.   	check = BN_CTX_get(ctx);
                    ^
    264.   	if (check == NULL) goto err;
    265.   

crypto/bn/bn_ctx.c:116:1: Parameter `ctx->depth`
      114.   
      115.   
      116. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
      117.   	{
      118.   	/* Note: If BN_CTX_get is ever changed to allocate BIGNUMs dynamically,

crypto/bn/bn_prime.c:288:7: Call
    286.   	if (mont == NULL)
    287.   		goto err;
    288.   	if (!BN_MONT_CTX_set(mont, A, ctx))
                 ^
    289.   		goto err;
    290.   	

crypto/bn/bn_mont.c:270:1: Parameter `ctx->depth`
      268.   	}
      269.   
      270. > int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx)
      271.   	{
      272.   	BIGNUM Ri,*R;

crypto/bn/bn_mont.c:294:8: Call
      292.   		tmod.neg=mod->neg;
      293.   							/* Ri = R^-1 mod N*/
      294.   		if ((BN_mod_inverse(&Ri,R,&tmod,ctx)) == NULL)
                    ^
      295.   			goto err;
      296.   		BN_lshift(&Ri,&Ri,BN_BITS2);		/* R*Ri */

crypto/bn/bn_gcd.c:147:1: Parameter `ctx->depth`
        145.   
        146.   /* solves ax == 1 (mod n) */
        147. > BIGNUM *BN_mod_inverse(BIGNUM *in,
        148.   	const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx)
        149.   	{

crypto/bn/bn_gcd.c:157:2: Call
        155.   	bn_check_top(n);
        156.   
        157.   	BN_CTX_start(ctx);
                ^
        158.   	A = BN_CTX_get(ctx);
        159.   	B = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:108:1: Parameter `ctx->depth`
          106.   	}
          107.   
          108. > void BN_CTX_start(BN_CTX *ctx)
          109.   	{
          110.   	if (ctx->depth < BN_CTX_NUM_POS)

crypto/bn/bn_ctx.c:112:2: Assignment
          110.   	if (ctx->depth < BN_CTX_NUM_POS)
          111.   		ctx->pos[ctx->depth] = ctx->tos;
          112.   	ctx->depth++;
                  ^
          113.   	}
          114.   

crypto/bn/bn_gcd.c:158:6: Call
        156.   
        157.   	BN_CTX_start(ctx);
        158.   	A = BN_CTX_get(ctx);
                    ^
        159.   	B = BN_CTX_get(ctx);
        160.   	X = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:116:1: Parameter `ctx->depth`
          114.   
          115.   
          116. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
          117.   	{
          118.   	/* Note: If BN_CTX_get is ever changed to allocate BIGNUMs dynamically,

crypto/bn/bn_gcd.c:159:6: Call
        157.   	BN_CTX_start(ctx);
        158.   	A = BN_CTX_get(ctx);
        159.   	B = BN_CTX_get(ctx);
                    ^
        160.   	X = BN_CTX_get(ctx);
        161.   	D = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:116:1: Parameter `ctx->depth`
          114.   
          115.   
          116. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
          117.   	{
          118.   	/* Note: If BN_CTX_get is ever changed to allocate BIGNUMs dynamically,

crypto/bn/bn_gcd.c:160:6: Call
        158.   	A = BN_CTX_get(ctx);
        159.   	B = BN_CTX_get(ctx);
        160.   	X = BN_CTX_get(ctx);
                    ^
        161.   	D = BN_CTX_get(ctx);
        162.   	M = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:116:1: Parameter `ctx->depth`
          114.   
          115.   
          116. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
          117.   	{
          118.   	/* Note: If BN_CTX_get is ever changed to allocate BIGNUMs dynamically,

crypto/bn/bn_gcd.c:161:6: Call
        159.   	B = BN_CTX_get(ctx);
        160.   	X = BN_CTX_get(ctx);
        161.   	D = BN_CTX_get(ctx);
                    ^
        162.   	M = BN_CTX_get(ctx);
        163.   	Y = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:116:1: Parameter `ctx->depth`
          114.   
          115.   
          116. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
          117.   	{
          118.   	/* Note: If BN_CTX_get is ever changed to allocate BIGNUMs dynamically,

crypto/bn/bn_gcd.c:162:6: Call
        160.   	X = BN_CTX_get(ctx);
        161.   	D = BN_CTX_get(ctx);
        162.   	M = BN_CTX_get(ctx);
                    ^
        163.   	Y = BN_CTX_get(ctx);
        164.   	if (Y == NULL) goto err;

crypto/bn/bn_ctx.c:116:1: Parameter `ctx->depth`
          114.   
          115.   
          116. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
          117.   	{
          118.   	/* Note: If BN_CTX_get is ever changed to allocate BIGNUMs dynamically,

crypto/bn/bn_gcd.c:163:6: Call
        161.   	D = BN_CTX_get(ctx);
        162.   	M = BN_CTX_get(ctx);
        163.   	Y = BN_CTX_get(ctx);
                    ^
        164.   	if (Y == NULL) goto err;
        165.   

crypto/bn/bn_ctx.c:116:1: Parameter `ctx->depth`
          114.   
          115.   
          116. > BIGNUM *BN_CTX_get(BN_CTX *ctx)
          117.   	{
          118.   	/* Note: If BN_CTX_get is ever changed to allocate BIGNUMs dynamically,

crypto/bn/bn_gcd.c:208:2: Call
        206.   err:
        207.   	if ((ret == NULL) && (in == NULL)) BN_free(R);
        208.   	BN_CTX_end(ctx);
                ^
        209.   	return(ret);
        210.   	}

crypto/bn/bn_ctx.c:136:1: <Offset trace>
134.   	}
135.   
136. > void BN_CTX_end(BN_CTX *ctx)
137.   	{
138.   	if (ctx == NULL) return;

crypto/bn/bn_ctx.c:136:1: Parameter `ctx->depth`
          134.   	}
          135.   
          136. > void BN_CTX_end(BN_CTX *ctx)
          137.   	{
          138.   	if (ctx == NULL) return;

crypto/bn/bn_ctx.c:147:2: Assignment
          145.   
          146.   	ctx->too_many = 0;
          147.   	ctx->depth--;
                  ^
          148.   	if (ctx->depth < BN_CTX_NUM_POS)
          149.   		ctx->tos = ctx->pos[ctx->depth];

crypto/bn/bn_ctx.c:136:1: <Length trace>
134.   	}
135.   
136. > void BN_CTX_end(BN_CTX *ctx)
137.   	{
138.   	if (ctx == NULL) return;

crypto/bn/bn_ctx.c:136:1: Parameter `ctx->pos[*]`
          134.   	}
          135.   
          136. > void BN_CTX_end(BN_CTX *ctx)
          137.   	{
          138.   	if (ctx == NULL) return;

crypto/bn/bn_ctx.c:149:14: Array access: Offset: [-1, +oo] Size: 12 by call to `BN_is_prime` 
          147.   	ctx->depth--;
          148.   	if (ctx->depth < BN_CTX_NUM_POS)
          149.   		ctx->tos = ctx->pos[ctx->depth];
                              ^
          150.   	}
