netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: <shiming.cheng@mediatek.com>
Cc: <willemdebruijn.kernel@gmail.com>, <edumazet@google.com>,
	<davem@davemloft.net>, <pabeni@redhat.com>,
	<matthias.bgg@gmail.com>, <linux-kernel@vger.kernel.org>,
	<netdev@vger.kernel.org>, Lena Wang <lena.wang@mediatek.com>
Subject: Re: [PATCH net] net: prevent pulling SKB_GSO_FRAGLIST skb
Date: Mon, 29 Apr 2024 06:42:09 -0700	[thread overview]
Message-ID: <20240429064209.5ce59350@kernel.org> (raw)
In-Reply-To: <20240428142913.18666-1-shiming.cheng@mediatek.com>

On Sun, 28 Apr 2024 22:29:13 +0800 shiming.cheng@mediatek.com wrote:
> From: Shiming Cheng <shiming.cheng@mediatek.com>
> 
> BPF or TC callers may pull in a length longer than skb_headlen()
> for a SKB_GSO_FRAGLIST skb. The data in fraglist will be pulled
> into the linear space. However it destroys the skb's structure
> and may result in an invalid segmentation or kernel exception.
> 
> So we should add protection to stop the operation and return
> error to remind callers.

One of the fixes you posted breaks the

  tools/testing/selftests/net/udpgro_fwd.sh

selftest. Please investigate, and either adjust the test or the fix.

  parent reply	other threads:[~2024-04-29 13:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-28 14:29 [PATCH net] net: prevent pulling SKB_GSO_FRAGLIST skb shiming.cheng
2024-04-29 13:28 ` Willem de Bruijn
2024-04-29 13:42 ` Jakub Kicinski [this message]
2024-05-15  9:02   ` Lena Wang (王娜)
2024-05-16 15:11     ` Jakub Kicinski
2024-05-23 10:03       ` Lena Wang (王娜)
2024-05-23 12:46         ` Willem de Bruijn
2024-05-23 14:59           ` Willem de Bruijn
2024-05-29 11:35             ` Lena Wang (王娜)
2024-05-29 14:04               ` Willem de Bruijn

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=20240429064209.5ce59350@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=lena.wang@mediatek.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shiming.cheng@mediatek.com \
    --cc=willemdebruijn.kernel@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).