ah: Read nexthdr value before overwriting it in ahash input callback.
authorNick Bowler <nbowler@elliptictech.com>
Tue, 8 Nov 2011 12:12:45 +0000 (12:12 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 9 Dec 2011 16:55:57 +0000 (08:55 -0800)
commitf82c753512bfe2fb4127ee72c882924120c11de8
tree4169d11e2952ec0ac1d5ef9ed622c6d5b0622629
parentcfa73cca0cac4e07cc963f332aead8d118707432
ah: Read nexthdr value before overwriting it in ahash input callback.

[ Upstream commit b7ea81a58adc123a4e980cb0eff9eb5c144b5dc7 ]

The AH4/6 ahash input callbacks read out the nexthdr field from the AH
header *after* they overwrite that header.  This is obviously not going
to end well.  Fix it up.

Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/ipv4/ah4.c
net/ipv6/ah6.c