diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2012-09-11 12:05:45 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2012-09-11 12:05:45 +0800 |
commit | fb6e03d937365cba54d5d8d923158562169ebfd1 (patch) | |
tree | 9c689f58af98d14e264dbbb5e15d5b0b56e3e743 /crypto/crypto_wq.c | |
parent | 39c69fd2df9dab1f666478e1ecce15744cf02a3e (diff) | |
download | linux-crypto-fb6e03d937365cba54d5d8d923158562169ebfd1.tar.gz linux-crypto-fb6e03d937365cba54d5d8d923158562169ebfd1.zip |
crypto: authenc - Fix crash with zero-length assoc data
The authenc code doesn't deal with zero-length associated data
correctly and ends up constructing a zero-length sg entry which
causes a crash when it's fed into the crypto system.
This patch fixes this by avoiding the code-path that triggers
the SG construction if we have no associated data.
This isn't the most optimal fix as it means that we'll end up
using the fallback code-path even when we could still execute
the digest function. However, this isn't a big deal as nobody
but the test path would supply zero-length associated data.
Reported-by: Romain Francoise <romain@orebokech.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Romain Francoise <romain@orebokech.com>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions