[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aad76753-d2b5-4905-b90b-e31483e5956b@redhat.com>
Date: Fri, 26 Jul 2024 16:48:06 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, kuba@...nel.org,
edumazet@...gle.com, mst@...hat.com, jasowang@...hat.com, arefev@...mel.ru,
alexander.duyck@...il.com, Willem de Bruijn <willemb@...gle.com>,
stable@...r.kernel.org
Subject: Re: [PATCH net] net: drop bad gso csum_start and offset in
virtio_net_hdr
On 7/26/24 15:52, Willem de Bruijn wrote:
> On Fri, Jul 26, 2024 at 4:23 AM Paolo Abeni <pabeni@...hat.com> wrote:
>>
>> On 7/26/24 04:32, Willem de Bruijn wrot> @@ -182,6 +171,11 @@ static
>> inline int virtio_net_hdr_to_skb(struct sk_buff *skb,
>>> if (gso_type != SKB_GSO_UDP_L4)
>>> return -EINVAL;
>>> break;
>>> + case SKB_GSO_TCPV4:
>>> + case SKB_GSO_TCPV6:
>>
>> I think we need to add here an additional check:
>>
>> if (!(hdr->flags & VIRTIO_NET_HDR_F_NEEDS_CSUM))
>> return -EINVAL;
>>
>
> Historically this interface has been able to request
> VIRTIO_NET_HDR_GSO_* without VIRTIO_NET_HDR_F_NEEDS_CSUM.
I see. I looked at the SKB_GSO_UDP_L4 case, but I did not dig into history.
> I would love to clamp down on this, as those packets are essentially
> illegal. But we should probably leave that discussion for a separate
> patch?
Yep, I guess we have to keep the two discussion separate.
As a consequence, I'm fine with the current checks (with Eric's
suggested changes).
Thanks,
Paolo
Powered by blists - more mailing lists