From: Jakub Kicinski <kuba@kernel.org>
To: vladbu@nvidia.com, Xin Long <lucien.xin@gmail.com>
Cc: Tao Liu <taoliu828@163.com>,
davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
paulb@nvidia.com, netdev@vger.kernel.org,
simon.horman@corigine.com, xiyou.wangcong@gmail.com,
pablo@netfilter.org
Subject: Re: [PATCH net] net/sched: act_ct: fix skb leak and crash on ooo frags
Date: Wed, 3 Jan 2024 17:49:31 -0800 [thread overview]
Message-ID: <20240103174931.15ea4dbd@kernel.org> (raw)
In-Reply-To: <20231228081457.936732-1-taoliu828@163.com>
On Thu, 28 Dec 2023 16:14:57 +0800 Tao Liu wrote:
> act_ct adds skb->users before defragmentation. If frags arrive in order,
> the last frag's reference is reset in:
>
> inet_frag_reasm_prepare
> skb_morph
>
> which is not straightforward.
>
> However when frags arrive out of order, nobody unref the last frag, and
> all frags are leaked. The situation is even worse, as initiating packet
> capture can lead to a crash[0] when skb has been cloned and shared at the
> same time.
>
> Fix the issue by removing skb_get() before defragmentation. act_ct
> returns TC_ACT_CONSUMED when defrag failed or in progress.
Vlad, Xin Long, does this look good to you?
--
pw-bot: needs-ack
next prev parent reply other threads:[~2024-01-04 1:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-28 8:14 [PATCH net] net/sched: act_ct: fix skb leak and crash on ooo frags Tao Liu
2024-01-04 1:49 ` Jakub Kicinski [this message]
2024-01-04 16:48 ` Xin Long
2024-01-08 8:12 ` Vlad Buslov
2024-01-05 16:20 ` 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=20240103174931.15ea4dbd@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=lucien.xin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=paulb@nvidia.com \
--cc=simon.horman@corigine.com \
--cc=taoliu828@163.com \
--cc=vladbu@nvidia.com \
--cc=xiyou.wangcong@gmail.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;
as well as URLs for NNTP newsgroup(s).