lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu,  8 Apr 2010 13:29:33 +0100
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	"David S. Miller" <davem@...emloft.net>
Cc:	Timo Teräs <timo.teras@....fi>,
	netdev@...r.kernel.org,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Subject: [PATCH] xfrm: Fix double dst_release() in xfrm_lookup() -EREMOTE case

Commit 80c802 ("xfrm: cache bundles instead of policies for outgoing
flows") changed __xfrm_policy() to call dst_release() when returning
-EREMOTE. In the case where this is called from xfrm_lookup() a double
call to dst_release() would result due to the existing dst_release()
there. Remove the dst_release() in xfrm_lookup().

Signed-off-by: Mark Brown <broonie@...nsource.wolfsonmicro.com>
---

I'm not sure if this is correct or not - there may a reference been
taken earlier in __xfrm_lookup() that's being dropped but I didn't spot
it.

 net/xfrm/xfrm_policy.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 7430ac2..f133036 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -1881,7 +1881,6 @@ int xfrm_lookup(struct net *net, struct dst_entry **dst_p, struct flowi *fl,
 	int err = __xfrm_lookup(net, dst_p, fl, sk, flags);
 
 	if (err == -EREMOTE) {
-		dst_release(*dst_p);
 		*dst_p = NULL;
 		err = -EAGAIN;
 	}
-- 
1.7.0.3

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