syzbot


KMSAN: uninit-value in skb_put

Status: upstream: reported on 2024/07/24 23:32
Subsystems: net usb
[Documentation on labels]
Reported-by: syzbot+1b110e469044ea5131fc@syzkaller.appspotmail.com
First crash: 89d, last: 89d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [net?] [usb?] KMSAN: uninit-value in skb_put 0 (1) 2024/07/24 23:32
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 general protection fault in skb_put C error 70 1253d 2006d 0/1 upstream: reported C repro on 2019/04/22 01:02
linux-4.19 general protection fault in skb_put C error 32 1127d 2004d 0/1 upstream: reported C repro on 2019/04/23 05:25

Sample crash report:
=====================================================
BUG: KMSAN: uninit-value in skb_put+0x1d2/0x230 net/core/skbuff.c:2594
 skb_put+0x1d2/0x230 net/core/skbuff.c:2594
 rx_complete+0xd5/0xe00 drivers/net/usb/usbnet.c:594
 __usb_hcd_giveback_urb+0x572/0x840 drivers/usb/core/hcd.c:1650
 usb_hcd_giveback_urb+0x157/0x720 drivers/usb/core/hcd.c:1734
 dummy_timer+0xd3f/0x6aa0 drivers/usb/gadget/udc/dummy_hcd.c:1987
 __run_hrtimer kernel/time/hrtimer.c:1689 [inline]
 __hrtimer_run_queues+0x564/0xe40 kernel/time/hrtimer.c:1753
 hrtimer_interrupt+0x3ab/0x1490 kernel/time/hrtimer.c:1815
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1032 [inline]
 __sysvec_apic_timer_interrupt+0xa6/0x3a0 arch/x86/kernel/apic/apic.c:1049
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
 sysvec_apic_timer_interrupt+0x7e/0x90 arch/x86/kernel/apic/apic.c:1043
 asm_sysvec_apic_timer_interrupt+0x1f/0x30 arch/x86/include/asm/idtentry.h:702
 smap_restore arch/x86/include/asm/smap.h:56 [inline]
 __msan_poison_alloca+0x163/0x1b0 mm/kmsan/instrumentation.c:290
 __rseq_handle_notify_resume+0x447/0x22c0 kernel/rseq.c:333
 rseq_handle_notify_resume include/linux/rseq.h:38 [inline]
 resume_user_mode_work include/linux/resume_user_mode.h:62 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:114 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0xa0/0x170 kernel/entry/common.c:218
 do_syscall_64+0xda/0x1e0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Uninit was created at:
 __alloc_pages_noprof+0x9d6/0xe70 mm/page_alloc.c:4706
 __alloc_pages_node_noprof include/linux/gfp.h:269 [inline]
 alloc_pages_node_noprof include/linux/gfp.h:296 [inline]
 alloc_slab_page mm/slub.c:2304 [inline]
 allocate_slab+0x20a/0x1550 mm/slub.c:2467
 new_slab mm/slub.c:2520 [inline]
 ___slab_alloc+0x12ef/0x35e0 mm/slub.c:3706
 __slab_alloc mm/slub.c:3796 [inline]
 __slab_alloc_node mm/slub.c:3849 [inline]
 slab_alloc_node mm/slub.c:4016 [inline]
 kmem_cache_alloc_node_noprof+0x5fd/0xb80 mm/slub.c:4071
 __alloc_skb+0x1e9/0x7b0 net/core/skbuff.c:664
 alloc_skb include/linux/skbuff.h:1320 [inline]
 alloc_uevent_skb+0xdb/0x350 lib/kobject_uevent.c:289
 uevent_net_broadcast_tagged lib/kobject_uevent.c:352 [inline]
 kobject_uevent_net_broadcast+0x243/0xd70 lib/kobject_uevent.c:413
 kobject_uevent_env+0xd29/0x11e0 lib/kobject_uevent.c:593
 kobject_uevent+0x37/0x50 lib/kobject_uevent.c:641
 rx_queue_add_kobject net/core/net-sysfs.c:1120 [inline]
 net_rx_queue_update_kobjects+0x66c/0xa80 net/core/net-sysfs.c:1160
 register_queue_kobjects net/core/net-sysfs.c:1895 [inline]
 netdev_register_kobject+0x30e/0x530 net/core/net-sysfs.c:2140
 register_netdevice+0x1aae/0x22d0 net/core/dev.c:10435
 lapbeth_new_device drivers/net/wan/lapbether.c:418 [inline]
 lapbeth_device_event+0x10d6/0x16f0 drivers/net/wan/lapbether.c:460
 notifier_call_chain kernel/notifier.c:93 [inline]
 raw_notifier_call_chain+0xe8/0x440 kernel/notifier.c:461
 call_netdevice_notifiers_info+0x1be/0x2b0 net/core/dev.c:1994
 __dev_notify_flags+0x217/0x3b0
 dev_change_flags+0x168/0x1d0 net/core/dev.c:8914
 devinet_ioctl+0x13ec/0x22c0 net/ipv4/devinet.c:1177
 inet_ioctl+0x4bd/0x6d0 net/ipv4/af_inet.c:1003
 sock_do_ioctl+0xb7/0x540 net/socket.c:1222
 sock_ioctl+0x727/0xd70 net/socket.c:1341
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:907 [inline]
 __se_sys_ioctl+0x261/0x450 fs/ioctl.c:893
 __x64_sys_ioctl+0x96/0xe0 fs/ioctl.c:893
 x64_sys_call+0x1a06/0x3c10 arch/x86/include/generated/asm/syscalls_64.h:17
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

CPU: 0 PID: 6199 Comm: udevd Not tainted 6.10.0-syzkaller-10729-g3c3ff7be9729 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
=====================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/20 23:25 upstream 3c3ff7be9729 b88348e9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in skb_put
* Struck through repros no longer work on HEAD.