Skip to content

[ciqlts8_6] Multiple patches tested (2 commits) - #1476

Open
ciq-kernel-automation[bot] wants to merge 2 commits into
ciqlts8_6from
{ciq_kernel_automation}_ciqlts8_6
Open

[ciqlts8_6] Multiple patches tested (2 commits)#1476
ciq-kernel-automation[bot] wants to merge 2 commits into
ciqlts8_6from
{ciq_kernel_automation}_ciqlts8_6

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_tables: don't skip expired elements during walk

jira VULN-34971
cve CVE-2023-52924
commit-author Florian Westphal <fw@strlen.de>
commit 24138933b97b055d486e8064b4a1721702442a9b
netfilter: nf_tables: don't fail inserts if duplicate has expired

jira VULN-34725
cve CVE-2023-52925
commit-author Florian Westphal <fw@strlen.de>
commit 7845914f45f066497ac75b30c50dbc735e84e884

Test Results

✅ Build Stage

Architecture Build Time Total Time
x86_64 22m 43s 23m 38s
aarch64 9m 30s 10m 4s

✅ Boot Verification

✅ Kernel Selftests

Architecture Passed Failed Compared Against Status
x86_64 108 31 ciqlts8_6 ⚠️ No baseline available
aarch64 66 21 ciqlts8_6 ⚠️ No baseline available

✅ LTP Results

Architecture Passed Failed Compared Against Status
x86_64 1455 14 ciqlts8_6 ⚠️ No baseline available
aarch64 1425 14 ciqlts8_6 ⚠️ No baseline available

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

CIQ Kernel Automation added 2 commits July 27, 2026 07:25
jira VULN-34971
cve CVE-2023-52924
commit-author Florian Westphal <fw@strlen.de>
commit 2413893

There is an asymmetry between commit/abort and preparation phase if the
following conditions are met:

1. set is a verdict map ("1.2.3.4 : jump foo")
2. timeouts are enabled

In this case, following sequence is problematic:

1. element E in set S refers to chain C
2. userspace requests removal of set S
3. kernel does a set walk to decrement chain->use count for all elements
   from preparation phase
4. kernel does another set walk to remove elements from the commit phase
   (or another walk to do a chain->use increment for all elements from
    abort phase)

If E has already expired in 1), it will be ignored during list walk, so its use count
won't have been changed.

Then, when set is culled, ->destroy callback will zap the element via
nf_tables_set_elem_destroy(), but this function is only safe for
elements that have been deactivated earlier from the preparation phase:
lack of earlier deactivate removes the element but leaks the chain use
count, which results in a WARN splat when the chain gets removed later,
plus a leak of the nft_chain structure.

Update pipapo_get() not to skip expired elements, otherwise flush
command reports bogus ENOENT errors.

Fixes: 3c4287f ("nf_tables: Add set type for arbitrary concatenation of ranges")
Fixes: 8d8540c ("netfilter: nft_set_rbtree: add timeout support")
Fixes: 9d09829 ("netfilter: nft_hash: add support for timeouts")
	Signed-off-by: Florian Westphal <fw@strlen.de>
	Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
(cherry picked from commit 2413893)
	Signed-off-by: CIQ Kernel Automation <ciq_kernel_automation@ciq.com>
jira VULN-34725
cve CVE-2023-52925
commit-author Florian Westphal <fw@strlen.de>
commit 7845914

nftables selftests fail:
run-tests.sh testcases/sets/0044interval_overlap_0
Expected: 0-2 . 0-3, got:
W: [FAILED]     ./testcases/sets/0044interval_overlap_0: got 1

Insertion must ignore duplicate but expired entries.

Moreover, there is a strange asymmetry in nft_pipapo_activate:

It refetches the current element, whereas the other ->activate callbacks
(bitmap, hash, rhash, rbtree) use elem->priv.
Same for .remove: other set implementations take elem->priv,
nft_pipapo_remove fetches elem->priv, then does a relookup,
remove this.

I suspect this was the reason for the change that prompted the
removal of the expired check in pipapo_get() in the first place,
but skipping exired elements there makes no sense to me, this helper
is used for normal get requests, insertions (duplicate check)
and deactivate callback.

In first two cases expired elements must be skipped.

For ->deactivate(), this gets called for DELSETELEM, so it
seems to me that expired elements should be skipped as well, i.e.
delete request should fail with -ENOENT error.

Fixes: 2413893 ("netfilter: nf_tables: don't skip expired elements during walk")
	Signed-off-by: Florian Westphal <fw@strlen.de>
(cherry picked from commit 7845914)
	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 27, 2026
@github-actions

Copy link
Copy Markdown

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

@github-actions

Copy link
Copy Markdown

🔍 Interdiff Analysis

  • ⚠️ PR commit c673cbbde517 (netfilter: nf_tables: don't skip expired elements during walk) → upstream 24138933b97b
    Differences found:
================================================================================
*    CONTEXT DIFFERENCES - surrounding code differences between the patches    *
================================================================================

--- b/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -4682,3 +4682,3 @@
 	args = container_of(iter, struct nft_set_dump_args, iter);
-	return nf_tables_fill_setelem(args->skb, set, elem);
+	return nf_tables_fill_setelem(args->skb, set, elem, args->reset);
 }
  • ⚠️ PR commit 452fb9d1cf1c (netfilter: nf_tables: don't fail inserts if duplicate has expired) → upstream 7845914f45f0
    Differences found:
================================================================================
*    CONTEXT DIFFERENCES - surrounding code differences between the patches    *
================================================================================

--- b/net/netfilter/nft_set_pipapo.c
+++ b/net/netfilter/nft_set_pipapo.c
@@ -1583,4 +1750,4 @@
 		return;
 
 	nft_set_elem_change_active(net, set, &e->ext);
-	nft_set_elem_clear_busy(&e->ext);
+}

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/30262924628

@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 requested a review from a team July 27, 2026 21:37
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.

1 participant