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:	Wed, 14 Jan 2009 16:26:57 +0800
From:	Shan Wei <shanwei@...fujitsu.com>
To:	Yang Hongyang <yanghy@...fujitsu.com>
CC:	Wei Yongjun <yjwei@...fujitsu.com>,
	Herbert Xu <herbert@...dor.apana.org.au>,
	netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [PATCH]IPv6:remove duplicate check of optlen when setsockopt
 with IPV6_PKTINFO option

Yang Hongyang said:
> Wei Yongjun wrote:
>> Yang Hongyang wrote:
>>> Herbert Xu wrote:
>>>  
>>>> Yang Hongyang <yanghy@...fujitsu.com> wrote:
>>>>    
>>>>> Actually the condition (optlen == 0) is included in (optlen <
>>>>> sizeof(struct in6_pktinfo)),
>>>>> so we do not need to check it separately.
>>>>>       
>>>> You don't need to check optval == NULL either since that's the
>>>> job of copy_from_user.
>>>>     
>>> If optval==NULL, what we should return?EINVAL or EFAULT?
>>> If it is EINVAL,then we should check it .otherwise it's the job of
>>> copy_from_user
>>>   
>> I think if optval==NULL, the in6_pktinfo which is set should be remove.
>> So, you should handle optval==NULL. Not just return error.
> 
> There's no RFC defines the behavior above,but:
>   RFC3542 said The application can remove any sticky Routing header or sticky 
> Destination options header or sticky Hop-by-Hop options header by calling 
> setsockopt() with a zero option length.
> 
> So,do we need to allow remove any sticky pktinfo option by calling 
> setsockopt() with a zero option length?
> 

Can remove the option using seting in6_pktinfo struct wiht 
ipi6_ifindex=0,ipi6_ifindex=IN6ADDR_ANY_INIT.

If no RFC definition, not to reset with optlen=0,
for example IPV6_TCLASS, PV6_2292DSTOPTS.

-- 
Best Regards
Shan Wei
--
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