blob: 031456c2c47872ec9edfadf6620ae81c5060e39c [file] [log] [blame]
From stable-bounces@linux.kernel.org Thu Dec 7 00:45:48 2006
Date: Thu, 07 Dec 2006 00:40:36 -0800 (PST)
Message-Id: <20061207.004036.27798861.davem@davemloft.net>
To: stable@kernel.org
From: David Miller <davem@davemloft.net>
Cc: bunk@stusta.de
Subject: IPSEC: Fix inetpeer leak in ipv4 xfrm dst entries.
We grab a reference to the route's inetpeer entry but
forget to release it in xfrm4_dst_destroy().
Bug discovered by Kazunori MIYAZAWA <kazunori@miyazawa.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
commit 26db167702756d0022f8ea5f1f30cad3018cfe31
Author: David S. Miller <davem@sunset.davemloft.net>
Date: Wed Dec 6 23:45:15 2006 -0800
net/ipv4/xfrm4_policy.c | 2 ++
1 file changed, 2 insertions(+)
--- linux-2.6.19.orig/net/ipv4/xfrm4_policy.c
+++ linux-2.6.19/net/ipv4/xfrm4_policy.c
@@ -273,6 +273,8 @@ static void xfrm4_dst_destroy(struct dst
if (likely(xdst->u.rt.idev))
in_dev_put(xdst->u.rt.idev);
+ if (likely(xdst->u.rt.peer))
+ inet_putpeer(xdst->u.rt.peer);
xfrm_dst_destroy(xdst);
}