Skip to content

Conversation

@pvts-mat
Copy link
Contributor

@pvts-mat pvts-mat commented Dec 30, 2025

CVE-2024-0607 VULN-42268
CVE-2024-0193 VULN-6825
CVE-2024-42109 VULN-44483
CVE-2024-54031 VULN-5468
CVE-2024-35899 VULN-5127

About

This PR aims to supplement the netfilter patch set #668 regarding the omitted bugfixes.

Unlike in the previous PR the CentOS 9 branches were not backported in full, instead just single commits were picked addressing specific issues. This approach was chosen because the main branches of concern - f875124, 3e3b830 - were loosely coupled and none of the picks required prerequisites.

Previous netfilter PR bugfixes

The following list follows the table from comment #668 (comment) thus indirectly addressing all [FIXES] warnings indicated in #668 (comment).

8daa8fd netfilter: nf_tables: Introduce NFT_MSG_GETRULE_RESET

[FIXES] PR commit 6ae8fd31e0a9 (netfilter: nf_tables: Introduce
        NFT_MSG_GETRULE_RESET) references upstream commit 8daa8fde3fc3, which
        has Fixes tags:

    ea078ae9108e netfilter: nf_tables: Audit log rule reset (Phil Sutter)

This commit was eventually omitted in the second revision of the PR, so the fix doesn't apply.

f80a612 netfilter: nf_tables: add support to destroy operation

[FIXES] PR commit a4771f950250 (netfilter: nf_tables: add support to destroy
        operation) references upstream commit f80a612dd77c, which has Fixes
        tags:

    a7d5a955bfa8 netfilter: nf_tables: bogus ENOENT when destroying element which does not exist (Pablo Neira Ayuso)

This commit was eventually omitted in the second revision of the PR, so the fix doesn't apply.

079cd63 netfilter: nf_tables: Introduce NFT_MSG_GETSETELEM_RESET

[FIXES] PR commit b39b3ba76ed5 (netfilter: nf_tables: Introduce
        NFT_MSG_GETSETELEM_RESET) references upstream commit 079cd633219d, which
        has Fixes tags:

    4c90bba60c26 netfilter: nf_tables: do not refresh timeout when resetting element (Pablo Neira Ayuso)
    7e9be1124dbe netfilter: nf_tables: Audit log setelem reset (Phil Sutter)

This commit was eventually omitted in the second revision of the PR, so the fixes don't apply.

212ed75 netfilter: nf_tables: integrate pipapo into commit protocol

[FIXES] PR commit dfc61266e1a1 (netfilter: nf_tables: integrate pipapo into
        commit protocol) references upstream commit 212ed75dc5fb, which has
        Fixes tags:

    ebd032fa8818 netfilter: nf_tables: do not remove elements if set backend implements .abort (Pablo Neira Ayuso)

The fixing commit ebd032f was later reverted in the upstream with f86fb94. The fix may therefore be considered void.

2b84e21 netfilter: nft_set_pipapo: .walk does not deal with generations

[FIXES] PR commit ba24727bdd7b (netfilter: nft_set_pipapo: .walk does not deal
        with generations) references upstream commit 2b84e215f874, which has
        Fixes tags:

    29b359cf6d95 netfilter: nft_set_pipapo: walk over current view on netlink dump (Pablo Neira Ayuso) (CVE-2024-27017)

This fix will be covered in a separate PR along with the CVE-2024-27012 fix. See below.

628bd3e netfilter: nf_tables: drop map element references from preparation phase

[FIXES] PR commit 70c31adf2efe (netfilter: nf_tables: drop map element
        references from preparation phase) references upstream commit
        628bd3e49cba, which has Fixes tags:

    e79b47a8615d netfilter: nf_tables: restore set elements when delete set fails (Pablo Neira Ayuso) (CVE-2024-27012)

The fix requires extensive adaptations to ciqlts9_2 which could not have been avoided with a reasonable number of prerequisites. It was decided to leave it for a separate PR.

5f68718 netfilter: nf_tables: GC transaction API to avoid race with control plane

[FIXES] PR commit 66663eb40599 (netfilter: nf_tables: GC transaction API to
        avoid race with control plane) references upstream commit 5f68718b34a5,
        which has Fixes tags:

    6b1ca88e4bb6 netfilter: nf_tables: skip dead set elements in netlink dump (Pablo Neira Ayuso)
    08e4c8c5919f netfilter: nf_tables: mark newset as dead on transaction abort (Florian Westphal)
    7315dc1e122c netfilter: nf_tables: skip set commit for deleted/destroyed sets (Pablo Neira Ayuso)

All fixes were included in the PR.

netfilter: nf_tables: skip dead set elements in netlink dump

jira VULN-430
cve-bf CVE-2023-4244
commit-author Pablo Neira Ayuso <pablo@netfilter.org>
commit 6b1ca88e4bb63673dc9f9c7f23c899f22c3cb17a
netfilter: nf_tables: mark newset as dead on transaction abort

jira VULN-430
subsystem-update centos-stream-9 f8751245d3174ab38a11084355955fdf8ff4d53d
cve-bf CVE-2023-4244
commit-author Florian Westphal <fw@strlen.de>
commit 08e4c8c5919fd405a4d709b4ba43d836894a26eb
netfilter: nf_tables: skip set commit for deleted/destroyed sets

jira VULN-6825
subsystem-update centos-stream-9 f8751245d3174ab38a11084355955fdf8ff4d53d
cve CVE-2024-0193
commit-author Pablo Neira Ayuso <pablo@netfilter.org>
commit 7315dc1e122c85ffdfc8defffbb8f8b616c2eb1a

f6c383b netfilter: nf_tables: adapt set backend to use GC transaction API

[FIXES] PR commit 893218018f7d (netfilter: nf_tables: adapt set backend to use
        GC transaction API) references upstream commit f6c383b8c31a, which has
        Fixes tags:

    7ffc7481153b netfilter: nft_set_hash: skip duplicated elements pending gc run (Pablo Neira Ayuso)
    ffb40fba4045 netfilter: nft_set_pipapo: prefer gfp_kernel allocation (Florian Westphal)

All fixes were included in the PR.

netfilter: nft_set_pipapo: prefer gfp_kernel allocation

jira VULN-158865
subsystem-update centos-stream-9 f8751245d3174ab38a11084355955fdf8ff4d53d
cve-bf CVE-2023-52923
commit-author Florian Westphal <fw@strlen.de>
commit ffb40fba404561f141d37e5878ec542b67464d74
netfilter: nft_set_hash: skip duplicated elements pending gc run

jira VULN-158865
cve-bf CVE-2023-52923
commit-author Pablo Neira Ayuso <pablo@netfilter.org>
commit 7ffc7481153bbabf3332c6a19b289730c7e1edf5

The bugfix of netfilter: nft_set_hash: skip duplicated elements pending gc run, with a separate CVE:

netfilter: nft_set_hash: unaligned atomic read on struct nft_set_ext

jira VULN-5468
cve CVE-2024-54031
commit-author Pablo Neira Ayuso <pablo@netfilter.org>
commit 542ed8145e6f9392e3d0a86a0e9027d2ffd183e4

