From: Herbert Xu Date: Tue, 11 Sep 2012 04:05:45 +0000 (+0800) Subject: crypto: authenc - Fix crash with zero-length assoc data X-Git-Tag: v3.6-rc6~31^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b2f4cb65f7083cde86553cd56d6c2878e04932a;p=pandora-kernel.git 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 Signed-off-by: Herbert Xu Tested-by: Romain Francoise --- Reading git-diff-tree failed