]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net/sched: act_ct: preserve tc_skb_cb across defragmentation
authorZihan Xi <xizh2024@lzu.edu.cn>
Sat, 13 Jun 2026 17:42:39 +0000 (01:42 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 19 Jun 2026 00:38:51 +0000 (17:38 -0700)
commit9092e15defbe6c7bc241c306093ca9d358a578e7
tree12d7d1487b0fa32d5a9683b199670c114b46bb08
parent7d8297e26b4e20b5d1c3c3fe51fe81a1c7fbc823
net/sched: act_ct: preserve tc_skb_cb across defragmentation

tcf_ct_handle_fragments() calls nf_ct_handle_fragments() without saving
and restoring skb->cb. The defrag helper clears IPCB/IP6CB, which aliases
the tc_skb_cb/qdisc_skb_cb control buffer. Fragmented traffic through
act_ct therefore loses qdisc metadata such as pkt_segs and can trigger
WARN_ON_ONCE() in qdisc_pkt_segs() when panic_on_warn is enabled.

Save and restore the full tc_skb_cb around nf_ct_handle_fragments(),
matching the pattern used by ovs_ct_handle_fragments().

Fixes: ec624fe740b4 ("net/sched: Extend qdisc control block with tc control block")
Cc: stable@vger.kernel.org
Reported-by: Yuan Tan <yuantan098@gmail.com>
Reported-by: Yifan Wu <yifanwucs@gmail.com>
Reported-by: Juefei Pu <tomapufckgml@gmail.com>
Reported-by: Xin Liu <bird@lzu.edu.cn>
Signed-off-by: Zihan Xi <xizh2024@lzu.edu.cn>
Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
Link: https://patch.msgid.link/510c51217fd7aaf29c6dc298bab8d643fe229b1c.1781358692.git.xizh2024@lzu.edu.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/sched/act_ct.c