A possible divide by zero bug in drbg_ctr_df

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In crypto/drbg.c, the function drbg_ctr_df has the following code:

padlen = (inputlen + sizeof(L_N) + 1) % (drbg_blocklen(drbg));

However, the function drbg_blocklen may return zero:

static inline __u8 drbg_blocklen(struct drbg_state *drbg)
{
    if (drbg && drbg->core)
        return drbg->core->blocklen_bytes;
    return 0;
}

Is it possible to trigger a divide by zero problem here?



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux