Re: [PATCH] crypto: AES-NI: fix memory usage in GCM decryption

2015-03-11 Thread Herbert Xu
On Wed, Mar 11, 2015 at 09:01:02AM +0100, Stephan Mueller wrote: > > However, I think there is an error in the calculation of the AAD pointer > offset. That offset is currently calculated as: > > assoc = (src + req->cryptlen + auth_tag_len); > > But instead, it should be: > > assoc = (src + req

Re: [PATCH] crypto: AES-NI: fix memory usage in GCM decryption

2015-03-11 Thread Stephan Mueller
Am Dienstag, 10. März 2015, 20:45:43 schrieb Herbert Xu: Hi Herbert, > On Sun, Mar 08, 2015 at 07:49:58PM +0100, Stephan Mueller wrote: > > The RFC4106 GCM decryption operation tries to overwrite cryptlen memory > > in req->dst. As the destination buffer for decryption only needs to hold > > the

Re: [PATCH] crypto: AES-NI: fix memory usage in GCM decryption

2015-03-10 Thread Herbert Xu
On Sun, Mar 08, 2015 at 07:49:58PM +0100, Stephan Mueller wrote: > The RFC4106 GCM decryption operation tries to overwrite cryptlen memory > in req->dst. As the destination buffer for decryption only needs to hold > the plaintext memory but cryptlen references the input buffer holding > (ciphertext

[PATCH] crypto: AES-NI: fix memory usage in GCM decryption

2015-03-08 Thread Stephan Mueller
The RFC4106 GCM decryption operation tries to overwrite cryptlen memory in req->dst. As the destination buffer for decryption only needs to hold the plaintext memory but cryptlen references the input buffer holding (ciphertext || authentication tag), the assumption of the destination buffer length