On Tue, Jan 13, 2015 at 02:21:58PM -0800, Tadeusz Struk wrote:
> 
> Yes, it looks strange, but the issue is we don't really zero the whole
> auth_state. Because struct qat_auth_state is no packed on my system
> 
> sizeof(MAX_AUTH_STATE_SIZE + 64) = 244
> 
> and sizeof(struct qat_auth_state) = 256

That's seriously wrong.  What if the compiler decided to not add
that padding? You will be scribbling all over the stack.

Why are you allocating this qat_auth_state anyway? Just do
ipad/opad[block_size] and be done with it.

Cheers,
-- 
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to