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: <a730696a-9361-d39e-5dc1-280dc8d0f052@gmail.com>
Date:   Tue, 7 Jan 2020 19:41:20 -0700
From:   David Ahern <dsahern@...il.com>
To:     Casey Schaufler <casey@...aufler-ca.com>,
        Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
Cc:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: commit b9ef5513c99b breaks ping to ipv6 linklocal addresses on
 debian buster

On 1/7/20 11:44 AM, David Ahern wrote:
> On 1/7/20 11:40 AM, Casey Schaufler wrote:
>> Does this patch address the Debian issue? It works for the test program
>> and on my Fedora system.
>>
>>
>>  security/smack/smack_lsm.c | 9 ++++++---
>>  1 file changed, 6 insertions(+), 3 deletions(-)
>>
>> diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
>> index 50c536cad85b..b0bb36419aeb 100644
>> --- a/security/smack/smack_lsm.c
>> +++ b/security/smack/smack_lsm.c
>> @@ -2857,7 +2857,9 @@ static int smack_socket_connect(struct socket *sock, struct sockaddr *sap,
>>  		rc = smack_netlabel_send(sock->sk, (struct sockaddr_in *)sap);
>>  		break;
>>  	case PF_INET6:
>> -		if (addrlen < SIN6_LEN_RFC2133 || sap->sa_family != AF_INET6)
>> +		if (addrlen < SIN6_LEN_RFC2133)
>> +			return 0;
>> +		if (sap->sa_family != AF_INET6)
>>  			return -EINVAL;
> 
> I doubt it; can't test it until tonight. strace for ping on buster is
> showing this:
> 
> $ strace -e connect ping6 -c1 -w1 ff02::1%eth1
> connect(4, {sa_family=AF_UNSPEC,
> sa_data="\4\1\0\0\0\0\377\2\0\0\0\0\0\0\0\0\0\0\0\0\0\1\3\0\0\0"}, 28)
> 
> ie., the addrlen >= SIN6_LEN_RFC2133 but the family is AF_UNSPEC. That
> suggests to me the first check passes and the second check fails.
> 

confirmed. connect still fails EINVAL.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