xfrm: Check for esn buffer len in xfrm_new_ae
authorSteffen Klassert <steffen.klassert@secunet.com>
Mon, 28 Mar 2011 19:47:30 +0000 (19:47 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Mar 2011 06:34:52 +0000 (23:34 -0700)
commite2b19125e94124daaeda1ddcf9b85b04575ad86f
treeee670f037ea5b3826731ea5169f1afe94b925f16
parentaf2f464e326ebad57284cfdecb03f1606e89bbc7
xfrm: Check for esn buffer len in xfrm_new_ae

In xfrm_new_ae() we may overwrite the allocated esn replay state
buffer with a wrong size. So check that the new size matches the
original allocated size and return an error if this is not the case.

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>
net/xfrm/xfrm_user.c