[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <639b9e9a-dc4e-9e6d-7437-b66d6acd3a16@i-love.sakura.ne.jp>
Date: Sat, 13 Apr 2019 11:06:25 +0900
From: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
To: Andrey Ignatov <rdna@...com>
Cc: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Martin Lau <kafai@...com>, Song Liu <songliubraving@...com>,
Yonghong Song <yhs@...com>,
"David S. Miller" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH 9/9] udpv6: Check address length before reading address
family
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.
Powered by blists - more mailing lists