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.
Re: [PATCH] netfilter: flowtable: update skb csum after pppoe header push
- From
- lvju…@cmss.chinamobile.com (lvjunyu)
- Organization
- Usenet Network
- Message-ID
- <2026…@cmss.chinamobile.com>
- Date
- Newsgroups
- linux.kernel.netdev