syzbot


KMSAN: uninit-value in can_send

Status: fixed on 2023/02/24 13:50
Subsystems: can
[Documentation on labels]
Reported-by: syzbot+d168ec0caca4697e03b1@syzkaller.appspotmail.com
Fix commit: 3eb3d283e857 can: j1939: j1939_send_one(): fix missing CAN header initialization
First crash: 541d, last: 514d
Discussions (4)
Title Replies (including bot) Last reply
[PATCH net 0/6] pull-request: can 2022-11-07 8 (8) 2022/11/09 00:00
[PATCH net 0/5] pull-request: can 2022-11-04 11 (11) 2022/11/07 13:01
[PATCH] can: j1939: fix missing CAN header initialization 2 (2) 2022/11/04 12:04
[syzbot] KMSAN: uninit-value in can_send 2 (3) 2022/11/04 05:22
Similar bugs (14)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: kernel-infoleak in _copy_to_iter (7) net C 138977 419d 771d 22/26 fixed on 2023/02/24 13:50
upstream KMSAN: uninit-value in skb_release_data (3) net C 10 638d 1317d 0/26 auto-obsoleted due to no activity on 2022/11/17 07:20
upstream KMSAN: uninit-value in hsr_register_frame_in net C 197 271d 1892d 0/26 auto-obsoleted due to no activity on 2024/02/18 18:09
upstream KMSAN: kernel-infoleak in copyout (2) net C 6723 315d 1483d 22/26 fixed on 2023/06/08 14:41
upstream KMSAN: uninit-value in ipv6_find_tlv net C 271 356d 1709d 22/26 fixed on 2023/06/08 14:41
upstream KMSAN: uninit-value in bpf_prog_run_generic_xdp net C 294 8h42m 517d 0/26 upstream: reported C repro on 2022/11/18 11:39
upstream KMSAN: uninit-value in ax25cmp (2) hams C 51 575d 836d 0/26 closed as invalid on 2022/11/18 11:50
upstream KMSAN: uninit-value in virtqueue_add (3) virt 13 531d 823d 0/26 auto-obsoleted due to no activity on 2023/02/12 03:53
upstream KMSAN: kernel-infoleak in __skb_datagram_iter net 68 204d 310d 23/26 fixed on 2023/09/28 17:51
upstream KMSAN: uninit-value in IP6_ECN_decapsulate net C 981 120d 2036d 25/26 fixed on 2023/12/21 03:45
upstream KMSAN: uninit-value in inet_frag_find (2) net 2 827d 835d 0/26 auto-closed as invalid on 2022/04/11 17:13
upstream KMSAN: kernel-infoleak in _copy_to_iter (6) net C 748 771d 860d 20/26 fixed on 2022/03/08 16:11
upstream KMSAN: uninit-value in eth_type_trans (2) net C 4436 6h08m 1547d 0/26 upstream: reported C repro on 2020/01/22 16:47
upstream KMSAN: uninit-value in hsr_fill_frame_info (2) net C 65 271d 553d 0/26 auto-obsoleted due to no activity on 2023/10/30 13:38

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in can_is_canxl_skb include/linux/can/skb.h:128 [inline]
BUG: KMSAN: uninit-value in can_send+0x269/0x1100 net/can/af_can.c:205
 can_is_canxl_skb include/linux/can/skb.h:128 [inline]
 can_send+0x269/0x1100 net/can/af_can.c:205
 j1939_send_one+0x40f/0x4d0 net/can/j1939/main.c:352
 j1939_xtp_do_tx_ctl+0x69f/0x9e0 net/can/j1939/transport.c:664
 j1939_tp_tx_ctl net/can/j1939/transport.c:672 [inline]
 j1939_session_tx_rts net/can/j1939/transport.c:740 [inline]
 j1939_xtp_txnext_transmiter net/can/j1939/transport.c:880 [inline]
 j1939_tp_txtimer+0x35bb/0x4520 net/can/j1939/transport.c:1158
 __run_hrtimer+0x298/0x910 kernel/time/hrtimer.c:1685
 __hrtimer_run_queues kernel/time/hrtimer.c:1749 [inline]
 hrtimer_run_softirq+0x4b0/0x870 kernel/time/hrtimer.c:1766
 __do_softirq+0x1c5/0x7b9 kernel/softirq.c:571
 invoke_softirq+0x8f/0x100 kernel/softirq.c:445
 __irq_exit_rcu+0x5a/0x110 kernel/softirq.c:650
 irq_exit_rcu+0xe/0x10 kernel/softirq.c:662
 sysvec_apic_timer_interrupt+0x9a/0xc0 arch/x86/kernel/apic/apic.c:1107
 asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:649
 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
 _raw_spin_unlock_irqrestore+0x2f/0x50 kernel/locking/spinlock.c:194
 unlock_hrtimer_base kernel/time/hrtimer.c:1017 [inline]
 hrtimer_start_range_ns+0xaba/0xb50 kernel/time/hrtimer.c:1301
 hrtimer_start include/linux/hrtimer.h:418 [inline]
 j1939_tp_schedule_txtimer+0xbe/0x100 net/can/j1939/transport.c:697
 j1939_sk_send_loop net/can/j1939/socket.c:1143 [inline]
 j1939_sk_sendmsg+0x1c2c/0x25d0 net/can/j1939/socket.c:1256
 sock_sendmsg_nosec net/socket.c:714 [inline]
 sock_sendmsg net/socket.c:734 [inline]
 ____sys_sendmsg+0xa8e/0xe70 net/socket.c:2482
 ___sys_sendmsg+0x2a1/0x3f0 net/socket.c:2536
 __sys_sendmsg net/socket.c:2565 [inline]
 __do_sys_sendmsg net/socket.c:2574 [inline]
 __se_sys_sendmsg net/socket.c:2572 [inline]
 __x64_sys_sendmsg+0x367/0x540 net/socket.c:2572
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

