This is a note to let you know that I've just added the patch titled
xfrm_user: don't copy esn replay window twice for new states
to the 3.5-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
xfrm_user-don-t-copy-esn-replay-window-twice-for-new-states.patch
and it can be found in the queue-3.5 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 48a86b1f8fd04276ad7e2878e0a27512fb8f1e40 Mon Sep 17 00:00:00 2001
From: Mathias Krause <[email protected]>
Date: Wed, 19 Sep 2012 11:33:43 +0000
Subject: xfrm_user: don't copy esn replay window twice for new states
From: Mathias Krause <[email protected]>
[ Upstream commit e3ac104d41a97b42316915020ba228c505447d21 ]
The ESN replay window was already fully initialized in
xfrm_alloc_replay_state_esn(). No need to copy it again.
Cc: Steffen Klassert <[email protected]>
Signed-off-by: Mathias Krause <[email protected]>
Acked-by: Steffen Klassert <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
net/xfrm/xfrm_user.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -442,10 +442,11 @@ static void copy_from_user_state(struct
* somehow made shareable and move it to xfrm_state.c - JHS
*
*/
-static void xfrm_update_ae_params(struct xfrm_state *x, struct nlattr **attrs)
+static void xfrm_update_ae_params(struct xfrm_state *x, struct nlattr **attrs,
+ int update_esn)
{
struct nlattr *rp = attrs[XFRMA_REPLAY_VAL];
- struct nlattr *re = attrs[XFRMA_REPLAY_ESN_VAL];
+ struct nlattr *re = update_esn ? attrs[XFRMA_REPLAY_ESN_VAL] : NULL;
struct nlattr *lt = attrs[XFRMA_LTIME_VAL];
struct nlattr *et = attrs[XFRMA_ETIMER_THRESH];
struct nlattr *rt = attrs[XFRMA_REPLAY_THRESH];
@@ -555,7 +556,7 @@ static struct xfrm_state *xfrm_state_con
goto error;
/* override default values from above */
- xfrm_update_ae_params(x, attrs);
+ xfrm_update_ae_params(x, attrs, 0);
return x;
@@ -1819,7 +1820,7 @@ static int xfrm_new_ae(struct sk_buff *s
goto out;
spin_lock_bh(&x->lock);
- xfrm_update_ae_params(x, attrs);
+ xfrm_update_ae_params(x, attrs, 1);
spin_unlock_bh(&x->lock);
c.event = nlh->nlmsg_type;
Patches currently in stable-queue which might be from [email protected] are
queue-3.5/xfrm_user-return-error-pointer-instead-of-null-2.patch
queue-3.5/xfrm_user-don-t-copy-esn-replay-window-twice-for-new-states.patch
queue-3.5/xfrm_user-fix-info-leak-in-copy_to_user_tmpl.patch
queue-3.5/xfrm_user-fix-info-leak-in-copy_to_user_auth.patch
queue-3.5/xfrm_user-return-error-pointer-instead-of-null.patch
queue-3.5/xfrm_user-fix-info-leak-in-copy_to_user_policy.patch
queue-3.5/xfrm_user-fix-info-leak-in-copy_to_user_state.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html