All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Paulos Yibelo" <habte.yibelo@gmail.com>
Cc: "Eugenio Perez" <eperezma@redhat.com>,
	virtualization@lists.linux.dev,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH net v6 2/2] ip: reject partial checksums covering network headers
Date: Tue, 22 Sep 2026 03:14:10 +0000	[thread overview]
Message-ID: <20260922031411.4DC431F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260922030310.8684-3-habte.yibelo@gmail.com>

> ip_do_fragment() and nf_br_ip_fragment() complete a CHECKSUM_PARTIAL skb
> before reading the IPv4 header length. ip6_fragment() and br_ip6_fragment()
> complete one after parsing the IPv6 header chain. A virtualization
> interface can supply a checksum start which, after link-layer removal,
> still points inside that parsed network header.
> 
> skb_checksum_help() then writes the completed checksum into header bytes
> the stack has already consumed. For IPv4, changing iph->ihl after routing
> and validation can make fragmentation copy beyond the skb's logical linear
> head into transmitted options. A negative checksum-start offset is rejected
> by skb_checksum_help(), but only after a WARN_ONCE which can panic a
> panic_on_warn system.
> 
> Validate the checksum start against the parsed header length before
> completing it. For IPv4, read and validate IHL first, retain it, and
> reacquire iph after skb_checksum_help() in both implementations. For IPv6,
> use the length returned by ip6_find_1stfragopt() in both implementations.
> 
> Compare the signed checksum-start offset with the bounded signed header
> length so integer promotion cannot bypass either boundary.
> 
> Fixes: dbd3393c56a8 ("ipv4: add defensive check for CHECKSUM_PARTIAL skbs in ip_fragment")
> Fixes: 405c92f7a541 ("ipv6: add defensive check for CHECKSUM_PARTIAL skbs in ip_fragment")
> Fixes: 3c171f496ef5 ("netfilter: bridge: add connection tracking system")
> Fixes: 764dd163ac92 ("netfilter: nf_conntrack_bridge: add support for IPv6")
> Reported-by: Paulos Yibelo <habte.yibelo@gmail.com>
> Link: https://lore.kernel.org/netdev/20260920004733.6473-3-habte.yibelo@gmail.com/
> Cc: stable@vger.kernel.org
> Assisted-by: LLM
> Signed-off-by: Paulos Yibelo <habte.yibelo@gmail.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260922030310.8684-1-habte.yibelo@gmail.com?part=2


      reply	other threads:[~2026-09-22  3:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22  3:03 [PATCH net v6 0/2] net: prevent partial checksums from modifying network headers Paulos Yibelo
2026-09-22  3:03 ` [PATCH net v6 1/2] net: validate virtio checksum start after network header Paulos Yibelo
2026-09-22  3:14   ` sashiko-bot
2026-09-22  5:14   ` Michael S. Tsirkin
     [not found]     ` <CAHv8Y_4OKdVkigToBmXXhhUxu+EL2iWVADZJ=LS4CGqBATgU5g@mail.gmail.com>
2026-09-22  5:55       ` Johannes Berg
2026-09-22  5:56     ` Johannes Berg
2026-09-22  8:46       ` Michael S. Tsirkin
2026-09-22 22:29   ` Willem de Bruijn
2026-09-23  1:27     ` Willem de Bruijn
2026-09-23 10:21       ` Michael S. Tsirkin
2026-09-23 10:46         ` Eric Dumazet
2026-09-24  2:02           ` Michael S. Tsirkin
2026-09-24 17:18             ` Jakub Kicinski
2026-10-01 22:52             ` Willem de Bruijn
2026-10-03 17:51               ` Michael S. Tsirkin
2026-10-03 19:10                 ` Willem de Bruijn
2026-09-25  9:05   ` netdev-bot+sashiko
2026-09-22  3:03 ` [PATCH net v6 2/2] ip: reject partial checksums covering network headers Paulos Yibelo
2026-09-22  3:14   ` sashiko-bot [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=20260922031411.4DC431F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=eperezma@redhat.com \
    --cc=habte.yibelo@gmail.com \
    --cc=mst@redhat.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=virtualization@lists.linux.dev \
    /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.