xfrm: Perform a replay check after return from async codepaths
commit23b576bfe4a6056afb6bca3cd1cb96581f4cb19d
authorSteffen Klassert <steffen.klassert@secunet.com>
Tue, 20 Sep 2011 23:38:58 +0000 (20 23:38 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 3 Oct 2011 18:40:55 +0000 (3 11:40 -0700)
treea59620d86b35fa1cddf5490a0a23a50f862bd324
parentb082a5631a746b494553f7c72b387cb625a1674a
xfrm: Perform a replay check after return from async codepaths

[ Upstream commit bcf66bf54aabffc150acd1c99e0f4bc51935eada ]

When asyncronous crypto algorithms are used, there might be many
packets that passed the xfrm replay check, but the replay advance
function is not called yet for these packets. So the replay check
function would accept a replay of all of these packets. Also the
system might crash if there are more packets in async processing
than the size of the anti replay window, because the replay advance
function would try to update the replay window beyond the bounds.

This pach adds a second replay check after resuming from the async
processing to fix these issues.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/xfrm/xfrm_input.c