Skip to content

Commit 394e771

Browse files
author
Florian Westphal
committed
netfilter: cttimeout: fix slab-out-of-bounds read typo in cttimeout_net_exit
syzbot reports: BUG: KASAN: slab-out-of-bounds in __list_del_entry_valid+0xcc/0xf0 lib/list_debug.c:42 [..] list_del include/linux/list.h:148 [inline] cttimeout_net_exit+0x211/0x540 net/netfilter/nfnetlink_cttimeout.c:617 Problem is the wrong name of the list member, so container_of() result is wrong. Reported-by: <[email protected]> Fixes: 78222ba ("netfilter: cttimeout: decouple unlink and free on netns destruction") Signed-off-by: Florian Westphal <[email protected]>
1 parent b1fd94e commit 394e771

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/netfilter/nfnetlink_cttimeout.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ static void __net_exit cttimeout_net_exit(struct net *net)
614614

615615
nf_ct_untimeout(net, NULL);
616616

617-
list_for_each_entry_safe(cur, tmp, &pernet->nfct_timeout_freelist, head) {
617+
list_for_each_entry_safe(cur, tmp, &pernet->nfct_timeout_freelist, free_head) {
618618
list_del(&cur->free_head);
619619

620620
if (refcount_dec_and_test(&cur->refcnt))

0 commit comments

Comments
 (0)