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]
Date:	Tue, 04 Dec 2007 15:23:01 +0900
From:	Kazunori MIYAZAWA <kazunori@...azawa.org>
To:	Herbert Xu <herbert@...dor.apana.org.au>
CC:	netdev@...r.kernel.org, usagi-core@...ux-ipv6.org,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH][IPv6][IPsec] fix the address family for xfrm_state_lookup
 in xfrm_input

Herbert Xu wrote:
> On Tue, Dec 04, 2007 at 02:28:36PM +0900, Kazunori MIYAZAWA wrote:
>> Hi Herbert, 
>>
>> This is the patch to fix IPv6 IPsec input.
>>
>> Signed-off-by: Kazunori MIYAZAWA <kazunori@...azawa.org>
> 
> Good catch! Thanks.
> 
>> diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c
>> index 96f42c1..da3c963 100644
>> --- a/net/xfrm/xfrm_input.c
>> +++ b/net/xfrm/xfrm_input.c
>> @@ -136,7 +136,7 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type)
>>  		if (skb->sp->len == XFRM_MAX_DEPTH)
>>  			goto drop;
>>  
>> -		x = xfrm_state_lookup(daddr, spi, nexthdr, AF_INET);
>> +		x = xfrm_state_lookup(daddr, spi, nexthdr, skb->dst->ops->family);
> 
> I'd prefer to put this in XFRM_SPI_SKB_CB instead because the xfrm
> layer shouldn't really rely on dst->ops structures except on entry
> and exit, like this:
> 
> [IPSEC]: Use the correct family for input state lookup
> 
> When merging the input paths of IPsec I accidentally left a hard-coded
> AF_INET for the state lookup call.  This broke IPv6 obviously.  This
> patch fixes by getting the input callers to specify the family through
> skb->cb.
> 
> Credit goes to Kazunori Miyazawa for diagnosing this and providing an
> initial patch.
> 
> Signed-off-by: Herbert Xu <herbert@...dor.apana.org.au>
> 
> Cheers,

It works fine.

Thank you!!

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