[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+FuTSem3r-7F_=b5eiT1J5QbP9_pHhFNDSkDkz0v19uSVq=Ow@mail.gmail.com>
Date: Wed, 29 Jan 2020 12:21:03 -0500
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: David Miller <davem@...emloft.net>
Cc: Willem de Bruijn <willemdebruijn.kernel@...il.com>,
Network Development <netdev@...r.kernel.org>,
Paolo Abeni <pabeni@...hat.com>,
syzkaller <syzkaller@...glegroups.com>
Subject: Re: [PATCH net] udp: segment looped gso packets correctly
On Wed, Jan 29, 2020 at 11:58 AM David Miller <davem@...emloft.net> wrote:
>
> From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
> Date: Mon, 27 Jan 2020 15:40:31 -0500
>
> > From: Willem de Bruijn <willemb@...gle.com>
> >
> > Multicast and broadcast packets can be looped from egress to ingress
> > pre segmentation with dev_loopback_xmit. That function unconditionally
> > sets ip_summed to CHECKSUM_UNNECESSARY.
> >
> > udp_rcv_segment segments gso packets in the udp rx path. Segmentation
> > usually executes on egress, and does not expect packets of this type.
> > __udp_gso_segment interprets !CHECKSUM_PARTIAL as CHECKSUM_NONE. But
> > the offsets are not correct for gso_make_checksum.
> >
> > UDP GSO packets are of type CHECKSUM_PARTIAL, with their uh->check set
> > to the correct pseudo header checksum. Reset ip_summed to this type.
> > (CHECKSUM_PARTIAL is allowed on ingress, see comments in skbuff.h)
> >
> > Reported-by: syzbot <syzkaller@...glegroups.com>
> > Fixes: cf329aa42b66 ("udp: cope with UDP GRO packet misdirection")
> > Signed-off-by: Willem de Bruijn <willemb@...gle.com>
>
> Applied and queued up for -stable, but I have to say:
>
> > + if (skb->pkt_type == PACKET_LOOPBACK)
> > + skb->ip_summed = CHECKSUM_PARTIAL;
> > +
>
> There are a lot of implementation detail assumptions encoded into that
> conditional statement :-)
>
> Feel free to follow-up with a patch adding a comment containing a
> condensed version of your commit log here.
Will do. Yeah, that does look pretty obscure. I may have gotten a bit
too used to relying solely on git blame ;-)
Thanks!
Powered by blists - more mailing lists