From: David Ahern <dsahern@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>, Eric Dumazet <edumazet@google.com>
Cc: Yue Haibing <yuehaibing@huawei.com>,
davem@davemloft.net, pabeni@redhat.com, yoshfuji@linux-ipv6.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
simon.horman@corigine.com
Subject: Re: [PATCH v3] ip6mr: Fix skb_under_panic in ip6mr_cache_report()
Date: Tue, 1 Aug 2023 18:52:00 -0600 [thread overview]
Message-ID: <0e3e2d6f-0e8d-ccb4-0750-928a568ccaaf@kernel.org> (raw)
In-Reply-To: <20230801131146.51a9aaf3@kernel.org>
On 8/1/23 2:11 PM, Jakub Kicinski wrote:
> On Tue, 1 Aug 2023 09:51:29 +0200 Eric Dumazet wrote:
>>> - skb_push(skb, -skb_network_offset(pkt));
>>> + __skb_pull(skb, skb_network_offset(pkt));
>>>
>>> skb_push(skb, sizeof(*msg));
>>> skb_reset_transport_header(skb);
>>
>> Presumably this code has never been tested :/
>
> Could have been tested on 32bit, I wonder if there is more such bugs :S
that pattern shows up a few times:
net/ipv4/ah4.c: skb_push(skb, -skb_network_offset(skb));
net/ipv4/esp4.c: skb_push(skb, -skb_network_offset(skb));
net/ipv4/esp4_offload.c: skb_push(skb, -skb_network_offset(skb));
net/ipv4/esp4_offload.c: skb_push(skb, -skb_network_offset(skb));
net/ipv4/xfrm4_tunnel.c: skb_push(skb, -skb_network_offset(skb));
net/ipv6/ah6.c: skb_push(skb, -skb_network_offset(skb));
net/ipv6/esp6.c: skb_push(skb, -skb_network_offset(skb));
net/ipv6/esp6_offload.c: skb_push(skb, -skb_network_offset(skb));
net/ipv6/esp6_offload.c: skb_push(skb, -skb_network_offset(skb));
net/ipv6/ip6mr.c: skb_push(skb, -skb_network_offset(pkt));
net/ipv6/mip6.c: skb_push(skb, -skb_network_offset(skb));
net/ipv6/mip6.c: skb_push(skb, -skb_network_offset(skb));
net/ipv6/xfrm6_tunnel.c: skb_push(skb, -skb_network_offset(skb));
net/xfrm/xfrm_ipcomp.c: skb_push(skb, -skb_network_offset(skb));
next prev parent reply other threads:[~2023-08-02 0:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-01 6:43 Yue Haibing
2023-08-01 7:51 ` Eric Dumazet
2023-08-01 20:11 ` Jakub Kicinski
2023-08-02 0:52 ` David Ahern [this message]
2023-08-02 1:28 ` YueHaibing
2023-08-02 2:10 ` Jakub Kicinski
2023-08-02 3:18 ` David Ahern
2023-08-02 9:40 ` patchwork-bot+netdevbpf
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=0e3e2d6f-0e8d-ccb4-0750-928a568ccaaf@kernel.org \
--to=dsahern@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=simon.horman@corigine.com \
--cc=yoshfuji@linux-ipv6.org \
--cc=yuehaibing@huawei.com \
/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
all inboxes | Powered by JetHome®