From: Andrea Mayer <andrea.mayer@uniroma2.it>
To: netdev-bot+sinfo@kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
David Ahern <dsahern@kernel.org>,
Ido Schimmel <idosch@nvidia.com>, Simon Horman <horms@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Kuniyuki Iwashima <kuniyu@google.com>,
Stefano Salsano <stefano.salsano@uniroma2.it>,
Hui Peng <benquike@gmail.com>, Sashiko <sashiko-bot@kernel.org>,
Andrea Mayer <andrea.mayer@uniroma2.it>
Subject: Re: [PATCH net] ipv6: rpl: unclone the skb before modifying the packet
Date: Sat, 3 Oct 2026 00:52:10 +0200 [thread overview]
Message-ID: <20261003005210.d9b3b56c46144fd990259e7f@uniroma2.it> (raw)
In-Reply-To: <179087934758.1402591.6992807182585473895@kernel.org>
On Thu, 01 Oct 2026 18:29:07 +0000
netdev-bot+sinfo@kernel.org wrote:
> Hi!
>
> This is an automated message. This series looks like a fix, but its
> commit messages seem to be missing some information:
>
> - Whether the issue was actually triggered, or is only theoretical
> (e.g. found by code inspection). If it was triggered please include
> the symptoms, like the stack trace or error messages.
>
> [snip]
Hi,
Yes, I triggered it. I reproduced it in a VM.
One namespace sends pings to fc00:2::1 through the RPL segment
fc00::2, which belongs to a second namespace with rpl_seg_enabled=1.
Each ping arrives with destination address fc00::2 and a routing header
with Segments Left 1 that carries fc00:2::1. In the second namespace, a
Python program opens an AF_PACKET socket and reads the queued frames
only after the pings were processed. For each frame with a routing
header, it prints the destination address and Segments Left.
Without the fix, all these frames showed:
daddr fc00:2::1 segments_left 0
These are the values written by ipv6_rpl_srh_rcv(), not the received
ones. With the fix, all the frames with a routing header showed the
received values:
daddr fc00::2 segments_left 1
To reproduce it, I did not modify the kernel or use error injection.
This is how the packet reaches ipv6_rpl_srh_rcv(), with some calls
left out:
__netif_receive_skb_one_core
__netif_receive_skb_core
deliver_skb [orig: users=2]
packet_rcv
skb_clone clone queued to the AF_PACKET socket
consume_skb(orig) [orig: users=1, cloned=1]
ipv6_rcv
ip6_rcv_core skb_share_check: no-op [orig: users=1]
[...]
ip6_protocol_deliver_rcu
ipv6_rthdr_rcv
ipv6_rpl_srh_rcv writes into the data shared with the clone
The reproducer is a shell script and a Python program.
I can post it if it helps.
Thanks,
Andrea
next prev parent reply other threads:[~2026-10-02 22:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 18:21 [PATCH net] ipv6: rpl: unclone the skb before modifying the packet Andrea Mayer
2026-10-01 18:29 ` netdev-bot+sinfo
2026-10-02 22:52 ` Andrea Mayer [this message]
2026-10-03 19:30 ` Kuniyuki Iwashima
2026-10-05 16:48 ` Andrea Mayer
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=20261003005210.d9b3b56c46144fd990259e7f@uniroma2.it \
--to=andrea.mayer@uniroma2.it \
--cc=benquike@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev-bot+sinfo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sashiko-bot@kernel.org \
--cc=stefano.salsano@uniroma2.it \
/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