Uninit was created at:
 slab_post_alloc_hook mm/slab.h:742 [inline]
 slab_alloc_node mm/slub.c:3398 [inline]
 __kmem_cache_alloc_node+0x6ee/0xc90 mm/slub.c:3437
 __do_kmalloc_node mm/slab_common.c:954 [inline]
 __kmalloc_node_track_caller+0x117/0x3d0 mm/slab_common.c:975
 kmalloc_reserve net/core/skbuff.c:437 [inline]
 __alloc_skb+0x34a/0xca0 net/core/skbuff.c:509
 alloc_skb include/linux/skbuff.h:1267 [inline]
 j1939_tp_tx_dat_new net/can/j1939/transport.c:593 [inline]
 j1939_xtp_do_tx_ctl+0xa3/0x9e0 net/can/j1939/transport.c:654
 j1939_tp_tx_ctl net/can/j1939/transport.c:672 [inline]
 j1939_session_tx_rts net/can/j1939/transport.c:740 [inline]
 j1939_xtp_txnext_transmiter net/can/j1939/transport.c:880 [inline]
 j1939_tp_txtimer+0x35bb/0x4520 net/can/j1939/transport.c:1158
 __run_hrtimer+0x298/0x910 kernel/time/hrtimer.c:1685
 __hrtimer_run_queues kernel/time/hrtimer.c:1749 [inline]
 hrtimer_run_softirq+0x4b0/0x870 kernel/time/hrtimer.c:1766
 __do_softirq+0x1c5/0x7b9 kernel/softirq.c:571

CPU: 0 PID: 3506 Comm: syz-executor289 Not tainted 6.1.0-rc2-syzkaller-61955-g4a3e741a3d6a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022
=====================================================

