apps/s_client.c:239: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_rshift1`.
Showing all 19 steps of the trace


apps/s_client.c:238:9: Call
236.       int ret =
237.           g != NULL && N != NULL && bn_ctx != NULL && BN_is_odd(N) &&
238.           BN_is_prime_ex(N, SRP_NUMBER_ITERATIONS_FOR_PRIME, bn_ctx, NULL) == 1 &&
               ^
239.           p != NULL && BN_rshift1(p, N) &&
240.           /* p = (N-1)/2 */

crypto/bn/bn_prime.c:150:12: Call
  148.                      BN_GENCB *cb)
  149.   {
  150.       return BN_is_prime_fasttest_ex(a, checks, ctx_passed, 0, cb);
                    ^
  151.   }
  152.   

crypto/bn/bn_prime.c:217:10: Call
    215.       if (mont == NULL)
    216.           goto err;
    217.       if (!BN_MONT_CTX_set(mont, a, ctx))
                    ^
    218.           goto err;
    219.   

crypto/bn/bn_mont.c:338:14: Call
      336.                   goto err;       /* Ri-- (mod word size) */
      337.           }
      338.           if (!BN_div(Ri, NULL, Ri, &tmod, ctx))
                          ^
      339.               goto err;
      340.           /*

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

apps/s_client.c:239:22: Call
237.           g != NULL && N != NULL && bn_ctx != NULL && BN_is_odd(N) &&
238.           BN_is_prime_ex(N, SRP_NUMBER_ITERATIONS_FOR_PRIME, bn_ctx, NULL) == 1 &&
239.           p != NULL && BN_rshift1(p, N) &&
                            ^
240.           /* p = (N-1)/2 */
241.           BN_is_prime_ex(p, SRP_NUMBER_ITERATIONS_FOR_PRIME, bn_ctx, NULL) == 1 &&

crypto/bn/bn_shift.c:46:1: Parameter `*r->d`
  44.   }
  45.   
  46. > int BN_rshift1(BIGNUM *r, const BIGNUM *a)
  47.   {
  48.       BN_ULONG *ap, *rp, t, c;

crypto/bn/bn_shift.c:55:9: Call
  53.   
  54.       if (BN_is_zero(a)) {
  55.           BN_zero(r);
                ^
  56.           return (1);
  57.       }

crypto/bn/bn_lib.c:395:1: Parameter `*a->d`
    393.   }
    394.   
    395. > int BN_set_word(BIGNUM *a, BN_ULONG w)
    396.   {
    397.       bn_check_top(a);

crypto/bn/bn_lib.c:398:9: Call
    396.   {
    397.       bn_check_top(a);
    398.       if (bn_expand(a, (int)sizeof(BN_ULONG) * 8) == NULL)
                   ^
    399.           return (0);
    400.       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_lcl.h:668:12: Call
      666.           return a;
      667.   
      668.       return bn_expand2((a),(bits+BN_BITS2-1)/BN_BITS2);
                        ^
      669.   }
      670.   

crypto/bn/bn_lib.c:284:1: Parameter `*b->d`
        282.    */
        283.   
        284. > BIGNUM *bn_expand2(BIGNUM *b, int words)
        285.   {
        286.       bn_check_top(b);

crypto/bn/bn_lib.c:289:23: Call
        287.   
        288.       if (words > b->dmax) {
        289.           BN_ULONG *a = bn_expand_internal(b, words);
                                     ^
        290.           if (!a)
        291.               return NULL;

crypto/bn/bn_lib.c:246:1: <Offset trace>
244.   /* This is used by bn_expand2() */
245.   /* The caller MUST check that words > b->dmax before calling this */
246. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
247.   {
248.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:246:1: Parameter `b->top`
          244.   /* This is used by bn_expand2() */
          245.   /* The caller MUST check that words > b->dmax before calling this */
          246. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
          247.   {
          248.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:246:1: <Length trace>
244.   /* This is used by bn_expand2() */
245.   /* The caller MUST check that words > b->dmax before calling this */
246. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
247.   {
248.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:246:1: Parameter `*b->d`
          244.   /* This is used by bn_expand2() */
          245.   /* The caller MUST check that words > b->dmax before calling this */
          246. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
          247.   {
          248.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:271:9: Array access: Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_rshift1` 
          269.       assert(b->top <= words);
          270.       if (b->top > 0)
          271.           memcpy(a, b->d, sizeof(*a) * b->top);
                         ^
          272.   
          273.       return a;
