All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Casey Schaufler <casey@schaufler-ca.com>,
	Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: commit b9ef5513c99b breaks ping to ipv6 linklocal addresses on debian buster
Date: Tue, 7 Jan 2020 19:41:20 -0700	[thread overview]
Message-ID: <a730696a-9361-d39e-5dc1-280dc8d0f052@gmail.com> (raw)
In-Reply-To: <8e0fd132-4574-4ae7-45ea-88c4a2ec94b2@gmail.com>

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.

  reply	other threads:[~2020-01-08  2:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-06  1:26 commit b9ef5513c99b breaks ping to ipv6 linklocal addresses on debian buster David Ahern
2020-01-06  3:51 ` Tetsuo Handa
2020-01-06  4:20   ` David Ahern
2020-01-06 11:04     ` Tetsuo Handa
2020-01-06 16:41       ` David Ahern
2020-01-06 21:03         ` Tetsuo Handa
2020-01-06 21:33           ` Casey Schaufler
2020-01-07 18:05           ` Casey Schaufler
2020-01-07 18:40           ` Casey Schaufler
2020-01-07 18:44             ` David Ahern
2020-01-08  2:41               ` David Ahern [this message]
2020-01-08 23:06                 ` Casey Schaufler
     [not found]                   ` <CAPA1RqAqBZNeN=T_FpApLo_-oZXeFctgGHcggY6xAXV+qHYcKg@mail.gmail.com>
2020-01-09  3:39                     ` David Ahern
2020-01-09  4:06                   ` David Ahern
2020-01-09  9:50                     ` Tetsuo Handa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a730696a-9361-d39e-5dc1-280dc8d0f052@gmail.com \
    --to=dsahern@gmail.com \
    --cc=casey@schaufler-ca.com \
    --cc=netdev@vger.kernel.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.