From: Ilya Maximets <i.maximets@ovn.org>
To: netdev-bot+sashiko@kernel.org, i.maximets@ovn.org
Cc: netdev@vger.kernel.org, pablo@netfilter.org, fw@strlen.de,
phil@nwl.cc, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
aconole@redhat.com, echaudro@redhat.com, jhs@mojatatu.com,
jiri@resnulli.us, lucien.xin@gmail.com,
marcelo.leitner@gmail.com, netfilter-devel@vger.kernel.org,
coreteam@netfilter.org, linux-kernel@vger.kernel.org,
dev@openvswitch.org, stable@vger.kernel.org
Subject: Re: [PATCH net 2/6] net: openvswitch: conntrack: remove 'add_helper' dead code
Date: Tue, 22 Sep 2026 17:29:27 +0200 [thread overview]
Message-ID: <e3e001ae-cf08-408a-9059-4255de915110@ovn.org> (raw)
In-Reply-To: <179008911774.2160803.5007856848467620850@kernel.org>
On 9/22/26 4:58 PM, netdev-bot+sashiko@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found more severe
> issue(s) in other patches of this series. This mail is only an FYI, in case
> you want to address the nit picks below when you respin.
>
> Low priority / nit picks for your consideration:
>
> - [Low] Concern: after this patch the comment above the helper call reads
> '- nf_conntrack_in() was executed above ("!cached"), or - When…
>
> --
>
> net: openvswitch: conntrack: remove 'add_helper' dead code
>
> This drops the add_helper variable in __ovs_ct_lookup(), since it is only
> ever set for unconfirmed connections while it is only read on the
> confirmed branch of the helper-call condition. The helper-call condition
> is simplified to nf_ct_is_confirmed(ct) ? !cached : info->commit.
>
>> diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c
>> index a733029c28dd0..c20f096eef40e 100644
>> --- a/net/openvswitch/conntrack.c
>> +++ b/net/openvswitch/conntrack.c
>
> [ ... ]
>
>> @@ -821,13 +818,10 @@ static int __ovs_ct_lookup(struct net *net, struct sw_flow_key *key,
>> }
>>
>> /* Call the helper only if:
>> - * - nf_conntrack_in() was executed above ("!cached") or a
>> - * helper was just attached ("add_helper") for a confirmed
>> - * connection, or
>> + * - nf_conntrack_in() was executed above ("!cached"), or
>> * - When committing an unconfirmed connection.
>> */
>> - if ((nf_ct_is_confirmed(ct) ? !cached || add_helper :
>> - info->commit)) {
>> + if ((nf_ct_is_confirmed(ct) ? !cached : info->commit)) {
>
> [Severity: Low]
> This isn't a bug, but does the reworded comment still match the condition?
>
> The first bullet now reads as an unqualified statement:
>
> /* Call the helper only if:
> * - nf_conntrack_in() was executed above ("!cached"), or
> * - When committing an unconfirmed connection.
> */
>
> while the code only honours "!cached" on the confirmed side of the
> ternary:
>
> if ((nf_ct_is_confirmed(ct) ? !cached : info->commit)) {
>
> For a non-committing ct() action on a new packet in __ovs_ct_lookup(),
> cached is false, the entry returned by nf_ct_get() is not yet confirmed
> and info->commit is 0, so nf_ct_helper() is not called even though the
> first bullet says it should be.
>
> Worth noting that the following patch in the series, "net: openvswitch:
> conntrack: fix helper UAF due to extensions realloc", rewrites both the
> comment and the condition to:
>
> /* Call the helper only if nf_conntrack_in() was executed
> * above ("!cached").
> *
> * For unconfirmed connections it will be called later during
> * commit as we need to have all the other extensions allocated
> * before the call.
> */
> if (nf_ct_is_confirmed(ct) && !cached) {
>
> so the mismatch only exists in this intermediate commit. Could the
> deferral note be pulled into this patch to keep each commit
> self-consistent, given this one is tagged for stable?
Comments do not need to spell out verbatim what the code is doing,
it is pointless for the most part. The current comment, IMO, is
conveying the intention clear enough. It is also re-written in the
very next patch.
Best regards, Ilya Maximets.
next prev parent reply other threads:[~2026-09-22 15:29 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 14:55 [PATCH net 0/6] ovs, net/sched: fixes for UAF after conntrack extension realloc Ilya Maximets
2026-09-21 14:55 ` [PATCH net 1/6] net: openvswitch: conntrack: avoid modifying shared unconfirmed ct entry Ilya Maximets
2026-09-22 14:58 ` netdev-bot+sashiko
2026-09-22 15:27 ` Ilya Maximets
2026-09-22 15:26 ` Aaron Conole
2026-09-21 14:55 ` [PATCH net 2/6] net: openvswitch: conntrack: remove 'add_helper' dead code Ilya Maximets
2026-09-22 14:58 ` netdev-bot+sashiko
2026-09-22 15:29 ` Ilya Maximets [this message]
2026-09-22 15:26 ` Aaron Conole
2026-09-21 14:55 ` [PATCH net 3/6] net: openvswitch: conntrack: fix helper UAF due to extensions realloc Ilya Maximets
2026-09-22 14:58 ` netdev-bot+sashiko
2026-09-22 15:43 ` Ilya Maximets
2026-09-22 15:26 ` Aaron Conole
2026-09-21 14:55 ` [PATCH net 4/6] net/sched: act_ct: avoid modifying shared unconfirmed ct entry Ilya Maximets
2026-09-22 14:58 ` netdev-bot+sashiko
2026-09-22 15:52 ` Ilya Maximets
2026-09-22 15:27 ` Aaron Conole
2026-09-22 20:42 ` Xin Long
2026-09-22 21:34 ` Jamal Hadi Salim
2026-09-21 14:55 ` [PATCH net 5/6] net/sched: act_ct: remove 'add_helper' dead code Ilya Maximets
2026-09-22 15:27 ` Aaron Conole
2026-09-22 20:43 ` Xin Long
2026-09-22 21:35 ` Jamal Hadi Salim
2026-09-21 14:55 ` [PATCH net 6/6] net/sched: act_ct: fix helper UAF due to extensions realloc Ilya Maximets
2026-09-22 14:58 ` netdev-bot+sashiko
2026-09-22 15:54 ` Ilya Maximets
2026-09-22 20:43 ` Xin Long
2026-09-22 21:36 ` Jamal Hadi Salim
2026-09-23 12:35 ` Aaron Conole
2026-09-24 1:21 ` [PATCH net 0/6] ovs, net/sched: fixes for UAF after conntrack extension realloc Jakub Kicinski
2026-09-24 17:10 ` 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=e3e001ae-cf08-408a-9059-4255de915110@ovn.org \
--to=i.maximets@ovn.org \
--cc=aconole@redhat.com \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=dev@openvswitch.org \
--cc=echaudro@redhat.com \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=horms@kernel.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lucien.xin@gmail.com \
--cc=marcelo.leitner@gmail.com \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=phil@nwl.cc \
--cc=stable@vger.kernel.org \
/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