From: Vlad Buslov <vladbu@nvidia.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Xin Long <lucien.xin@gmail.com>, 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: Mon, 8 Jan 2024 10:12:26 +0200 [thread overview]
Message-ID: <87o7dwmecw.fsf@nvidia.com> (raw)
In-Reply-To: <20240103174931.15ea4dbd@kernel.org>
On Wed 03 Jan 2024 at 17:49, Jakub Kicinski <kuba@kernel.org> wrote:
> 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?
Hi, sorry for the late response. LGTM, will report tomorrow if this
triggers anything in our regression runs.
next prev parent reply other threads:[~2024-01-08 8:14 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
2024-01-04 16:48 ` Xin Long
2024-01-08 8:12 ` Vlad Buslov [this message]
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=87o7dwmecw.fsf@nvidia.com \
--to=vladbu@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--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=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).