syzbot


KMSAN: uninit-value in em_canid_match

Status: upstream: reported C repro on 2025/11/25 19:50
Subsystems: net can
[Documentation on labels]
Reported-by: syzbot+5d8269a1e099279152bc@syzkaller.appspotmail.com
Fix commit: net/sched: em_canid: fix uninit-value in em_canid_match
Patched on: [ci-upstream-net-this-kasan-gce], missing on: [ci-qemu-gce-upstream-auto ci-qemu-native-arm64-kvm ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-rust-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb]
First crash: 3d13h, last: 13h05m
Discussions (5)
Title Replies (including bot) Last reply
[PATCH net 8/8] net/sched: em_canid: fix uninit-value in em_canid_match 1 (1) 2025/11/26 15:41
[PATCH v3] net/sched: em_canid: fix uninit-value in em_canid_match 3 (3) 2025/11/26 15:28
[PATCH v2] net/sched: em_canid: fix uninit-value in em_canid_match 3 (3) 2025/11/26 08:57
[PATCH net] net/sched: em_canid: add length check before reading CAN ID 3 (3) 2025/11/26 04:59
[syzbot] [net?] [can?] KMSAN: uninit-value in em_canid_match 1 (3) 2025/11/25 21:57
Last patch testing requests (1)
Created Duration User Patch Repo Result
2025/11/25 20:41 28m ssranevjti@gmail.com patch upstream OK log

Sample crash report:
syzkaller0: entered promiscuous mode
syzkaller0: entered allmulticast mode
=====================================================
BUG: KMSAN: uninit-value in em_canid_match+0x2f0/0x360 net/sched/em_canid.c:104
 em_canid_match+0x2f0/0x360 net/sched/em_canid.c:104
 tcf_em_match net/sched/ematch.c:494 [inline]
 __tcf_em_tree_match+0x215/0xc70 net/sched/ematch.c:520
 tcf_em_tree_match include/net/pkt_cls.h:512 [inline]
 basic_classify+0x154/0x480 net/sched/cls_basic.c:50
 tc_classify include/net/tc_wrapper.h:197 [inline]
 __tcf_classify net/sched/cls_api.c:1764 [inline]
 tcf_classify+0x855/0x1cb0 net/sched/cls_api.c:1860
 multiq_classify net/sched/sch_multiq.c:39 [inline]
 multiq_enqueue+0x82/0x590 net/sched/sch_multiq.c:66
 dev_qdisc_enqueue net/core/dev.c:4118 [inline]
 __dev_xmit_skb net/core/dev.c:4214 [inline]
 __dev_queue_xmit+0x1d91/0x5e60 net/core/dev.c:4729
 dev_queue_xmit include/linux/netdevice.h:3365 [inline]
 packet_xmit+0x8f/0x710 net/packet/af_packet.c:275
 packet_snd net/packet/af_packet.c:3076 [inline]
 packet_sendmsg+0x9173/0xa2a0 net/packet/af_packet.c:3108
 sock_sendmsg_nosec net/socket.c:727 [inline]
 __sock_sendmsg+0x333/0x3d0 net/socket.c:742
 ____sys_sendmsg+0x7e0/0xd80 net/socket.c:2630
 ___sys_sendmsg+0x271/0x3b0 net/socket.c:2684
 __sys_sendmsg net/socket.c:2716 [inline]
 __do_sys_sendmsg net/socket.c:2721 [inline]
 __se_sys_sendmsg net/socket.c:2719 [inline]
 __x64_sys_sendmsg+0x211/0x3e0 net/socket.c:2719
 x64_sys_call+0x1dfd/0x3e30 arch/x86/include/generated/asm/syscalls_64.h:47
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd9/0xfa0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Uninit was created at:
 slab_post_alloc_hook mm/slub.c:4985 [inline]
 slab_alloc_node mm/slub.c:5288 [inline]
 kmem_cache_alloc_node_noprof+0x989/0x16b0 mm/slub.c:5340
 kmalloc_reserve+0x13c/0x4b0 net/core/skbuff.c:579
 __alloc_skb+0x347/0x7d0 net/core/skbuff.c:670
 alloc_skb include/linux/skbuff.h:1383 [inline]
 alloc_skb_with_frags+0xc5/0xa60 net/core/skbuff.c:6671
 sock_alloc_send_pskb+0xacc/0xc60 net/core/sock.c:2965
 packet_alloc_skb net/packet/af_packet.c:2926 [inline]
 packet_snd net/packet/af_packet.c:3019 [inline]
 packet_sendmsg+0x743d/0xa2a0 net/packet/af_packet.c:3108
 sock_sendmsg_nosec net/socket.c:727 [inline]
 __sock_sendmsg+0x333/0x3d0 net/socket.c:742
 ____sys_sendmsg+0x7e0/0xd80 net/socket.c:2630
 ___sys_sendmsg+0x271/0x3b0 net/socket.c:2684
 __sys_sendmsg net/socket.c:2716 [inline]
 __do_sys_sendmsg net/socket.c:2721 [inline]
 __se_sys_sendmsg net/socket.c:2719 [inline]
 __x64_sys_sendmsg+0x211/0x3e0 net/socket.c:2719
 x64_sys_call+0x1dfd/0x3e30 arch/x86/include/generated/asm/syscalls_64.h:47
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd9/0xfa0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

CPU: 0 UID: 0 PID: 6067 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(none) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
=====================================================

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/11/24 12:11 upstream ac3fd01e4c1e 4fb8ef37 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in em_canid_match
2025/11/24 09:50 upstream ac3fd01e4c1e 4fb8ef37 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in em_canid_match
2025/11/27 02:42 upstream 30f09200cc4a d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in em_canid_match
2025/11/24 02:11 upstream d13f3ac64efb 4fb8ef37 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in em_canid_match
2025/11/24 02:10 upstream d13f3ac64efb 4fb8ef37 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in em_canid_match
2025/11/24 03:28 upstream d13f3ac64efb 4fb8ef37 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in em_canid_match
2025/11/24 03:28 upstream d13f3ac64efb 4fb8ef37 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in em_canid_match
* Struck through repros no longer work on HEAD.