Skip to content

[ciqlts9_2] netfilter: nf_conntrack_helper: pass helper to expect cleanup - #1461

Merged
PlaidCat merged 1 commit into
ciqlts9_2from
{ciq_kernel_automation}_ciqlts9_2
Jul 22, 2026
Merged

[ciqlts9_2] netfilter: nf_conntrack_helper: pass helper to expect cleanup#1461
PlaidCat merged 1 commit into
ciqlts9_2from
{ciq_kernel_automation}_ciqlts9_2

Conversation

@ciq-kernel-automation

Copy link
Copy Markdown

Summary

This PR has been automatically created after successful completion of all CI stages.

Commit Message(s)

netfilter: nf_conntrack_helper: pass helper to expect cleanup

jira VULN-183689
cve CVE-2026-43027
commit-author Qi Tang <tpluszz77@gmail.com>
commit a242a9ae58aa46ff7dae51ce64150a93957abe65

Test Results

✅ Build Stage

Architecture Build Time Total Time
x86_64 24m 42s 25m 33s
aarch64 12m 32s 13m 5s

✅ Boot Verification

✅ Kernel Selftests

Architecture Passed Failed Compared Against Status
x86_64 176 22 ciqlts9_2 ✅ No regressions
aarch64 140 28 ciqlts9_2 ✅ No regressions

✅ LTP Results

Architecture Passed Failed Compared Against Status
x86_64 1439 81 ciqlts9_2 ✅ No regressions
aarch64 1409 83 ciqlts9_2 ✅ No regressions

aarch64 newly passing:

  • read_all_sys (FAIL -> PASS)

🤖 This PR was automatically generated by GitHub Actions
Run ID: 29900307870

jira VULN-183689
cve CVE-2026-43027
commit-author Qi Tang <tpluszz77@gmail.com>
commit a242a9a

nf_conntrack_helper_unregister() calls nf_ct_expect_iterate_destroy()
to remove expectations belonging to the helper being unregistered.
However, it passes NULL instead of the helper pointer as the data
argument, so expect_iter_me() never matches any expectation and all
of them survive the cleanup.

After unregister returns, nfnl_cthelper_del() frees the helper
object immediately.  Subsequent expectation dumps or packet-driven
init_conntrack() calls then dereference the freed exp->helper,
causing a use-after-free.

Pass the actual helper pointer so expectations referencing it are
properly destroyed before the helper object is freed.

  BUG: KASAN: slab-use-after-free in string+0x38f/0x430
  Read of size 1 at addr ffff888003b14d20 by task poc/103
  Call Trace:
   string+0x38f/0x430
   vsnprintf+0x3cc/0x1170
   seq_printf+0x17a/0x240
   exp_seq_show+0x2e5/0x560
   seq_read_iter+0x419/0x1280
   proc_reg_read+0x1ac/0x270
   vfs_read+0x179/0x930
   ksys_read+0xef/0x1c0
  Freed by task 103:
  The buggy address is located 32 bytes inside of
   freed 192-byte region [ffff888003b14d00, ffff888003b14dc0)

Fixes: ac7b848 ("netfilter: expect: add and use nf_ct_expect_iterate helpers")
	Signed-off-by: Qi Tang <tpluszz77@gmail.com>
	Reviewed-by: Phil Sutter <phil@nwl.cc>
	Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
(cherry picked from commit a242a9a)
	Signed-off-by: CIQ Kernel Automation <ciq_kernel_automation@ciq.com>
@ciq-kernel-automation ciq-kernel-automation Bot added the created-by-kernelci Tag PRs that were automatically created when a user branch was pushed to the repo (kernelCI) label Jul 22, 2026
@github-actions

Copy link
Copy Markdown

🤖 Validation Checks In Progress Workflow run: https://github.com/ctrliq/kernel-src-tree/actions/runs/29917641892

@github-actions

Copy link
Copy Markdown

🔍 Interdiff Analysis

  • ⚠️ PR commit 79088016fba (netfilter: nf_conntrack_helper: pass helper to expect cleanup) → upstream a242a9ae58aa
    Differences found:
================================================================================
*    CONTEXT DIFFERENCES - surrounding code differences between the patches    *
================================================================================

--- b/net/netfilter/nf_conntrack_helper.c
+++ b/net/netfilter/nf_conntrack_helper.c
@@ -412,7 +412,7 @@
 	 */
 	synchronize_rcu();
 
 	nf_ct_expect_iterate_destroy(expect_iter_me, NULL);
 	nf_ct_iterate_destroy(unhelp, me);
-}
-EXPORT_SYMBOL_GPL(nf_conntrack_helper_unregister);
+
+	/* nf_ct_iterate_destroy() does an unconditional synchronize_rcu() as

This is an automated interdiff check for backported commits.

@github-actions

Copy link
Copy Markdown

Validation checks completed successfully View full results: https://github.com/ctrliq/kernel-src-tree/actions/runs/29917641892

@PlaidCat
PlaidCat requested a review from a team July 22, 2026 20:06

@PlaidCat PlaidCat left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@PlaidCat
PlaidCat merged commit c279ddb into ciqlts9_2 Jul 22, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

created-by-kernelci Tag PRs that were automatically created when a user branch was pushed to the repo (kernelCI)

Development

Successfully merging this pull request may close these issues.

2 participants