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: <cf628b45-c527-3390-4738-de7732268e44@gmail.com>
Date:   Sun, 30 May 2021 19:31:43 -0600
From:   David Ahern <dsahern@...il.com>
To:     Xin Long <lucien.xin@...il.com>
Cc:     Jakub Kicinski <kuba@...nel.org>,
        network dev <netdev@...r.kernel.org>,
        davem <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
        Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net] udp: fix the len check in udp_lib_getsockopt

On 5/29/21 10:47 AM, Xin Long wrote:
> On Fri, May 28, 2021 at 9:57 PM David Ahern <dsahern@...il.com> wrote:
>>
>> On 5/28/21 7:47 PM, Xin Long wrote:
>>> The partial byte(or even 0) of the value returned due to passing a wrong
>>> optlen should be considered as an error. "On error, -1 is returned, and
>>> errno is set appropriately.". Success returned in that case only confuses
>>> the user.
>>
>> It is feasible that some app could use bool or u8 for options that have
>> 0 or 1 values and that code has so far worked. This change would break that.
> Got it.
> Not sure if it's possible or necessary to also return -EINVAL if optlen == 0
> 

do_tcp_getsockopt for example does not fail on optlen 0; no reason to
make this one fail.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