Crashes (630):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/10/25 10:47 https://github.com/google/kmsan.git master 4a3e741a3d6a 45645420 .config strace log report syz C ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/11/20 23:15 https://github.com/google/kmsan.git master cb231e2f67ec 5bb70014 .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/11/19 12:42 https://github.com/google/kmsan.git master cb231e2f67ec 5bb70014 .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/11/18 23:08 https://github.com/google/kmsan.git master cb231e2f67ec 5bb70014 .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/11/18 20:24 https://github.com/google/kmsan.git master cb231e2f67ec 5bb70014 .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/11/18 15:03 https://github.com/google/kmsan.git master cb231e2f67ec 5bb70014 .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/11/17 20:45 https://github.com/google/kmsan.git master cb231e2f67ec 4ba8ab94 .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/11/17 19:12 https://github.com/google/kmsan.git master cb231e2f67ec 4ba8ab94 .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/11/17 17:56 https://github.com/google/kmsan.git master cb231e2f67ec 4ba8ab94 .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/11/17 07:42 https://github.com/google/kmsan.git master cb231e2f67ec 3a127a31 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/11/17 02:37 https://github.com/google/kmsan.git master cb231e2f67ec 3a127a31 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/11/17 01:27 https://github.com/google/kmsan.git master cb231e2f67ec 3a127a31 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/11/16 16:37 https://github.com/google/kmsan.git master cb231e2f67ec 3a127a31 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/11/16 16:21 https://github.com/google/kmsan.git master cb231e2f67ec 3a127a31 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/11/16 01:55 https://github.com/google/kmsan.git master cb231e2f67ec 3a127a31 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/11/15 18:10 https://github.com/google/kmsan.git master cb231e2f67ec 97de9cfc .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/11/15 14:55 https://github.com/google/kmsan.git master cb231e2f67ec 97de9cfc .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/11/15 01:18 https://github.com/google/kmsan.git master cb231e2f67ec 943f4cb8 .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/11/14 23:37 https://github.com/google/kmsan.git master cb231e2f67ec 943f4cb8 .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/11/14 18:21 https://github.com/google/kmsan.git master cb231e2f67ec 943f4cb8 .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/11/14 10:46 https://github.com/google/kmsan.git master cb231e2f67ec 943f4cb8 .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/11/14 06:32 https://github.com/google/kmsan.git master cb231e2f67ec 3ead01ad .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/11/14 06:11 https://github.com/google/kmsan.git master cb231e2f67ec 3ead01ad .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/11/14 02:33 https://github.com/google/kmsan.git master cb231e2f67ec 3ead01ad .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/11/13 18:35 https://github.com/google/kmsan.git master cb231e2f67ec 3ead01ad .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/11/13 15:37 https://github.com/google/kmsan.git master cb231e2f67ec 3ead01ad .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/11/13 08:30 https://github.com/google/kmsan.git master cb231e2f67ec 3ead01ad .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/10/25 05:32 https://github.com/google/kmsan.git master 4a3e741a3d6a ff2fe65d .config console log report info ci-upstream-kmsan-gce KMSAN: uninit-value in can_send
2022/11/21 12:53 https://github.com/google/kmsan.git master cb231e2f67ec 5bb70014 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in can_send
2022/11/20 22:14 https://github.com/google/kmsan.git master cb231e2f67ec 5bb70014 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in can_send
2022/11/20 13:37 https://github.com/google/kmsan.git master cb231e2f67ec 5bb70014 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in can_send
2022/11/20 05:14 https://github.com/google/kmsan.git master cb231e2f67ec 5bb70014 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in can_send
2022/11/18 17:24 https://github.com/google/kmsan.git master cb231e2f67ec 5bb70014 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in can_send
2022/11/18 04:57 https://github.com/google/kmsan.git master cb231e2f67ec 4ba8ab94 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in can_send
2022/11/17 12:49 https://github.com/google/kmsan.git master cb231e2f67ec 3a127a31 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in can_send
2022/11/17 07:17 https://github.com/google/kmsan.git master cb231e2f67ec 3a127a31 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in can_send
2022/11/16 20:47 https://github.com/google/kmsan.git master cb231e2f67ec 3a127a31 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in can_send
2022/11/16 13:34 https://github.com/google/kmsan.git master cb231e2f67ec 3a127a31 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in can_send
2022/11/16 09:56 https://github.com/google/kmsan.git master cb231e2f67ec 3a127a31 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in can_send
2022/11/16 03:56 https://github.com/google/kmsan.git master cb231e2f67ec 3a127a31 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in can_send
2022/11/15 11:47 https://github.com/google/kmsan.git master cb231e2f67ec 97de9cfc .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386 KMSAN: uninit-value in can_send
2022/11/15 08:42 https://github.com/google/kmsan.git master cb231e2f67ec 97de9cfc .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386 KMSAN: uninit-value in can_send
2022/11/15 02:20 https://github.com/google/kmsan.git master cb231e2f67ec 943f4cb8 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in can_send
2022/11/14 21:14 https://github.com/google/kmsan.git master cb231e2f67ec 943f4cb8 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in can_send
2022/11/14 18:45 https://github.com/google/kmsan.git master cb231e2f67ec 943f4cb8 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in can_send
2022/11/14 14:13 https://github.com/google/kmsan.git master cb231e2f67ec 943f4cb8 .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in can_send
2022/11/13 12:08 https://github.com/google/kmsan.git master cb231e2f67ec 3ead01ad .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in can_send
2022/11/13 06:44 https://github.com/google/kmsan.git master cb231e2f67ec 3ead01ad .config console log report info ci-upstream-kmsan-gce-386 KMSAN: uninit-value in can_send
* Struck through repros no longer work on HEAD.