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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5A90DA2E42F8AE43BC4A093BF0678848E4D693@SHSMSX104.ccr.corp.intel.com>
Date:	Wed, 29 Apr 2015 05:25:25 +0000
From:	"Du, Fan" <fan.du@...el.com>
To:	"roy.qing.li@...il.com" <roy.qing.li@...il.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:	"steffen.klassert@...unet.com" <steffen.klassert@...unet.com>,
	"Du, Fan" <fan.du@...el.com>
Subject: RE: [PATCH] xfrm: fix a race in xfrm_state_lookup_byspi


>-----Original Message-----
>From: roy.qing.li@...il.com [mailto:roy.qing.li@...il.com]
>Sent: Wednesday, April 29, 2015 8:43 AM
>To: netdev@...r.kernel.org
>Cc: Du, Fan; steffen.klassert@...unet.com
>Subject: [PATCH] xfrm: fix a race in xfrm_state_lookup_byspi
>
>From: Li RongQing <roy.qing.li@...il.com>
>
>The returned xfrm_state should be hold before unlock xfrm_state_lock,
>otherwise the returned xfrm_state maybe be released.
>
>Fixes: c454997e6[{pktgen, xfrm} Introduce xfrm_state_lookup_byspi..]
>Cc: Fan Du <fan.du@...el.com>
>Signed-off-by: Li RongQing <roy.qing.li@...il.com>

Acked-by: Fan Du <fan.du@...el.com>
 

>---
> net/xfrm/xfrm_state.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
>index f5e39e3..96688cd 100644
>--- a/net/xfrm/xfrm_state.c
>+++ b/net/xfrm/xfrm_state.c
>@@ -927,8 +927,8 @@ struct xfrm_state *xfrm_state_lookup_byspi(struct net
>*net, __be32 spi,
> 			x->id.spi != spi)
> 			continue;
>
>-		spin_unlock_bh(&net->xfrm.xfrm_state_lock);
> 		xfrm_state_hold(x);
>+		spin_unlock_bh(&net->xfrm.xfrm_state_lock);
> 		return x;
> 	}
> 	spin_unlock_bh(&net->xfrm.xfrm_state_lock);
>--
>2.1.0

--
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