syzbot


KMSAN: uninit-value in nf_flow_offload_inet_hook

Status: fixed on 2024/10/03 15:25
Subsystems: netfilter
[Documentation on labels]
Reported-by: syzbot+8407d9bb88cd4c6bf61a@syzkaller.appspotmail.com
Fix commit: 6ea14ccb60c8 netfilter: flowtable: validate vlan header
First crash: 134d, last: 115d
Discussions (5)
Title Replies (including bot) Last reply
[PATCH net 3/3] netfilter: flowtable: validate vlan header 3 (3) 2024/08/22 10:21
[PATCH net 3/3] netfilter: flowtable: validate vlan header 1 (1) 2024/08/22 10:18
[PATCH nf,v2] netfilter: flowtable: validate vlan header 1 (1) 2024/08/21 23:46
[PATCH nf] netfilter: flowtable: validate vlan header 1 (1) 2024/08/13 10:39
[syzbot] [netfilter?] KMSAN: uninit-value in nf_flow_offload_inet_hook 0 (1) 2024/08/09 14:52

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in nf_flow_offload_inet_hook+0x45a/0x5f0 net/netfilter/nf_flow_table_inet.c:32
 nf_flow_offload_inet_hook+0x45a/0x5f0 net/netfilter/nf_flow_table_inet.c:32
 nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline]
 nf_hook_slow+0xf4/0x400 net/netfilter/core.c:626
 nf_hook_ingress include/linux/netfilter_netdev.h:34 [inline]
 nf_ingress net/core/dev.c:5441 [inline]
 __netif_receive_skb_core+0x47b1/0x6c90 net/core/dev.c:5529
 __netif_receive_skb_one_core net/core/dev.c:5659 [inline]
 __netif_receive_skb+0xca/0xa00 net/core/dev.c:5775
 process_backlog+0x4ad/0xa50 net/core/dev.c:6108
 __napi_poll+0xe7/0x980 net/core/dev.c:6772
 napi_poll net/core/dev.c:6841 [inline]
 net_rx_action+0xa5a/0x19b0 net/core/dev.c:6963
 handle_softirqs+0x1ce/0x800 kernel/softirq.c:554
 __do_softirq+0x14/0x1a kernel/softirq.c:588
 do_softirq+0x9a/0x100 kernel/softirq.c:455
 __local_bh_enable_ip+0x9f/0xb0 kernel/softirq.c:382
 local_bh_enable include/linux/bottom_half.h:33 [inline]
 rcu_read_unlock_bh include/linux/rcupdate.h:908 [inline]
 __dev_queue_xmit+0x2692/0x5610 net/core/dev.c:4450
 dev_queue_xmit include/linux/netdevice.h:3105 [inline]
 packet_xmit+0x9c/0x6c0 net/packet/af_packet.c:276
 packet_snd net/packet/af_packet.c:3145 [inline]
 packet_sendmsg+0x90e3/0xa3a0 net/packet/af_packet.c:3177
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg+0x30f/0x380 net/socket.c:745
 __sys_sendto+0x685/0x830 net/socket.c:2204
 __do_sys_sendto net/socket.c:2216 [inline]
 __se_sys_sendto net/socket.c:2212 [inline]
 __ia32_sys_sendto+0x123/0x1c0 net/socket.c:2212
 ia32_sys_call+0xb2/0x40d0 arch/x86/include/generated/asm/syscalls_32.h:370
 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline]
 __do_fast_syscall_32+0xb0/0x110 arch/x86/entry/common.c:386
 do_fast_syscall_32+0x38/0x80 arch/x86/entry/common.c:411
 do_SYSENTER_32+0x1f/0x30 arch/x86/entry/common.c:449
 entry_SYSENTER_compat_after_hwframe+0x84/0x8e

Uninit was created at:
 slab_post_alloc_hook mm/slub.c:3994 [inline]
 slab_alloc_node mm/slub.c:4037 [inline]
 kmem_cache_alloc_node_noprof+0x6bf/0xb80 mm/slub.c:4080
 kmalloc_reserve+0x13d/0x4a0 net/core/skbuff.c:583
 __alloc_skb+0x363/0x7b0 net/core/skbuff.c:674
 alloc_skb include/linux/skbuff.h:1320 [inline]
 alloc_skb_with_frags+0xc8/0xbf0 net/core/skbuff.c:6526
 sock_alloc_send_pskb+0xa81/0xbf0 net/core/sock.c:2815
 packet_alloc_skb net/packet/af_packet.c:2994 [inline]
 packet_snd net/packet/af_packet.c:3088 [inline]
 packet_sendmsg+0x749c/0xa3a0 net/packet/af_packet.c:3177
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg+0x30f/0x380 net/socket.c:745
 __sys_sendto+0x685/0x830 net/socket.c:2204
 __do_sys_sendto net/socket.c:2216 [inline]
 __se_sys_sendto net/socket.c:2212 [inline]
 __ia32_sys_sendto+0x123/0x1c0 net/socket.c:2212
 ia32_sys_call+0xb2/0x40d0 arch/x86/include/generated/asm/syscalls_32.h:370
 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline]
 __do_fast_syscall_32+0xb0/0x110 arch/x86/entry/common.c:386
 do_fast_syscall_32+0x38/0x80 arch/x86/entry/common.c:411
 do_SYSENTER_32+0x1f/0x30 arch/x86/entry/common.c:449
 entry_SYSENTER_compat_after_hwframe+0x84/0x8e

CPU: 0 UID: 0 PID: 8618 Comm: syz.4.1354 Not tainted 6.11.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
=====================================================

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/19 04:27 upstream 47ac09b91bef dbc93b08 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in nf_flow_offload_inet_hook
2024/08/17 11:46 upstream e5fa841af679 dbc93b08 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in nf_flow_offload_inet_hook
2024/08/01 11:04 upstream 21b136cc63d2 1e9c4cf3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in nf_flow_offload_inet_hook
2024/07/31 06:42 upstream 22f546873149 6fde257d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in nf_flow_offload_inet_hook
* Struck through repros no longer work on HEAD.