2c9f029 netfilter: nf_tables: flush pending destroy work before netlink notifier

[FIXES] PR commit 63df5313037e (netfilter: nf_tables: flush pending destroy work
        before netlink notifier) references upstream commit 2c9f0293280e, which
        has Fixes tags:

    9f6958ba2e90 netfilter: nf_tables: unconditionally flush pending work before notifier (Florian Westphal) (CVE-2024-42109)

The fix was included in the PR.

netfilter: nf_tables: unconditionally flush pending work before notifier

jira VULN-44483
cve CVE-2024-42109
commit-author Florian Westphal <fw@strlen.de>
commit 9f6958ba2e902f9820c594869bd710ba74b7c4c0
netfilter: nf_tables: make destruction work queue pernet

jira VULN-44483
cve-bf CVE-2024-42109
commit-author Florian Westphal <fw@strlen.de>
commit fb8286562ecfb585e26b033c5e32e6fb85efb0b3
upstream-diff Context conflicts only

9dad402 netfilter: nf_tables: expose opaque set element as struct nft_elem_priv

[FIXES] PR commit a35dbfa4febc (netfilter: nf_tables: expose opaque set element
        as struct nft_elem_priv) references upstream commit 9dad402b89e8, which
        has Fixes tags:

    ab0beafd52b9 netfilter: nft_set_pipapo: remove static in nft_pipapo_get() (Pablo Neira Ayuso)

The fix was included in the PR.

netfilter: nft_set_pipapo: remove static in nft_pipapo_get()

jira VULN-430
cve-bf CVE-2023-4244
commit-author Pablo Neira Ayuso <pablo@netfilter.org>
commit ab0beafd52b98dfb8b8244b2c6794efbc87478db

Additional fixes

CVE-2024-0607

Additional fix was included, which doesn't address any specific commit from the netfilter PR, but has CVE-2024-0607 assigned and is part of the CentOS 9 branch f875124 being (partially) backported here with the fixes 7315dc1, 08e4c8c and ffb40fb.

netfilter: nf_tables: fix pointer math issue in nft_byteorder_eval()

jira VULN-42268
subsystem-update centos-stream-9 f8751245d3174ab38a11084355955fdf8ff4d53d
cve CVE-2024-0607
commit-author Florian Westphal <fwestpha@redhat.com>
commit c301f0981fdd3fd1ffac6836b423c4d7a8e0eb63
upstream-diff ciqlts9_4 backport e7fce923c6297083b2248349a26eeb5d800f576e used
  for clean cherry-pick

CVE-2024-35899

As requested by @kerneltoast in #794 (review) the backport of 24cea96 was added in order to make sure the nf_tables_trans_destroy_flush_work() call removed by the backported fb82865 won't be added in the future by a mistake. This commit is associated with its own CVE-2024-35899

netfilter: nf_tables: flush pending destroy work before exit_net release

jira VULN-5127
cve CVE-2024-35899
commit-author Pablo Neira Ayuso <pablo@netfilter.org>
commit 24cea9677025e0de419989ecb692acd4bb34cac2

kABI check: passed

[1/2] kabi_check_kernel	Check ABI of kernel [ciqlts9_2-CVE-batch-14]	_kabi_check_kernel__x86_64--test--ciqlts9_2-CVE-batch-14
++ uname -m
+ python3 /data/src/ctrliq-github-haskell/kernel-dist-git-el-9.2/SOURCES/check-kabi -k /data/src/ctrliq-github-haskell/kernel-dist-git-el-9.2/SOURCES/Module.kabi_x86_64 -s vms/x86_64--build--ciqlts9_2/build_files/kernel-src-tree-ciqlts9_2-CVE-batch-14/Module.symvers
kABI check passed
+ touch state/kernels/ciqlts9_2-CVE-batch-14/x86_64/kabi_checked

Boot test: passed

boot-test.log

Kselftests: passed

Reference

kselftests–ciqlts9_2–run1.log
kselftests–ciqlts9_2–run2.log

Patch

kselftests–ciqlts9_2-CVE-batch-14–run1.log
kselftests–ciqlts9_2-CVE-batch-14–run2.log
kselftests–ciqlts9_2-CVE-batch-14–run3.log
kselftests–ciqlts9_2-CVE-batch-14–run4.log
kselftests–ciqlts9_2-CVE-batch-14–run5.log

Comparison

The tests results for the reference and the patch are the same.

$ ktests.xsh diff  kselftests*.log

Column    File
--------  --------------------------------------------
Status0   kselftests--ciqlts9_2--run1.log
Status1   kselftests--ciqlts9_2--run2.log
Status2   kselftests--ciqlts9_2-CVE-batch-14--run1.log
Status3   kselftests--ciqlts9_2-CVE-batch-14--run2.log
Status4   kselftests--ciqlts9_2-CVE-batch-14--run3.log
Status5   kselftests--ciqlts9_2-CVE-batch-14--run4.log
Status6   kselftests--ciqlts9_2-CVE-batch-14--run5.log

TestCase                              Status0  Status1  Status2  Status3  Status4  Status5  Status6  Summary
netfilter:conntrack_icmp_related.sh   pass     pass     pass     pass     pass     pass     pass     same
netfilter:conntrack_tcp_unreplied.sh  pass     pass     pass     pass     pass     pass     pass     same
netfilter:conntrack_vrf.sh            pass     pass     pass     pass     pass     pass     pass     same
netfilter:ipip-conntrack-mtu.sh       pass     pass     pass     pass     pass     pass     pass     same
netfilter:ipvs.sh                     pass     pass     pass     pass     pass     pass     pass     same
netfilter:nf_nat_edemux.sh            pass     pass     pass     pass     pass     pass     pass     same
netfilter:nft_conntrack_helper.sh     pass     pass     pass     pass     pass     pass     pass     same
netfilter:nft_fib.sh                  pass     pass     pass     pass     pass     pass     pass     same
netfilter:nft_meta.sh                 pass     pass     pass     pass     pass     pass     pass     same
netfilter:nft_nat.sh                  pass     pass     pass     pass     pass     pass     pass     same
netfilter:nft_queue.sh                pass     pass     pass     pass     pass     pass     pass     same
netfilter:rpath.sh                    pass     pass     pass     pass     pass     pass     pass     same

Copy link
Collaborator

@kerneltoast kerneltoast left a comment

Choose a reason for hiding this comment

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

commit-author is wrong on 829afdf58cc29 netfilter: nf_tables: fix pointer math issue in nft_byteorder_eval(), it incorrectly lists the author of the RHEL backport commit that was used, instead of the author of the commit listed in the commit field.

Also, backport upstream commit 24cea9677025e netfilter: nf_tables: flush pending destroy work before exit_net release and put it right before 9524d09dd9f14 netfilter: nf_tables: make destruction work queue pernet. The reason is because 9524d09 is supposed to delete the nf_tables_trans_destroy_flush_work() call from nf_tables_module_exit(), which was added by 24cea96. So we should have 24cea96 picked in the history so that we know not to backport 24cea96 in the future.

