All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guillaume Nault <gnault@redhat.com>
To: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Ren Wei <enjou1224z@gmail.com>,
	netdev@vger.kernel.org, jiri@resnulli.us, davem@davemloft.net,
	edumazet@google.com, pabeni@redhat.com, horms@kernel.org,
	vega@nebusec.ai, bronzed_45_vested@icloud.com
Subject: Re: [PATCH net v2 0/2] net/sched: act_vlan: pop_eth can strip non-Ethernet skbs and panic loopback
Date: Tue, 28 Jul 2026 12:48:41 +0200	[thread overview]
Message-ID: <amiJCTagBrAHsTZ_@debian> (raw)
In-Reply-To: <CAM0EoMkTr8y1KBXTqU6MyJOVezGknZg5u6BYE7WBzdVyqaPm6g@mail.gmail.com>

On Sat, Jul 25, 2026 at 08:21:52AM -0400, Jamal Hadi Salim wrote:
> On Sat, Jul 25, 2026 at 6:46 AM Jamal Hadi Salim <jhs@mojatatu.com> wrote:
> >
> > On Thu, Jul 23, 2026 at 1:54 PM Ren Wei <enjou1224z@gmail.com> wrote:
> > >
> > > From: Wyatt Feng <bronzed_45_vested@icloud.com>
> > >
> > > Hi Linux kernel maintainers,
> > >
> > > We found an issue in net/sched/act_vlan.c.
> > > The bug is reachable by an unprivileged user using private user and network namespaces.
> > > The relevant details are provided below.
> > >
> >
> > Please remove bouncing @bytedance emails from the CC list.
> >
> > You did not address the discussion we had earlier, which is a very
> > good example of an issue Yuan brought up at the bof - "fixing the root
> > cause".
> > Attaching the last email from Guillaume since this was not on a public list.
> > I had argued you only need patch 2 (and to be safe handle both pop and
> > push) and Guillaume argued that would not fix the root cause and there
> > is potential the bug could still happen and patch 1 would be needed.
> > His exact wording is:
> > "
> > So, if patch 1 isn't needed, that means we must guarantee all skbs
> > reaching an ARPHRD_ETHER device to have at least ETH_HLEN bytes of
> > headroom.
> > "
> > after some back and forth we steered into drivers and pskb_may_pull()
> > invocation.
> >
> > In any case it would be a good idea for you to review and consider the
> > discussion and infact test with suggested vrf device (which doesnt
> > pskb_may_pull())
> >
> 
> After some coffee, _my view_:
> The root cause is the missing pskb_may_pull(skb, ETH_HLEN) in
> loopback_xmit() and vrf_local_xmit() (thats why i was asking to repro
> with vrf).

vrf_local_xmit() is only invoked from vrf_process_v6_outbound() and
vrf_process_v4_outbound(), which both start with a pskb_may_pull()
call since commit 107e47cc80ec ("vrf: make sure skb->data contains ip
header to make routing"). So the problem shouldn't be reproducible with
VRF.

I also think that the problem should be fixed by adding pskb_may_pull()
to loopback_xmit().

> The proper fix belongs in those drivers, not in the tc action.
> Guillaume's point is valid: limiting POP_ETH to ARPHRD_ETHER devices
> doesn't fix the  problem, it just makes the existing reproducer stop
> crashing while leaving the underlying  driver defect exploitable
> through other paths.
> 
> That said, another stack or code path might lead to vlan/skbmod so
> fixing the actions might make sense as a follow-up.
> 
> cheers,
> jamal
> 


      reply	other threads:[~2026-07-28 10:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-23 17:54 [PATCH net v2 0/2] net/sched: act_vlan: pop_eth can strip non-Ethernet skbs and panic loopback Ren Wei
2026-07-23 17:54 ` [PATCH net v2 1/2] net/sched: act_skbmod: require a full Ethernet header for MAC rewrites Ren Wei
2026-07-23 17:54 ` [PATCH net v2 2/2] net/sched: act_vlan: skip pop_eth on non-Ethernet devices Ren Wei
2026-07-25 10:46 ` [PATCH net v2 0/2] net/sched: act_vlan: pop_eth can strip non-Ethernet skbs and panic loopback Jamal Hadi Salim
2026-07-25 12:21   ` Jamal Hadi Salim
2026-07-28 10:48     ` Guillaume Nault [this message]

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=amiJCTagBrAHsTZ_@debian \
    --to=gnault@redhat.com \
    --cc=bronzed_45_vested@icloud.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=enjou1224z@gmail.com \
    --cc=horms@kernel.org \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=vega@nebusec.ai \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.