Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider. Critical: 0 · High: 0 · Medium: 1 · Low: 0 If you believe none of the issues are legitimate, please reply to each issue of Medium severity or higher and explain why the AI is wrong. If any of them are legitimate and you plan to respin, please let patchwork know by including "pw-bot: cr" as a separate line at the end of your reply (one such reply per series is enough). - [Medium] The commit message describes a use-after-free path that the tree no longer has. -- netfilter: conntrack: prevent helper extension relocation When nf_ct_ext_add() adds the helper extension, it now reserves enough room for every extension type, including alignment padding. Later extension additions to the same unconfirmed conntrack then cannot move the extension blob. The goal is to keep an expectation's lnode.pprev from pointing into freed memory.
> An nftables CT expectation object can link an expectation before a later > NAT expression adds extensions to the same unconfirmed conntrack. If an > addition relocates the blob, the copied hlist head still points to the > expectation, but the expectation's pprev continues to point into the > freed old blob. Removing the expectation later executes hlist_del_rcu() > and writes through this stale pointer.
[Severity: Medium] Is this description still accurate for the tree this patch applies to? The baseline already has commit 3679da4ad8be ("netfilter: nft_ct: move custom expectation support to helper"). It carries the same Fixes: tag (857b46027d6f) and has the same reporter. After that commit, nft_ct_expect_obj_eval() in net/netfilter/nft_ct.c never calls nf_ct_expect_related(). It only adds the helper extension, stores the parameters and attaches the internal helper: help = nf_ct_helper_ext_add(ct, GFP_ATOMIC); ... expect_data->obj = *priv; expect_data->obj.helper = NULL; expect_data->dir = CTINFO2DIR(ctinfo); if (help && refcount_inc_not_zero(&priv->helper->ct_refcnt)) rcu_assign_pointer(help->helper, priv->helper); The expectation is now linked only in ct_expect_help(), which runs as helper->help(): if (nf_ct_expect_related(exp, 0) != 0) ret = NF_ACCEPT; Every caller of helper->help() runs it after all extensions have been added: - nf_confirm() calls it right before nf_ct_seq_adjust() and nf_conntrack_confirm(). - tcf_ct_act() in net/sched/act_ct.c calls it after the comment "This has to be done after all the extensions are already added". - net/openvswitch/conntrack.c calls it after the comment "all the extensions must be allocated before the call". None of these paths seem to call nf_ct_ext_add() once the expectation is linked. So the relocation of a linked expectation's pprev described above does not look reachable through nft_ct in this tree. The change still looks reasonable as hardening, since it removes the ordering rule between extension additions and helpers. On older stable trees without 3679da4ad8be, it would also close the original bug. However, the message describes a live use-after-free and carries Fixes: and Cc: stable tags, but it does not mention 3679da4ad8be. Could the message say how this patch relates to 3679da4ad8be? For example, is it a second fix for the same bug, an alternative backport, or hardening? That would tell stable maintainers whether they need one of the two patches or both.
-- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/2026…%40netfilter.org