Netdev List
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Nebula Security <vega@nebusec.ai>
Cc: Ren Wei <enjou1224z@gmail.com>,
	netdev@vger.kernel.org, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
	bronzed_45_vested@icloud.com
Subject: Re: [PATCH net v3] net: loopback: ensure Ethernet header is linear before eth_type_trans
Date: Tue, 4 Aug 2026 17:45:08 -0700	[thread overview]
Message-ID: <20260804174508.20c0e505@kernel.org> (raw)
In-Reply-To: <CAHYtud34rLPuGq6oSLem3VW8V+YrBBxdi+CRVbiQQZOrsRCOQA@mail.gmail.com>

On Tue, 4 Aug 2026 17:08:10 -0700 Nebula Security wrote:
> Sorry for not including the cover letter in this version. Here is the
> root cause analysis and the reproducer. Let me know if this is enough
> or we need to send out a v4 with a complete cover letter.
> 
> The frame is not short in terms of its total skb length. The problem is
> that its linear area becomes shorter than ETH_HLEN before
> loopback_xmit() is invoked.
> 
> The reproducer sends a large non-linear AF_PACKET skb through loopback.
> The loopback egress tc action is executed before the driver's
> ndo_start_xmit callback. TCA_VLAN_ACT_POP_ETH calls skb_eth_pop() there
> and consumes the only ETH_HLEN bytes in the skb's linear area.
> 
> The skb state is approximately:
> 
>   before POP_ETH:
>     skb->len      = 8206
>     skb->data_len = 8192
>     skb_headlen() = 14
> 
>   after POP_ETH:
>     skb->len      = 8192
>     skb->data_len = 8192
>     skb_headlen() = 0
> 
> The skb then continues to loopback_xmit(). eth_type_trans() calls
> __skb_pull(skb, ETH_HLEN), but no bytes are linear at that point, which
> triggers the BUG.

Shouldn't TCA_VLAN_ACT_POP_ETH make sure another header is accessible
then? Are there other ways for something to strip L2 before the frame
reaches the driver?

      reply	other threads:[~2026-08-05  0:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28 15:04 [PATCH net v3] net: loopback: ensure Ethernet header is linear before eth_type_trans Ren Wei
2026-08-01  0:50 ` Jakub Kicinski
2026-08-05  0:08   ` Nebula Security
2026-08-05  0:45     ` Jakub Kicinski [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=20260804174508.20c0e505@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=bronzed_45_vested@icloud.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=enjou1224z@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox