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>
Thu, 26 Jan 2012 01:24:51 +0000 (17:24 -0800)
commitc0ab420c6822529fa5aba05668e1e983b065460f
tree8e8e2be923a3587c3847a98332998f89abdd0da8
parentd253520a7b2c2223fb4f704f06d10f2c547bdeef
ah: Read nexthdr value before overwriting it in ahash input callback.

commit b7ea81a58adc123a4e980cb0eff9eb5c144b5dc7 upstream.

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