@pvts-mat pvts-mat force-pushed the ciqlts9_2-CVE-batch-14 branch from 2e7b321 to 0e59c88 Compare January 2, 2026 19:40
@pvts-mat pvts-mat changed the title [LTS 9.2] netfilter: CVE-2024-0607, CVE-2024-0193, CVE-2024-42109, CVE-2024-54031 + non-CVE bugfixes [LTS 9.2] netfilter: CVE-2024-0607, CVE-2024-0193, CVE-2024-42109, CVE-2024-54031, CVE-2024-35899 + non-CVE bugfixes Jan 2, 2026
@pvts-mat pvts-mat requested a review from kerneltoast January 5, 2026 14:20
Copy link
Collaborator

@kerneltoast kerneltoast left a comment

Choose a reason for hiding this comment

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

🚢

jira VULN-42268
subsystem-update centos-stream-9 f875124
cve CVE-2024-0607
commit-author Dan Carpenter <dan.carpenter@linaro.org>
commit c301f09
upstream-diff Conflicts resolution:
  include/net/netfilter/nf_tables.h
        Accounted for the missing 7278b3c
        which introduced new functions getting in the way. No actual diff
        in the end.
  net/netfilter/nft_byteorder.c
        Accounted for the missing
        d86473b. Preserved the change on
        the first argument of `nft_reg_store64()' call.

The problem is in nft_byteorder_eval() where we are iterating through a
loop and writing to dst[0], dst[1], dst[2] and so on...  On each
iteration we are writing 8 bytes.  But dst[] is an array of u32 so each
element only has space for 4 bytes.  That means that every iteration
overwrites part of the previous element.

I spotted this bug while reviewing commit caf3ef7 ("netfilter:
nf_tables: prevent OOB access in nft_byteorder_eval") which is a related
issue.  I think that the reason we have not detected this bug in testing
is that most of time we only write one element.

Fixes: ce1e798 ("netfilter: nft_byteorder: provide 64bit le/be conversion")
	Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
	Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
(cherry picked from commit c301f09)
	Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
jira VULN-6825
subsystem-update centos-stream-9 f875124
cve CVE-2024-0193
commit-author Pablo Neira Ayuso <pablo@netfilter.org>
commit 7315dc1

NFT_MSG_DELSET deactivates all elements in the set, skip
set->ops->commit() to avoid the unnecessary clone (for the pipapo case)
as well as the sync GC cycle, which could deactivate again expired
elements in such set.

Fixes: 5f68718 ("netfilter: nf_tables: GC transaction API to avoid race with control plane")
	Reported-by: Kevin Rich <kevinrich1337@gmail.com>
	Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
(cherry picked from commit 7315dc1)
	Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
jira VULN-430
subsystem-update centos-stream-9 f875124
cve-bf CVE-2023-4244
commit-author Florian Westphal <fw@strlen.de>
commit 08e4c8c

If a transaction is aborted, we should mark the to-be-released NEWSET dead,
just like commit path does for DEL and DESTROYSET commands.

In both cases all remaining elements will be released via
set->ops->destroy().

The existing abort code does NOT post the actual release to the work queue.
Also the entire __nf_tables_abort() function is wrapped in gc_seq
begin/end pair.

Therefore, async gc worker will never try to release the pending set
elements, as gc sequence is always stale.

It might be possible to speed up transaction aborts via work queue too,
this would result in a race and a possible use-after-free.

So fix this before it becomes an issue.

Fixes: 5f68718 ("netfilter: nf_tables: GC transaction API to avoid race with control plane")
	Signed-off-by: Florian Westphal <fw@strlen.de>
	Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
(cherry picked from commit 08e4c8c)
	Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
jira VULN-158865
subsystem-update centos-stream-9 f875124
cve-bf CVE-2023-52923
commit-author Florian Westphal <fw@strlen.de>
commit ffb40fb

No need to use GFP_ATOMIC here.

Fixes: f6c383b ("netfilter: nf_tables: adapt set backend to use GC transaction API")
	Signed-off-by: Florian Westphal <fw@strlen.de>
	Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
(cherry picked from commit ffb40fb)
	Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
jira VULN-430
cve-bf CVE-2023-4244
commit-author Pablo Neira Ayuso <pablo@netfilter.org>
commit 6b1ca88

Delete from packet path relies on the garbage collector to purge
elements with NFT_SET_ELEM_DEAD_BIT on.

Skip these dead elements from nf_tables_dump_setelem() path, I very
rarely see tests/shell/testcases/maps/typeof_maps_add_delete reports
[DUMP FAILED] showing a mismatch in the expected output with an element
that should not be there.

If the netlink dump happens before GC worker run, it might show dead
elements in the ruleset listing.

nft_rhash_get() already skips dead elements in nft_rhash_cmp(),
therefore, it already does not show the element when getting a single
element via netlink control plane.

Fixes: 5f68718 ("netfilter: nf_tables: GC transaction API to avoid race with control plane")
	Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
(cherry picked from commit 6b1ca88)
	Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
jira VULN-430
cve-bf CVE-2023-4244
commit-author Pablo Neira Ayuso <pablo@netfilter.org>
commit ab0beaf

This has slipped through when reducing memory footprint for set
elements, remove it.

Fixes: 9dad402 ("netfilter: nf_tables: expose opaque set element as struct nft_elem_priv")
	Reported-by: Florian Westphal <fw@strlen.de>
	Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
(cherry picked from commit ab0beaf)
	Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
jira VULN-44483
cve CVE-2024-42109
commit-author Florian Westphal <fw@strlen.de>
commit 9f6958b

syzbot reports:

KASAN: slab-uaf in nft_ctx_update include/net/netfilter/nf_tables.h:1831
KASAN: slab-uaf in nft_commit_release net/netfilter/nf_tables_api.c:9530
KASAN: slab-uaf int nf_tables_trans_destroy_work+0x152b/0x1750 net/netfilter/nf_tables_api.c:9597
Read of size 2 at addr ffff88802b0051c4 by task kworker/1:1/45
[..]
Workqueue: events nf_tables_trans_destroy_work
Call Trace:
 nft_ctx_update include/net/netfilter/nf_tables.h:1831 [inline]
 nft_commit_release net/netfilter/nf_tables_api.c:9530 [inline]
 nf_tables_trans_destroy_work+0x152b/0x1750 net/netfilter/nf_tables_api.c:9597

Problem is that the notifier does a conditional flush, but its possible
that the table-to-be-removed is still referenced by transactions being
processed by the worker, so we need to flush unconditionally.

We could make the flush_work depend on whether we found a table to delete
in nf-next to avoid the flush for most cases.

AFAICS this problem is only exposed in nf-next, with
commit e169285 ("netfilter: nf_tables: do not store nft_ctx in transaction objects"),
with this commit applied there is an unconditional fetch of
table->family which is whats triggering the above splat.

Fixes: 2c9f029 ("netfilter: nf_tables: flush pending destroy work before netlink notifier")
Reported-and-tested-by: syzbot+4fd66a69358fc15ae2ad@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=4fd66a69358fc15ae2ad
	Signed-off-by: Florian Westphal <fw@strlen.de>
	Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
(cherry picked from commit 9f6958b)
	Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
jira VULN-5127
cve CVE-2024-35899
commit-author Pablo Neira Ayuso <pablo@netfilter.org>
commit 24cea96

Similar to 2c9f029 ("netfilter: nf_tables: flush pending destroy
work before netlink notifier") to address a race between exit_net and
the destroy workqueue.

The trace below shows an element to be released via destroy workqueue
while exit_net path (triggered via module removal) has already released
the set that is used in such transaction.

[ 1360.547789] BUG: KASAN: slab-use-after-free in nf_tables_trans_destroy_work+0x3f5/0x590 [nf_tables]
[ 1360.547861] Read of size 8 at addr ffff888140500cc0 by task kworker/4:1/152465
[ 1360.547870] CPU: 4 PID: 152465 Comm: kworker/4:1 Not tainted 6.8.0+ ctrliq#359
[ 1360.547882] Workqueue: events nf_tables_trans_destroy_work [nf_tables]
[ 1360.547984] Call Trace:
[ 1360.547991]  <TASK>
[ 1360.547998]  dump_stack_lvl+0x53/0x70
[ 1360.548014]  print_report+0xc4/0x610
[ 1360.548026]  ? __virt_addr_valid+0xba/0x160
[ 1360.548040]  ? __pfx__raw_spin_lock_irqsave+0x10/0x10
[ 1360.548054]  ? nf_tables_trans_destroy_work+0x3f5/0x590 [nf_tables]
[ 1360.548176]  kasan_report+0xae/0xe0
[ 1360.548189]  ? nf_tables_trans_destroy_work+0x3f5/0x590 [nf_tables]
[ 1360.548312]  nf_tables_trans_destroy_work+0x3f5/0x590 [nf_tables]
[ 1360.548447]  ? __pfx_nf_tables_trans_destroy_work+0x10/0x10 [nf_tables]
[ 1360.548577]  ? _raw_spin_unlock_irq+0x18/0x30
[ 1360.548591]  process_one_work+0x2f1/0x670
[ 1360.548610]  worker_thread+0x4d3/0x760
[ 1360.548627]  ? __pfx_worker_thread+0x10/0x10
[ 1360.548640]  kthread+0x16b/0x1b0
[ 1360.548653]  ? __pfx_kthread+0x10/0x10
[ 1360.548665]  ret_from_fork+0x2f/0x50
[ 1360.548679]  ? __pfx_kthread+0x10/0x10
[ 1360.548690]  ret_from_fork_asm+0x1a/0x30
[ 1360.548707]  </TASK>

[ 1360.548719] Allocated by task 192061:
[ 1360.548726]  kasan_save_stack+0x20/0x40
[ 1360.548739]  kasan_save_track+0x14/0x30
[ 1360.548750]  __kasan_kmalloc+0x8f/0xa0
[ 1360.548760]  __kmalloc_node+0x1f1/0x450
[ 1360.548771]  nf_tables_newset+0x10c7/0x1b50 [nf_tables]
[ 1360.548883]  nfnetlink_rcv_batch+0xbc4/0xdc0 [nfnetlink]
[ 1360.548909]  nfnetlink_rcv+0x1a8/0x1e0 [nfnetlink]
[ 1360.548927]  netlink_unicast+0x367/0x4f0
[ 1360.548935]  netlink_sendmsg+0x34b/0x610
[ 1360.548944]  ____sys_sendmsg+0x4d4/0x510
[ 1360.548953]  ___sys_sendmsg+0xc9/0x120
[ 1360.548961]  __sys_sendmsg+0xbe/0x140
[ 1360.548971]  do_syscall_64+0x55/0x120
[ 1360.548982]  entry_SYSCALL_64_after_hwframe+0x55/0x5d

[ 1360.548994] Freed by task 192222:
[ 1360.548999]  kasan_save_stack+0x20/0x40
[ 1360.549009]  kasan_save_track+0x14/0x30
[ 1360.549019]  kasan_save_free_info+0x3b/0x60
[ 1360.549028]  poison_slab_object+0x100/0x180
[ 1360.549036]  __kasan_slab_free+0x14/0x30
[ 1360.549042]  kfree+0xb6/0x260
[ 1360.549049]  __nft_release_table+0x473/0x6a0 [nf_tables]
[ 1360.549131]  nf_tables_exit_net+0x170/0x240 [nf_tables]
[ 1360.549221]  ops_exit_list+0x50/0xa0
[ 1360.549229]  free_exit_list+0x101/0x140
[ 1360.549236]  unregister_pernet_operations+0x107/0x160
[ 1360.549245]  unregister_pernet_subsys+0x1c/0x30
[ 1360.549254]  nf_tables_module_exit+0x43/0x80 [nf_tables]
[ 1360.549345]  __do_sys_delete_module+0x253/0x370
[ 1360.549352]  do_syscall_64+0x55/0x120
[ 1360.549360]  entry_SYSCALL_64_after_hwframe+0x55/0x5d

(gdb) list *__nft_release_table+0x473
0x1e033 is in __nft_release_table (net/netfilter/nf_tables_api.c:11354).
11349           list_for_each_entry_safe(flowtable, nf, &table->flowtables, list) {
11350                   list_del(&flowtable->list);
11351                   nft_use_dec(&table->use);
11352                   nf_tables_flowtable_destroy(flowtable);
11353           }
11354           list_for_each_entry_safe(set, ns, &table->sets, list) {
11355                   list_del(&set->list);
11356                   nft_use_dec(&table->use);
11357                   if (set->flags & (NFT_SET_MAP | NFT_SET_OBJECT))
11358                           nft_map_deactivate(&ctx, set);
(gdb)

[ 1360.549372] Last potentially related work creation:
[ 1360.549376]  kasan_save_stack+0x20/0x40
[ 1360.549384]  __kasan_record_aux_stack+0x9b/0xb0
[ 1360.549392]  __queue_work+0x3fb/0x780
[ 1360.549399]  queue_work_on+0x4f/0x60
[ 1360.549407]  nft_rhash_remove+0x33b/0x340 [nf_tables]
[ 1360.549516]  nf_tables_commit+0x1c6a/0x2620 [nf_tables]
[ 1360.549625]  nfnetlink_rcv_batch+0x728/0xdc0 [nfnetlink]
[ 1360.549647]  nfnetlink_rcv+0x1a8/0x1e0 [nfnetlink]
[ 1360.549671]  netlink_unicast+0x367/0x4f0
[ 1360.549680]  netlink_sendmsg+0x34b/0x610
[ 1360.549690]  ____sys_sendmsg+0x4d4/0x510
[ 1360.549697]  ___sys_sendmsg+0xc9/0x120
[ 1360.549706]  __sys_sendmsg+0xbe/0x140
[ 1360.549715]  do_syscall_64+0x55/0x120
[ 1360.549725]  entry_SYSCALL_64_after_hwframe+0x55/0x5d

Fixes: 0935d55 ("netfilter: nf_tables: asynchronous release")
	Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
(cherry picked from commit 24cea96)
	Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
jira VULN-44483
cve-bf CVE-2024-42109
commit-author Florian Westphal <fw@strlen.de>
commit fb82865
upstream-diff Context conflicts only

The call to flush_work before tearing down a table from the netlink
notifier was supposed to make sure that all earlier updates (e.g. rule
add) that might reference that table have been processed.

Unfortunately, flush_work() waits for the last queued instance.
This could be an instance that is different from the one that we must
wait for.

This is because transactions are protected with a pernet mutex, but the
work item is global, so holding the transaction mutex doesn't prevent
another netns from queueing more work.

Make the work item pernet so that flush_work() will wait for all
transactions queued from this netns.

A welcome side effect is that we no longer need to wait for transaction
objects from foreign netns.

The gc work queue is still global.  This seems to be ok because nft_set
structures are reference counted and each container structure owns a
reference on the net namespace.

The destroy_list is still protected by a global spinlock rather than
pernet one but the hold time is very short anyway.

v2: call cancel_work_sync before reaping the remaining tables (Pablo).

Fixes: 9f6958b ("netfilter: nf_tables: unconditionally flush pending work before notifier")
	Reported-by: syzbot+5d8c5789c8cb076b2c25@syzkaller.appspotmail.com
	Signed-off-by: Florian Westphal <fw@strlen.de>
	Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
(cherry picked from commit fb82865)
	Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
jira VULN-158865
cve-bf CVE-2023-52923
commit-author Pablo Neira Ayuso <pablo@netfilter.org>
commit 7ffc748

rhashtable does not provide stable walk, duplicated elements are
possible in case of resizing. I considered that checking for errors when
calling rhashtable_walk_next() was sufficient to detect the resizing.
However, rhashtable_walk_next() returns -EAGAIN only at the end of the
iteration, which is too late, because a gc work containing duplicated
elements could have been already scheduled for removal to the worker.

Add a u32 gc worker sequence number per set, bump it on every workqueue
run. Annotate gc worker sequence number on the expired element. Use it
to skip those already seen in this gc workqueue run.

Note that this new field is never reset in case gc transaction fails, so
next gc worker run on the expired element overrides it. Wraparound of gc
worker sequence number should not be an issue with stale gc worker
sequence number in the element, that would just postpone the element
removal in one gc run.

Note that it is not possible to use flags to annotate that element is
pending gc run to detect duplicates, given that gc transaction can be
invalidated in case of update from the control plane, therefore, not
allowing to clear such flag.

On x86_64, pahole reports no changes in the size of nft_rhash_elem.

Fixes: f6c383b ("netfilter: nf_tables: adapt set backend to use GC transaction API")
	Reported-by: Laurent Fasnacht <laurent.fasnacht@proton.ch>
	Tested-by: Laurent Fasnacht <laurent.fasnacht@proton.ch>
	Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
(cherry picked from commit 7ffc748)
	Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
@pvts-mat pvts-mat force-pushed the ciqlts9_2-CVE-batch-14 branch from 0e59c88 to 70905db Compare January 7, 2026 19:53
@bmastbergen bmastbergen self-requested a review January 7, 2026 20:29
Copy link
Collaborator

@bmastbergen bmastbergen left a comment

Choose a reason for hiding this comment

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

🥌

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

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

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

🔍 Upstream Linux Kernel Commit Check

  • ❌ PR commit 764a427335f (netfilter: nf_tables: fix pointer math issue in nft_byteorder_eval()) references CVE-2024-0607 but
    upstream commit c301f0981fdd has no CVE assigned

  • ❌ PR commit 715300361a3 (netfilter: nf_tables: skip set commit for deleted/destroyed sets) references CVE-2024-0193 but
    upstream commit 7315dc1e122c has no CVE assigned

This is an automated message from the kernel commit checker workflow.

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

🔍 Interdiff Analysis

  • ⚠️ PR commit 764a427335f (netfilter: nf_tables: fix pointer math issue in nft_byteorder_eval()) → upstream c301f0981fdd
    Differences found:
diff -u b/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h
--- b/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
@@ -144,4 +144,4 @@
-	return *(__force __be32 *)sreg;
+	return *(u16 *)sreg;
 }
 
 static inline void nft_reg_store64(u64 *dreg, u64 val)
diff -u b/net/netfilter/nft_byteorder.c b/net/netfilter/nft_byteorder.c
--- b/net/netfilter/nft_byteorder.c
+++ b/net/netfilter/nft_byteorder.c
@@ -42,13 +43,13 @@ INTERDIFF: rejected hunk from patch1, cannot diff context
 		u64 src64;
 
 		switch (priv->op) {
 		case NFT_BYTEORDER_NTOH:
 			for (i = 0; i < priv->len / 8; i++) {
 				src64 = nft_reg_load64(&src[i]);
-				nft_reg_store64(&dst[i], be64_to_cpu(src64));
+				nft_reg_store64(&dst64[i], be64_to_cpu(src64));
 			}
 			break;
 		case NFT_BYTEORDER_HTON:
 			for (i = 0; i < priv->len / 8; i++) {
 				src64 = (__force __u64)
 					cpu_to_be64(nft_reg_load64(&src[i]));
@@ -45,7 +46,7 @@ INTERDIFF: rejected hunk from patch2, cannot diff context
 		case NFT_BYTEORDER_NTOH:
 			for (i = 0; i < priv->len / 8; i++) {
 				src64 = nft_reg_load64(&src[i]);
-				nft_reg_store64(&dst[i],
+				nft_reg_store64(&dst64[i],
 						be64_to_cpu((__force __be64)src64));
 			}
 			break;
@@ -45,14 +45,14 @@
 		case NFT_BYTEORDER_NTOH:
 			for (i = 0; i < priv->len / 8; i++) {
 				src64 = nft_reg_load64(&src[i]);
-				nft_reg_store64(&dst[i],
-						be64_to_cpu((__force __be64)src64));
+				nft_reg_store64(&dst[i], be64_to_cpu(src64));
 			}
 			break;
+		case NFT_BYTEORDER_HTON:
 			for (i = 0; i < priv->len / 8; i++) {
 				src64 = (__force __u64)
 					cpu_to_be64(nft_reg_load64(&src[i]));
-				nft_reg_store64(&dst[i], src64);
+				nft_reg_store64(&dst64[i], src64);
 			}
 			break;
 		}
@@ -52,7 +53,7 @@ INTERDIFF: rejected hunk from patch1, cannot diff context
 			for (i = 0; i < priv->len / 8; i++) {
 				src64 = (__force __u64)
 					cpu_to_be64(nft_reg_load64(&src[i]));
-				nft_reg_store64(&dst[i], src64);
+				nft_reg_store64(&dst64[i], src64);
 			}
 			break;
 		}
  • ⚠️ PR commit 7a0da446b3c (netfilter: nf_tables: skip dead set elements in netlink dump) → upstream 6b1ca88e4bb6
    Differences found:
diff -u b/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
--- b/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -5376,4 +5376,4 @@
-	const struct nft_set_ext *ext = nft_set_elem_ext(set, elem_priv);
+	const struct nft_set_ext *ext = nft_set_elem_ext(set, elem->priv);
 	struct nft_set_dump_args *args;
 
 	if (nft_set_elem_expired(ext) || nft_set_elem_is_dead(ext))
  • ⚠️ PR commit e1f68506eeb (netfilter: nf_tables: make destruction work queue pernet) → upstream fb8286562ecf
    Differences found:
diff -u b/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h
--- b/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
@@ -1665,9 +1665,9 @@
 struct nftables_pernet {
 	struct list_head	tables;
 	struct list_head	commit_list;
-	struct list_head	commit_set_list;
 	struct list_head	binding_list;
 	struct list_head	module_list;
+	struct list_head	notify_list;
 	unsigned int		base_seq;
 	unsigned int		gc_seq;
 	u8			validate_state;
@@ -1668,6 +1668,7 @@ INTERDIFF: rejected hunk from patch1, cannot diff context
 struct nftables_pernet {
 	struct list_head	tables;
 	struct list_head	commit_list;
+	struct list_head	destroy_list;
 	struct list_head	binding_list;
 	struct list_head	module_list;
 	struct list_head	notify_list;
@@ -1905,6 +1905,7 @@ INTERDIFF: rejected hunk from patch2, cannot diff context
 struct nftables_pernet {
 	struct list_head	tables;
 	struct list_head	commit_list;
+	struct list_head	destroy_list;
 	struct list_head	commit_set_list;
 	struct list_head	binding_list;
 	struct list_head	module_list;
diff -u b/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
--- b/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -118,4 +118,4 @@
-	table->validate_state = new_validate_state;
+	nft_net->validate_state = new_validate_state;
 }
 static void nf_tables_trans_destroy_work(struct work_struct *w);
 
@@ -10716,6 +10717,7 @@ INTERDIFF: rejected hunk from patch1, cannot diff context
 
 	INIT_LIST_HEAD(&nft_net->tables);
 	INIT_LIST_HEAD(&nft_net->commit_list);
+	INIT_LIST_HEAD(&nft_net->destroy_list);
 	INIT_LIST_HEAD(&nft_net->binding_list);
 	INIT_LIST_HEAD(&nft_net->module_list);
 	INIT_LIST_HEAD(&nft_net->notify_list);
@@ -10849,13 +10849,0 @@
-
-	INIT_LIST_HEAD(&nft_net->tables);
-	INIT_LIST_HEAD(&nft_net->commit_list);
-	INIT_LIST_HEAD(&nft_net->commit_set_list);
-	INIT_LIST_HEAD(&nft_net->binding_list);
-	INIT_LIST_HEAD(&nft_net->module_list);
-	nft_net->base_seq = 1;
-	nft_net->gc_seq = 0;
-	nft_net->validate_state = NFT_VALIDATE_SKIP;
-	INIT_WORK(&nft_net->destroy_work, nf_tables_trans_destroy_work);
-
-	return 0;
-}
@@ -11896,6 +11897,7 @@ INTERDIFF: rejected hunk from patch2, cannot diff context
 
 	INIT_LIST_HEAD(&nft_net->tables);
 	INIT_LIST_HEAD(&nft_net->commit_list);
+	INIT_LIST_HEAD(&nft_net->destroy_list);
 	INIT_LIST_HEAD(&nft_net->commit_set_list);
 	INIT_LIST_HEAD(&nft_net->binding_list);
 	INIT_LIST_HEAD(&nft_net->module_list);

This is an automated interdiff check for backported commits.

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

JIRA PR Check Results

10 commit(s) with issues found:

Commit 70905dbf422d

Summary: netfilter: nft_set_hash: unaligned atomic read on struct nft_set_ext

❌ Errors:

  • VULN-5468: CVE mismatch - Commit has CVE-2024-54031 but VULN ticket does not
  • VULN-5468: Status is 'Done', expected 'In Progress'

⚠️ Warnings:

Commit a7010513299d

Summary: netfilter: nft_set_hash: skip duplicated elements pending gc run

❌ Errors:

  • VULN-158865: Status is 'Done', expected 'In Progress'

Commit e1f68506eeb0

Summary: netfilter: nf_tables: make destruction work queue pernet

❌ Errors:

  • VULN-44483: Status is 'To Do', expected 'In Progress'

⚠️ Warnings:

  • VULN-44483: No time logged - please log time manually

Commit c33557d90b41

Summary: netfilter: nf_tables: flush pending destroy work before exit_net release

⚠️ Warnings:

  • VULN-5127: No time logged - please log time manually

Commit b483d28f3cfc

Summary: netfilter: nf_tables: unconditionally flush pending work before notifier

❌ Errors:

  • VULN-44483: Status is 'To Do', expected 'In Progress'

⚠️ Warnings:

  • VULN-44483: No time logged - please log time manually

Commit d93f24a14688

Summary: netfilter: nft_set_pipapo: remove static in nft_pipapo_get()

❌ Errors:

  • VULN-430: Status is 'Done', expected 'In Progress'

Commit 7a0da446b3c5

Summary: netfilter: nf_tables: skip dead set elements in netlink dump

❌ Errors:

  • VULN-430: Status is 'Done', expected 'In Progress'

Commit 6a95098c8478

Summary: netfilter: nft_set_pipapo: prefer gfp_kernel allocation

❌ Errors:

  • VULN-158865: Status is 'Done', expected 'In Progress'

Commit 23bdfca33a76

Summary: netfilter: nf_tables: mark newset as dead on transaction abort

❌ Errors:

  • VULN-430: Status is 'Done', expected 'In Progress'

Commit 764a427335f6

Summary: netfilter: nf_tables: fix pointer math issue in nft_byteorder_eval()

❌ Errors:

  • VULN-42268: Status is 'To Do', expected 'In Progress'

Summary: Checked 11 commit(s) total.

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

Validation checks completed with issues View full results: https://github.com/ctrliq/kernel-src-tree/actions/runs/20828438444

@PlaidCat
Copy link
Collaborator

PlaidCat commented Jan 8, 2026

🔍 Upstream Linux Kernel Commit Check

* ❌ PR commit `764a427335f (netfilter: nf_tables: fix pointer math issue in nft_byteorder_eval())` references `CVE-2024-0607` but
  upstream commit `c301f0981fdd` has no CVE assigned

* ❌ PR commit `715300361a3 (netfilter: nf_tables: skip set commit for deleted/destroyed sets)` references `CVE-2024-0193` but
  upstream commit `7315dc1e122c` has no CVE assigned

This is an automated message from the kernel commit checker workflow.

This is not valid as these are prior CVE to the kernel CVE vuln database

Copy link
Collaborator

@PlaidCat PlaidCat left a comment

Choose a reason for hiding this comment

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

There are some updates needed I'll post them all in a single commit.

@PlaidCat
Copy link
Collaborator

PlaidCat commented Jan 8, 2026

Commit 70905dbf422d

Summary: netfilter: nft_set_hash: unaligned atomic read on struct nft_set_ext

❌ Errors:

* **VULN-5468**: CVE mismatch - Commit has [CVE-2024-54031](https://github.com/advisories/GHSA-3cpc-x5c2-65qq) but VULN ticket does not

* **VULN-5468**: Status is 'Done', expected 'In Progress'

This needs to be VULN-173657

Commit a7010513299d

Summary: netfilter: nft_set_hash: skip duplicated elements pending gc run

❌ Errors:

* **VULN-158865**: Status is 'Done', expected 'In Progress'

Commit d93f24a14688

Summary: netfilter: nft_set_pipapo: remove static in nft_pipapo_get()

❌ Errors:

* **VULN-430**: Status is 'Done', expected 'In Progress'

Commit 7a0da446b3c5

Summary: netfilter: nf_tables: skip dead set elements in netlink dump

❌ Errors:

* **VULN-430**: Status is 'Done', expected 'In Progress'

Commit 23bdfca33a76

Summary: netfilter: nf_tables: mark newset as dead on transaction abort

❌ Errors:

* **VULN-430**: Status is 'Done', expected 'In Progress'

Commit 764a427335f6

Summary: netfilter: nf_tables: fix pointer math issue in nft_byteorder_eval()

This is fine the JIRA checker doesn't handle cve-bf well it seems

jira VULN-173657
cve CVE-2024-54031
commit-author Pablo Neira Ayuso <pablo@netfilter.org>
commit 542ed81

Access to genmask field in struct nft_set_ext results in unaligned
atomic read:

[   72.130109] Unable to handle kernel paging request at virtual address ffff0000c2bb708c
[   72.131036] Mem abort info:
[   72.131213]   ESR = 0x0000000096000021
[   72.131446]   EC = 0x25: DABT (current EL), IL = 32 bits
[   72.132209]   SET = 0, FnV = 0
[   72.133216]   EA = 0, S1PTW = 0
[   72.134080]   FSC = 0x21: alignment fault
[   72.135593] Data abort info:
[   72.137194]   ISV = 0, ISS = 0x00000021, ISS2 = 0x00000000
[   72.142351]   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
[   72.145989]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[   72.150115] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000237d27000
[   72.154893] [ffff0000c2bb708c] pgd=0000000000000000, p4d=180000023ffff403, pud=180000023f84b403, pmd=180000023f835403,
+pte=0068000102bb7707
[   72.163021] Internal error: Oops: 0000000096000021 [ctrliq#1] SMP
[...]
[   72.170041] CPU: 7 UID: 0 PID: 54 Comm: kworker/7:0 Tainted: G            E      6.13.0-rc3+ ctrliq#2
[   72.170509] Tainted: [E]=UNSIGNED_MODULE
[   72.170720] Hardware name: QEMU QEMU Virtual Machine, BIOS edk2-stable202302-for-qemu 03/01/2023
[   72.171192] Workqueue: events_power_efficient nft_rhash_gc [nf_tables]
[   72.171552] pstate: 21400005 (nzCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--)
[   72.171915] pc : nft_rhash_gc+0x200/0x2d8 [nf_tables]
[   72.172166] lr : nft_rhash_gc+0x128/0x2d8 [nf_tables]
[   72.172546] sp : ffff800081f2bce0
[   72.172724] x29: ffff800081f2bd40 x28: ffff0000c2bb708c x27: 0000000000000038
[   72.173078] x26: ffff0000c6780ef0 x25: ffff0000c643df00 x24: ffff0000c6778f78
[   72.173431] x23: 000000000000001a x22: ffff0000c4b1f000 x21: ffff0000c6780f78
[   72.173782] x20: ffff0000c2bb70dc x19: ffff0000c2bb7080 x18: 0000000000000000
[   72.174135] x17: ffff0000c0a4e1c0 x16: 0000000000003000 x15: 0000ac26d173b978
[   72.174485] x14: ffffffffffffffff x13: 0000000000000030 x12: ffff0000c6780ef0
[   72.174841] x11: 0000000000000000 x10: ffff800081f2bcf8 x9 : ffff0000c3000000
[   72.175193] x8 : 00000000000004be x7 : 0000000000000000 x6 : 0000000000000000
[   72.175544] x5 : 0000000000000040 x4 : ffff0000c3000010 x3 : 0000000000000000
[   72.175871] x2 : 0000000000003a98 x1 : ffff0000c2bb708c x0 : 0000000000000004
[   72.176207] Call trace:
[   72.176316]  nft_rhash_gc+0x200/0x2d8 [nf_tables] (P)
[   72.176653]  process_one_work+0x178/0x3d0
[   72.176831]  worker_thread+0x200/0x3f0
[   72.176995]  kthread+0xe8/0xf8
[   72.177130]  ret_from_fork+0x10/0x20
[   72.177289] Code: 54fff984 d503201f d2800080 91003261 (f820303f)
[   72.177557] ---[ end trace 0000000000000000 ]---

Align struct nft_set_ext to word size to address this and
documentation it.

pahole reports that this increases the size of elements for rhash and
pipapo in 8 bytes on x86_64.

Fixes: 7ffc748 ("netfilter: nft_set_hash: skip duplicated elements pending gc run")
	Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
(cherry picked from commit 542ed81)
	Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>
@pvts-mat pvts-mat force-pushed the ciqlts9_2-CVE-batch-14 branch from 70905db to 169596a Compare January 8, 2026 20:34
@pvts-mat pvts-mat requested a review from PlaidCat January 8, 2026 20:37
@github-actions
Copy link

github-actions bot commented Jan 8, 2026

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

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

🔍 Upstream Linux Kernel Commit Check

  • ❌ PR commit 764a427335f (netfilter: nf_tables: fix pointer math issue in nft_byteorder_eval()) references CVE-2024-0607 but
    upstream commit c301f0981fdd has no CVE assigned

  • ❌ PR commit 715300361a3 (netfilter: nf_tables: skip set commit for deleted/destroyed sets) references CVE-2024-0193 but
    upstream commit 7315dc1e122c has no CVE assigned

This is an automated message from the kernel commit checker workflow.

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

🔍 Interdiff Analysis

  • ⚠️ PR commit 764a427335f (netfilter: nf_tables: fix pointer math issue in nft_byteorder_eval()) → upstream c301f0981fdd
    Differences found:
diff -u b/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h
--- b/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
@@ -144,4 +144,4 @@
-	return *(__force __be32 *)sreg;
+	return *(u16 *)sreg;
 }
 
 static inline void nft_reg_store64(u64 *dreg, u64 val)
diff -u b/net/netfilter/nft_byteorder.c b/net/netfilter/nft_byteorder.c
--- b/net/netfilter/nft_byteorder.c
+++ b/net/netfilter/nft_byteorder.c
@@ -42,13 +43,13 @@ INTERDIFF: rejected hunk from patch1, cannot diff context
 		u64 src64;
 
 		switch (priv->op) {
 		case NFT_BYTEORDER_NTOH:
 			for (i = 0; i < priv->len / 8; i++) {
 				src64 = nft_reg_load64(&src[i]);
-				nft_reg_store64(&dst[i], be64_to_cpu(src64));
+				nft_reg_store64(&dst64[i], be64_to_cpu(src64));
 			}
 			break;
 		case NFT_BYTEORDER_HTON:
 			for (i = 0; i < priv->len / 8; i++) {
 				src64 = (__force __u64)
 					cpu_to_be64(nft_reg_load64(&src[i]));
@@ -45,7 +46,7 @@ INTERDIFF: rejected hunk from patch2, cannot diff context
 		case NFT_BYTEORDER_NTOH:
 			for (i = 0; i < priv->len / 8; i++) {
 				src64 = nft_reg_load64(&src[i]);
-				nft_reg_store64(&dst[i],
+				nft_reg_store64(&dst64[i],
 						be64_to_cpu((__force __be64)src64));
 			}
 			break;
@@ -45,14 +45,14 @@
 		case NFT_BYTEORDER_NTOH:
 			for (i = 0; i < priv->len / 8; i++) {
 				src64 = nft_reg_load64(&src[i]);
-				nft_reg_store64(&dst[i],
-						be64_to_cpu((__force __be64)src64));
+				nft_reg_store64(&dst[i], be64_to_cpu(src64));
 			}
 			break;
+		case NFT_BYTEORDER_HTON:
 			for (i = 0; i < priv->len / 8; i++) {
 				src64 = (__force __u64)
 					cpu_to_be64(nft_reg_load64(&src[i]));
-				nft_reg_store64(&dst[i], src64);
+				nft_reg_store64(&dst64[i], src64);
 			}
 			break;
 		}
@@ -52,7 +53,7 @@ INTERDIFF: rejected hunk from patch1, cannot diff context
 			for (i = 0; i < priv->len / 8; i++) {
 				src64 = (__force __u64)
 					cpu_to_be64(nft_reg_load64(&src[i]));
-				nft_reg_store64(&dst[i], src64);
+				nft_reg_store64(&dst64[i], src64);
 			}
 			break;
 		}
  • ⚠️ PR commit 7a0da446b3c (netfilter: nf_tables: skip dead set elements in netlink dump) → upstream 6b1ca88e4bb6
    Differences found:
diff -u b/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
--- b/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -5376,4 +5376,4 @@
-	const struct nft_set_ext *ext = nft_set_elem_ext(set, elem_priv);
+	const struct nft_set_ext *ext = nft_set_elem_ext(set, elem->priv);
 	struct nft_set_dump_args *args;
 
 	if (nft_set_elem_expired(ext) || nft_set_elem_is_dead(ext))
  • ⚠️ PR commit e1f68506eeb (netfilter: nf_tables: make destruction work queue pernet) → upstream fb8286562ecf
    Differences found:
diff -u b/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h
--- b/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
@@ -1665,9 +1665,9 @@
 struct nftables_pernet {
 	struct list_head	tables;
 	struct list_head	commit_list;
-	struct list_head	commit_set_list;
 	struct list_head	binding_list;
 	struct list_head	module_list;
+	struct list_head	notify_list;
 	unsigned int		base_seq;
 	unsigned int		gc_seq;
 	u8			validate_state;
@@ -1668,6 +1668,7 @@ INTERDIFF: rejected hunk from patch1, cannot diff context
 struct nftables_pernet {
 	struct list_head	tables;
 	struct list_head	commit_list;
+	struct list_head	destroy_list;
 	struct list_head	binding_list;
 	struct list_head	module_list;
 	struct list_head	notify_list;
@@ -1905,6 +1905,7 @@ INTERDIFF: rejected hunk from patch2, cannot diff context
 struct nftables_pernet {
 	struct list_head	tables;
 	struct list_head	commit_list;
+	struct list_head	destroy_list;
 	struct list_head	commit_set_list;
 	struct list_head	binding_list;
 	struct list_head	module_list;
diff -u b/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
--- b/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -118,4 +118,4 @@
-	table->validate_state = new_validate_state;
+	nft_net->validate_state = new_validate_state;
 }
 static void nf_tables_trans_destroy_work(struct work_struct *w);
 
@@ -10716,6 +10717,7 @@ INTERDIFF: rejected hunk from patch1, cannot diff context
 
 	INIT_LIST_HEAD(&nft_net->tables);
 	INIT_LIST_HEAD(&nft_net->commit_list);
+	INIT_LIST_HEAD(&nft_net->destroy_list);
 	INIT_LIST_HEAD(&nft_net->binding_list);
 	INIT_LIST_HEAD(&nft_net->module_list);
 	INIT_LIST_HEAD(&nft_net->notify_list);
@@ -10849,13 +10849,0 @@
-
-	INIT_LIST_HEAD(&nft_net->tables);
-	INIT_LIST_HEAD(&nft_net->commit_list);
-	INIT_LIST_HEAD(&nft_net->commit_set_list);
-	INIT_LIST_HEAD(&nft_net->binding_list);
-	INIT_LIST_HEAD(&nft_net->module_list);
-	nft_net->base_seq = 1;
-	nft_net->gc_seq = 0;
-	nft_net->validate_state = NFT_VALIDATE_SKIP;
-	INIT_WORK(&nft_net->destroy_work, nf_tables_trans_destroy_work);
-
-	return 0;
-}
@@ -11896,6 +11897,7 @@ INTERDIFF: rejected hunk from patch2, cannot diff context
 
 	INIT_LIST_HEAD(&nft_net->tables);
 	INIT_LIST_HEAD(&nft_net->commit_list);
+	INIT_LIST_HEAD(&nft_net->destroy_list);
 	INIT_LIST_HEAD(&nft_net->commit_set_list);
 	INIT_LIST_HEAD(&nft_net->binding_list);
 	INIT_LIST_HEAD(&nft_net->module_list);

This is an automated interdiff check for backported commits.

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

JIRA PR Check Results

9 commit(s) with issues found:

Commit 169596a2c2e1

Summary: netfilter: nft_set_hash: unaligned atomic read on struct nft_set_ext

⚠️ Warnings:

  • VULN-173657: No time logged - please log time manually

Commit a7010513299d

Summary: netfilter: nft_set_hash: skip duplicated elements pending gc run

❌ Errors:

  • VULN-158865: Status is 'Done', expected 'In Progress'

Commit e1f68506eeb0

Summary: netfilter: nf_tables: make destruction work queue pernet

⚠️ Warnings:

  • VULN-44483: No time logged - please log time manually

Commit c33557d90b41

Summary: netfilter: nf_tables: flush pending destroy work before exit_net release

⚠️ Warnings:

  • VULN-5127: No time logged - please log time manually

Commit b483d28f3cfc

Summary: netfilter: nf_tables: unconditionally flush pending work before notifier

⚠️ Warnings:

  • VULN-44483: No time logged - please log time manually

Commit d93f24a14688

Summary: netfilter: nft_set_pipapo: remove static in nft_pipapo_get()

❌ Errors:

  • VULN-430: Status is 'Done', expected 'In Progress'

Commit 7a0da446b3c5

Summary: netfilter: nf_tables: skip dead set elements in netlink dump

❌ Errors:

  • VULN-430: Status is 'Done', expected 'In Progress'

Commit 6a95098c8478

Summary: netfilter: nft_set_pipapo: prefer gfp_kernel allocation

❌ Errors:

  • VULN-158865: Status is 'Done', expected 'In Progress'

Commit 23bdfca33a76

Summary: netfilter: nf_tables: mark newset as dead on transaction abort

❌ Errors:

  • VULN-430: Status is 'Done', expected 'In Progress'

Summary: Checked 11 commit(s) total.

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

Validation checks completed with issues View full results: https://github.com/ctrliq/kernel-src-tree/actions/runs/20832390311

@PlaidCat
Copy link
Collaborator

PlaidCat commented Jan 8, 2026

Validation checks completed with issues View full results: https://github.com/ctrliq/kernel-src-tree/actions/runs/20832390311

This can be ignored.

Copy link
Collaborator

@PlaidCat PlaidCat left a comment

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 313dece into ctrliq:ciqlts9_2 Jan 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants