Netdev List
 help / color / mirror / Atom feed
From: lvjunyu <lvjunyu@cmss.chinamobile.com>
To: netdev-bot+sinfo@kernel.org
Cc: pablo@netfilter.org, fw@strlen.de, phil@nwl.cc,
	netfilter-devel@vger.kernel.org, netdev@vger.kernel.org,
	coreteam@netfilter.org, lvjunyu@cmss.chinamobile.com
Subject: Re: [PATCH] netfilter: flowtable: update skb csum after pppoe header push
Date: Thu,  3 Dec 2026 21:51:45 +0800	[thread overview]
Message-ID: <20261203135145.191790-1-lvjunyu@cmss.chinamobile.com> (raw)
In-Reply-To: <20261203094901.164422-1-lvjunyu@cmss.chinamobile.com>

The issue was found by manual code inspection and has not been
triggered at runtime yet. Details for both questions:

How the issue was discovered:

While reviewing the flowtable encapsulation paths in
nf_flow_table_ip.c I compared nf_flow_pppoe_push() against its
sibling helpers. Every sibling path keeps skb->csum in sync when
it moves skb->data:

  - nf_flow_vlan_push() calls skb_postpush_rcsum() after pushing
    the vlan header
  - the pop path (nf_flow_encap_pop()) uses skb_pull_rcsum() for
    both vlan and pppoe

nf_flow_pppoe_push() pushes the 8-byte PPPoE session header
(__skb_push(PPPOE_SES_HLEN)) but never folds those bytes into
skb->csum, so for CHECKSUM_COMPLETE skbs the checksum stops
covering the bytes from skb->data onwards. Checking the history
(cgit, commit 18d27bed0880) shows the call was missing on the day
the helper was introduced, so this is a defect since the first
version, not a regression of a recent refactor.

Whether the issue was actually triggered:

Not triggered at runtime so far; the defect was established by
source inspection, so the runtime evidence is an impact analysis
rather than a trace:

with a pppoe-offloaded flow and a CHECKSUM_COMPLETE skb, every
later incremental checksum update on top of skb->csum starts from
a stale base (the pushed 8 header bytes are missing from it), so
downstream consumers can compute a wrong final checksum and drop
valid packets. The fix mirrors the vlan push path and only
touches the pppoe push path, so the change is limited to keeping
the existing invariant on one more path.

The patch is build-verified against mainline tip (nf_flow_table_ip.o
compiled clean) and checkpatch-clean.



  parent reply	other threads:[~2026-12-04  6:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03  9:49 [PATCH] netfilter: flowtable: update skb csum after pppoe header push lvjunyu
2026-12-03  9:59 ` netdev-bot+sinfo
2026-12-03 13:51 ` lvjunyu [this message]
2026-12-04 10:42 ` netdev-bot+sashiko

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=20261203135145.191790-1-lvjunyu@cmss.chinamobile.com \
    --to=lvjunyu@cmss.chinamobile.com \
    --cc=coreteam@netfilter.org \
    --cc=fw@strlen.de \
    --cc=netdev-bot+sinfo@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=phil@nwl.cc \
    /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