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] [day] [month] [year] [list]
Message-ID: <CANn89iK86Wvsi=nKMDrsr+xFUCudUG2mBfR-BSEXhKqPSOxN0A@mail.gmail.com>
Date:   Tue, 23 Apr 2019 09:58:40 -0700
From:   Eric Dumazet <edumazet@...gle.com>
To:     David Howells <dhowells@...hat.com>
Cc:     "David S . Miller" <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>,
        Eric Dumazet <eric.dumazet@...il.com>,
        syzbot <syzkaller@...glegroups.com>
Subject: Re: [PATCH net] rxrpc: fix race condition in rxrpc_input_packet()

On Tue, Apr 23, 2019 at 9:55 AM David Howells <dhowells@...hat.com> wrote:
>
> Eric Dumazet <edumazet@...gle.com> wrote:
>
> > @@ -1181,6 +1177,9 @@ int rxrpc_input_packet(struct sock *udp_sk, struct sk_buff *skb)
> >
> >       _enter("%p", udp_sk);
> >
> > +     if (!local)
> > +             return -ENOENT;
> > +
> >
>
> This looks wrong.  Did you mean "return -AF_INET"?
>
> The comment in net/ipv6/udp.c says:
>
>                 /*
>                  * This is an encapsulation socket so pass the skb to
>                  * the socket's udp_encap_rcv() hook. Otherwise, just
>                  * fall through and pass this up the UDP socket.
>                  * up->encap_rcv() returns the following value:
>                  * =0 if skb was successfully passed to the encap
>                  *    handler or was discarded by it.
>                  * >0 if skb should be passed on to UDP.
>                  * <0 if skb should be resubmitted as proto -N
>                  */
>
> This suggests that -ENOENT is not a valid return.  Should you "goto discard"
> instead - or just discard the packet and return 0?


Oh right, I guess I got confused by vxlan_err_lookup(), I must have
scrolled down from (correct) vxlan_rcv()

I will send a v2.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