[PATCH OLK-5.10] netfilter: xt_CT: drop pending enqueued packets on template removal
From: Pablo Neira Ayuso <pablo@netfilter.org> mainline inclusion from mainline-v7.0-rc3 commit f62a218a946b19bb59abdd5361da85fa4606b96b category: bugfix bugzilla: https://atomgit.com/src-openeuler/kernel/issues/14022 CVE: CVE-2026-23391 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i... -------------------------------- Templates refer to objects that can go away while packets are sitting in nfqueue refer to: - helper, this can be an issue on module removal. - timeout policy, nfnetlink_cttimeout might remove it. The use of templates with zone and event cache filter are safe, since this just copies values. Flush these enqueued packets in case the template rule gets removed. Fixes: 24de58f46516 ("netfilter: xt_CT: allow to attach timeout policy + glue code") Reported-by: Yiming Qian <yimingqian591@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Florian Westphal <fw@strlen.de> Conflicts: net/netfilter/xt_CT.c [commit e14575fa7529 is not backport] Signed-off-by: Dong Chenchen <dongchenchen2@huawei.com> --- net/netfilter/xt_CT.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/netfilter/xt_CT.c b/net/netfilter/xt_CT.c index d4deee39158b..cb071354d247 100644 --- a/net/netfilter/xt_CT.c +++ b/net/netfilter/xt_CT.c @@ -16,6 +16,7 @@ #include <net/netfilter/nf_conntrack_ecache.h> #include <net/netfilter/nf_conntrack_timeout.h> #include <net/netfilter/nf_conntrack_zones.h> +#include "nf_internals.h" static inline int xt_ct_target(struct sk_buff *skb, struct nf_conn *ct) { @@ -271,6 +272,9 @@ static void xt_ct_tg_destroy(const struct xt_tgdtor_param *par, struct nf_conn_help *help; if (ct) { + if (info->helper[0] || info->timeout[0]) + nf_queue_nf_hook_drop(par->net); + help = nfct_help(ct); if (help) nf_conntrack_helper_put(help->helper); -- 2.25.1
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://atomgit.com/openeuler/kernel/merge_requests/21968 邮件列表地址:https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/JY7... FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://atomgit.com/openeuler/kernel/merge_requests/21968 Mailing list address: https://mailweb.openeuler.org/archives/list/kernel@openeuler.org/message/JY7...
participants (2)
-
Dong Chenchen -
patchwork bot