All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
To: Andrey Ignatov <rdna@fb.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>, Martin Lau <kafai@fb.com>,
	Song Liu <songliubraving@fb.com>, Yonghong Song <yhs@fb.com>,
	"David S. Miller" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH 9/9] udpv6: Check address length before reading address family
Date: Sat, 13 Apr 2019 11:06:25 +0900	[thread overview]
Message-ID: <639b9e9a-dc4e-9e6d-7437-b66d6acd3a16@i-love.sakura.ne.jp> (raw)
In-Reply-To: <20190412164927.GA28199@rdna-mbp>

On 2019/04/13 1:49, Andrey Ignatov wrote:
> Such a check wasn't added since it's already checked in
> inet_dgram_connect, the only place where udpv6_pre_connect is called:
> 
>   int inet_dgram_connect(struct socket *sock, struct sockaddr *uaddr,
>                          int addr_len, int flags)
>   {
>           struct sock *sk = sock->sk;
>           int err;
>   
>           if (addr_len < sizeof(uaddr->sa_family))
>                   return -EINVAL;
>           if (uaddr->sa_family == AF_UNSPEC)
>                   return sk->sk_prot->disconnect(sk, flags);
>   
>           if (BPF_CGROUP_PRE_CONNECT_ENABLED(sk)) {
>                   err = sk->sk_prot->pre_connect(sk, uaddr, addr_len);
>                   if (err)
>                           return err;
>           }
> 
> So it's already handled. But if it helps KMSAN, that's probably fine to
> double-check it here. Or it's considered false positive?

OK, then KMSAN will not complain and this patch can be dropped.

  reply	other threads:[~2019-04-13  2:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-12 10:56 [PATCH 9/9] udpv6: Check address length before reading address family Tetsuo Handa
2019-04-12 16:07 ` Song Liu
2019-04-12 16:49 ` Andrey Ignatov
2019-04-13  2:06   ` Tetsuo Handa [this message]
2019-04-12 17:26 ` David Miller

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=639b9e9a-dc4e-9e6d-7437-b66d6acd3a16@i-love.sakura.ne.jp \
    --to=penguin-kernel@i-love.sakura.ne.jp \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=kafai@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=rdna@fb.com \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.com \
    /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.