]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
xfrm: Fix replay size checking on async events
authorSteffen Klassert <steffen.klassert@secunet.com>
Mon, 9 Sep 2013 07:39:01 +0000 (09:39 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Mon, 16 Sep 2013 07:39:37 +0000 (09:39 +0200)
We pass the wrong netlink attribute to xfrm_replay_verify_len().
It should be XFRMA_REPLAY_ESN_VAL and not XFRMA_REPLAY_VAL as
we currently doing. This causes memory corruptions if the
replay esn attribute has incorrect length. Fix this by passing
the right attribute to xfrm_replay_verify_len().

Reported-by: Michael Rossberg <michael.rossberg@tu-ilmenau.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_user.c

index 3f565e495ac68cea83e1d52cf7db7e820fe777ad..4b26ceedff269aa88fc02e222458ca69823e5746 100644 (file)
@@ -1856,7 +1856,7 @@ static int xfrm_new_ae(struct sk_buff *skb, struct nlmsghdr *nlh,
        if (x->km.state != XFRM_STATE_VALID)
                goto out;
 
-       err = xfrm_replay_verify_len(x->replay_esn, rp);
+       err = xfrm_replay_verify_len(x->replay_esn, re);
        if (err)
                goto out;