syzbot


KMSAN: kernel-infoleak in fuzzer_ioctl (2)

Status: auto-closed as invalid on 2022/09/09 10:44
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 1167d, last: 1120d
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: kernel-infoleak in fuzzer_ioctl C 34 1178d 1235d 0/24 closed as invalid on 2019/09/16 16:08
Patch testing requests:
Created Duration User Patch Repo Result
2022/09/09 07:27 19m https://github.com/google/kmsan.git master OK log
2022/09/09 04:27 18m https://github.com/google/kmsan.git master OK log
2022/09/09 00:27 21m https://github.com/google/kmsan.git master OK log
2022/09/08 21:27 21m https://github.com/google/kmsan.git master OK log
2022/09/08 18:27 21m https://github.com/google/kmsan.git master OK log

Sample crash report:
=====================================================
BUG: KMSAN: kernel-infoleak in kmsan_copy_to_user+0xa9/0xb0 mm/kmsan/kmsan_hooks.c:253
CPU: 0 PID: 13158 Comm: syz-executor197 Not tainted 5.4.0-rc5+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x191/0x1f0 lib/dump_stack.c:113
 kmsan_report+0x128/0x220 mm/kmsan/kmsan_report.c:108
 kmsan_internal_check_memory+0x187/0x4a0 mm/kmsan/kmsan.c:437
 kmsan_copy_to_user+0xa9/0xb0 mm/kmsan/kmsan_hooks.c:253
 _copy_to_user+0x16b/0x1f0 lib/usercopy.c:33
 copy_to_user include/linux/uaccess.h:174 [inline]
 fuzzer_ioctl_event_fetch drivers/usb/gadget/fuzzer/fuzzer.c:611 [inline]
 fuzzer_ioctl+0x25a9/0x5860 drivers/usb/gadget/fuzzer/fuzzer.c:1215
 full_proxy_unlocked_ioctl+0x222/0x330 fs/debugfs/file.c:230
 do_vfs_ioctl+0xea8/0x2c50 fs/ioctl.c:46
 ksys_ioctl fs/ioctl.c:713 [inline]
 __do_sys_ioctl fs/ioctl.c:720 [inline]
 __se_sys_ioctl+0x1da/0x270 fs/ioctl.c:718
 __x64_sys_ioctl+0x4a/0x70 fs/ioctl.c:718
 do_syscall_64+0xb6/0x160 arch/x86/entry/common.c:291
 entry_SYSCALL_64_after_hwframe+0x63/0xe7
RIP: 0033:0x447547
Code: 48 83 c4 08 48 89 d8 5b 5d c3 66 0f 1f 84 00 00 00 00 00 48 89 e8 48 f7 d8 48 39 c3 0f 92 c0 eb 92 66 90 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 ad 08 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f30026c5548 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000447547
RDX: 00007f30026c5970 RSI: 0000000080085502 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dcc2c
R13: 00007ffc2df8e0ff R14: 00007f30026c69c0 R15: 0000000000000000

Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:151 [inline]
 kmsan_internal_chain_origin+0xbd/0x180 mm/kmsan/kmsan.c:319
 kmsan_memcpy_memmove_metadata+0x25c/0x2e0 mm/kmsan/kmsan.c:254
 kmsan_memcpy_metadata+0xb/0x10 mm/kmsan/kmsan.c:274
 __msan_memcpy+0x56/0x70 mm/kmsan/kmsan_instr.c:129
 fuzzer_event_queue_add drivers/usb/gadget/fuzzer/fuzzer.c:74 [inline]
 gadget_setup+0x498/0xb60 drivers/usb/gadget/fuzzer/fuzzer.c:346
 dummy_timer+0x1fba/0x6770 drivers/usb/gadget/udc/dummy_hcd.c:1898
 call_timer_fn+0x232/0x530 kernel/time/timer.c:1404
 expire_timers kernel/time/timer.c:1449 [inline]
 __run_timers+0xd60/0x1270 kernel/time/timer.c:1773
 run_timer_softirq+0x2d/0x50 kernel/time/timer.c:1786
 __do_softirq+0x4a1/0x83a kernel/softirq.c:293
 invoke_softirq kernel/softirq.c:375 [inline]
 irq_exit+0x230/0x280 kernel/softirq.c:416
 exiting_irq+0xe/0x10 arch/x86/include/asm/apic.h:536
 smp_apic_timer_interrupt+0x48/0x70 arch/x86/kernel/apic/apic.c:1139
 apic_timer_interrupt+0x2e/0x40 arch/x86/entry/entry_64.S:837
 native_safe_halt arch/x86/include/asm/irqflags.h:60 [inline]
 arch_safe_halt arch/x86/include/asm/irqflags.h:103 [inline]
 default_idle+0x53/0x90 arch/x86/kernel/process.c:580
 arch_cpu_idle+0x25/0x30 arch/x86/kernel/process.c:571
 default_idle_call kernel/sched/idle.c:94 [inline]
 cpuidle_idle_call kernel/sched/idle.c:154 [inline]
 do_idle+0x1d5/0x780 kernel/sched/idle.c:263
 cpu_startup_entry+0x45/0x50 kernel/sched/idle.c:355
 start_secondary+0x389/0x480 arch/x86/kernel/smpboot.c:264
 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:241

Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:151 [inline]
 kmsan_internal_chain_origin+0xbd/0x180 mm/kmsan/kmsan.c:319
 __msan_chain_origin+0x6b/0xd0 mm/kmsan/kmsan_instr.c:179
 dummy_timer+0x2d76/0x6770 drivers/usb/gadget/udc/dummy_hcd.c:1866
 call_timer_fn+0x232/0x530 kernel/time/timer.c:1404
 expire_timers kernel/time/timer.c:1449 [inline]
 __run_timers+0xd60/0x1270 kernel/time/timer.c:1773
 run_timer_softirq+0x2d/0x50 kernel/time/timer.c:1786
 __do_softirq+0x4a1/0x83a kernel/softirq.c:293
 invoke_softirq kernel/softirq.c:375 [inline]
 irq_exit+0x230/0x280 kernel/softirq.c:416
 exiting_irq+0xe/0x10 arch/x86/include/asm/apic.h:536
 smp_apic_timer_interrupt+0x48/0x70 arch/x86/kernel/apic/apic.c:1139
 apic_timer_interrupt+0x2e/0x40 arch/x86/entry/entry_64.S:837
 native_safe_halt arch/x86/include/asm/irqflags.h:60 [inline]
 arch_safe_halt arch/x86/include/asm/irqflags.h:103 [inline]
 default_idle+0x53/0x90 arch/x86/kernel/process.c:580
 arch_cpu_idle+0x25/0x30 arch/x86/kernel/process.c:571
 default_idle_call kernel/sched/idle.c:94 [inline]
 cpuidle_idle_call kernel/sched/idle.c:154 [inline]
 do_idle+0x1d5/0x780 kernel/sched/idle.c:263
 cpu_startup_entry+0x45/0x50 kernel/sched/idle.c:355
 start_secondary+0x389/0x480 arch/x86/kernel/smpboot.c:264
 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:241

Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:151 [inline]
 kmsan_internal_chain_origin+0xbd/0x180 mm/kmsan/kmsan.c:319
 __msan_chain_origin+0x6b/0xd0 mm/kmsan/kmsan_instr.c:179
 usb_control_msg+0x61b/0x7f0 drivers/usb/core/message.c:152
 __usbnet_write_cmd drivers/net/usb/usbnet.c:2028 [inline]
 usbnet_write_cmd+0x386/0x430 drivers/net/usb/usbnet.c:2066
 asix_write_cmd+0x155/0x270 drivers/net/usb/asix_common.c:48
 ax88772_hw_reset+0x191/0xb40 drivers/net/usb/asix_devices.c:361
 ax88772_bind+0x6ad/0x11f0 drivers/net/usb/asix_devices.c:730
 usbnet_probe+0x10d3/0x39d0 drivers/net/usb/usbnet.c:1730
 usb_probe_interface+0xd19/0x1310 drivers/usb/core/driver.c:361
 really_probe+0xd91/0x1f90 drivers/base/dd.c:552
 driver_probe_device+0x1ba/0x510 drivers/base/dd.c:721
 __device_attach_driver+0x5b8/0x790 drivers/base/dd.c:828
 bus_for_each_drv+0x28e/0x3b0 drivers/base/bus.c:430
 __device_attach+0x489/0x750 drivers/base/dd.c:894
 device_initial_probe+0x4a/0x60 drivers/base/dd.c:941
 bus_probe_device+0x131/0x390 drivers/base/bus.c:490
 device_add+0x25b5/0x2df0 drivers/base/core.c:2202
 usb_set_configuration+0x309f/0x3710 drivers/usb/core/message.c:2027
 generic_probe+0xe7/0x280 drivers/usb/core/generic.c:210
 usb_probe_device+0x146/0x200 drivers/usb/core/driver.c:266
 really_probe+0xd91/0x1f90 drivers/base/dd.c:552
 driver_probe_device+0x1ba/0x510 drivers/base/dd.c:721
 __device_attach_driver+0x5b8/0x790 drivers/base/dd.c:828
 bus_for_each_drv+0x28e/0x3b0 drivers/base/bus.c:430
 __device_attach+0x489/0x750 drivers/base/dd.c:894
 device_initial_probe+0x4a/0x60 drivers/base/dd.c:941
 bus_probe_device+0x131/0x390 drivers/base/bus.c:490
 device_add+0x25b5/0x2df0 drivers/base/core.c:2202
 usb_new_device+0x23e5/0x2fb0 drivers/usb/core/hub.c:2536
 hub_port_connect drivers/usb/core/hub.c:5098 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5213 [inline]
 port_event drivers/usb/core/hub.c:5359 [inline]
 hub_event+0x581d/0x72f0 drivers/usb/core/hub.c:5441
 process_one_work+0x1572/0x1ef0 kernel/workqueue.c:2269
 process_scheduled_works kernel/workqueue.c:2331 [inline]
 worker_thread+0x189c/0x2460 kernel/workqueue.c:2417
 kthread+0x4b5/0x4f0 kernel/kthread.c:256
 ret_from_fork+0x35/0x40 arch/x86/entry/entry_64.S:355

Uninit was stored to memory at:
 kmsan_save_stack_with_flags mm/kmsan/kmsan.c:151 [inline]
 kmsan_internal_chain_origin+0xbd/0x180 mm/kmsan/kmsan.c:319
 __msan_chain_origin+0x6b/0xd0 mm/kmsan/kmsan_instr.c:179
 ax88772_bind+0xa12/0x11f0 drivers/net/usb/asix_devices.c:720
 usbnet_probe+0x10d3/0x39d0 drivers/net/usb/usbnet.c:1730
 usb_probe_interface+0xd19/0x1310 drivers/usb/core/driver.c:361
 really_probe+0xd91/0x1f90 drivers/base/dd.c:552
 driver_probe_device+0x1ba/0x510 drivers/base/dd.c:721
 __device_attach_driver+0x5b8/0x790 drivers/base/dd.c:828
 bus_for_each_drv+0x28e/0x3b0 drivers/base/bus.c:430
 __device_attach+0x489/0x750 drivers/base/dd.c:894
 device_initial_probe+0x4a/0x60 drivers/base/dd.c:941
 bus_probe_device+0x131/0x390 drivers/base/bus.c:490
 device_add+0x25b5/0x2df0 drivers/base/core.c:2202
 usb_set_configuration+0x309f/0x3710 drivers/usb/core/message.c:2027
 generic_probe+0xe7/0x280 drivers/usb/core/generic.c:210
 usb_probe_device+0x146/0x200 drivers/usb/core/driver.c:266
 really_probe+0xd91/0x1f90 drivers/base/dd.c:552
 driver_probe_device+0x1ba/0x510 drivers/base/dd.c:721
 __device_attach_driver+0x5b8/0x790 drivers/base/dd.c:828
 bus_for_each_drv+0x28e/0x3b0 drivers/base/bus.c:430
 __device_attach+0x489/0x750 drivers/base/dd.c:894
 device_initial_probe+0x4a/0x60 drivers/base/dd.c:941
 bus_probe_device+0x131/0x390 drivers/base/bus.c:490
 device_add+0x25b5/0x2df0 drivers/base/core.c:2202
 usb_new_device+0x23e5/0x2fb0 drivers/usb/core/hub.c:2536
 hub_port_connect drivers/usb/core/hub.c:5098 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5213 [inline]
 port_event drivers/usb/core/hub.c:5359 [inline]
 hub_event+0x581d/0x72f0 drivers/usb/core/hub.c:5441
 process_one_work+0x1572/0x1ef0 kernel/workqueue.c:2269
 process_scheduled_works kernel/workqueue.c:2331 [inline]
 worker_thread+0x189c/0x2460 kernel/workqueue.c:2417
 kthread+0x4b5/0x4f0 kernel/kthread.c:256
 ret_from_fork+0x35/0x40 arch/x86/entry/entry_64.S:355

Local variable description: ----buf.i@asix_get_phy_addr
Variable was created at:
 asix_read_cmd drivers/net/usb/asix_common.c:312 [inline]
 asix_read_phy_addr drivers/net/usb/asix_common.c:295 [inline]
 asix_get_phy_addr+0x4d/0x280 drivers/net/usb/asix_common.c:314
 asix_read_cmd drivers/net/usb/asix_common.c:312 [inline]
 asix_read_phy_addr drivers/net/usb/asix_common.c:295 [inline]
 asix_get_phy_addr+0x4d/0x280 drivers/net/usb/asix_common.c:314

Byte 10 of 16 is uninitialized
Memory access of size 16 starts at ffff888112567760
Data copied to user address 00007f30026c5970
=====================================================

Crashes (179):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kmsan-gce 2019/10/30 10:04 https://github.com/google/kmsan.git master 96c6c3194b1b 5ea87a66 .config log report syz C
ci-upstream-kmsan-gce 2019/09/29 00:05 https://github.com/google/kmsan.git master 124037e07586 eb6b9855 .config log report syz C
ci-upstream-kmsan-gce 2019/09/19 20:57 https://github.com/google/kmsan.git master cebbfdbcf2b7 eb940044 .config log report syz C
ci-upstream-kmsan-gce 2019/10/08 19:29 https://github.com/google/kmsan.git master cebb918b7474 b1ebbfef .config log report syz
ci-upstream-kmsan-gce 2019/09/29 01:39 https://github.com/google/kmsan.git master 124037e07586 eb6b9855 .config log report syz
ci-upstream-kmsan-gce 2019/11/04 14:40 https://github.com/google/kmsan.git master 6f88939b3fa3 18e12644 .config log report
ci-upstream-kmsan-gce 2019/11/03 00:09 https://github.com/google/kmsan.git master 6f88939b3fa3 a41ca8fa .config log report
ci-upstream-kmsan-gce 2019/10/31 11:19 https://github.com/google/kmsan.git master 6f88939b3fa3 a41ca8fa .config log report
ci-upstream-kmsan-gce 2019/10/30 02:02 https://github.com/google/kmsan.git master 96c6c3194b1b 5ea87a66 .config log report
ci-upstream-kmsan-gce 2019/10/29 19:51 https://github.com/google/kmsan.git master 96c6c3194b1b 5ea87a66 .config log report
ci-upstream-kmsan-gce 2019/10/29 04:25 https://github.com/google/kmsan.git master 96c6c3194b1b 439d7b14 .config log report
ci-upstream-kmsan-gce 2019/10/29 02:58 https://github.com/google/kmsan.git master 96c6c3194b1b 439d7b14 .config log report
ci-upstream-kmsan-gce 2019/10/28 14:25 https://github.com/google/kmsan.git master d86c15562d02 25bb509e .config log report
ci-upstream-kmsan-gce 2019/10/26 12:47 https://github.com/google/kmsan.git master d86c15562d02 413926c5 .config log report
ci-upstream-kmsan-gce 2019/10/26 00:37 https://github.com/google/kmsan.git master d86c15562d02 c2e837da .config log report
ci-upstream-kmsan-gce 2019/10/26 00:06 https://github.com/google/kmsan.git master d86c15562d02 c2e837da .config log report
ci-upstream-kmsan-gce 2019/10/25 22:28 https://github.com/google/kmsan.git master d86c15562d02 c2e837da .config log report
ci-upstream-kmsan-gce 2019/10/25 20:45 https://github.com/google/kmsan.git master d86c15562d02 c2e837da .config log report
ci-upstream-kmsan-gce 2019/10/25 18:45 https://github.com/google/kmsan.git master d86c15562d02 c2e837da .config log report
ci-upstream-kmsan-gce 2019/10/25 17:23 https://github.com/google/kmsan.git master d86c15562d02 c2e837da .config log report
ci-upstream-kmsan-gce 2019/10/25 17:22 https://github.com/google/kmsan.git master d86c15562d02 c2e837da .config log report
ci-upstream-kmsan-gce 2019/10/25 13:03 https://github.com/google/kmsan.git master d86c15562d02 d01bb02a .config log report
ci-upstream-kmsan-gce 2019/10/25 05:37 https://github.com/google/kmsan.git master d86c15562d02 d01bb02a .config log report
ci-upstream-kmsan-gce 2019/10/24 18:25 https://github.com/google/kmsan.git master d86c15562d02 d01bb02a .config log report
ci-upstream-kmsan-gce 2019/10/24 13:27 https://github.com/google/kmsan.git master d86c15562d02 d01bb02a .config log report
ci-upstream-kmsan-gce 2019/10/24 11:12 https://github.com/google/kmsan.git master d86c15562d02 d01bb02a .config log report
ci-upstream-kmsan-gce 2019/10/24 04:09 https://github.com/google/kmsan.git master ba606e9df216 b602d64b .config log report
ci-upstream-kmsan-gce 2019/10/24 00:53 https://github.com/google/kmsan.git master ba606e9df216 b602d64b .config log report
ci-upstream-kmsan-gce 2019/10/23 19:29 https://github.com/google/kmsan.git master 3c8ca70889aa b602d64b .config log report
ci-upstream-kmsan-gce 2019/10/23 18:13 https://github.com/google/kmsan.git master 3c8ca70889aa b602d64b .config log report
ci-upstream-kmsan-gce 2019/10/23 18:12 https://github.com/google/kmsan.git master 3c8ca70889aa b602d64b .config log report
ci-upstream-kmsan-gce 2019/10/23 15:11 https://github.com/google/kmsan.git master 3c8ca70889aa d0686497 .config log report
ci-upstream-kmsan-gce 2019/10/23 11:58 https://github.com/google/kmsan.git master 3c8ca70889aa d0686497 .config log report
ci-upstream-kmsan-gce 2019/10/23 06:46 https://github.com/google/kmsan.git master 3c8ca70889aa d0686497 .config log report
ci-upstream-kmsan-gce 2019/10/23 01:58 https://github.com/google/kmsan.git master 3c8ca70889aa 5681358a .config log report
ci-upstream-kmsan-gce 2019/10/22 18:29 https://github.com/google/kmsan.git master 3c8ca70889aa 5681358a .config log report
ci-upstream-kmsan-gce 2019/10/21 23:32 https://github.com/google/kmsan.git master 3c8ca70889aa b24d2b8a .config log report
ci-upstream-kmsan-gce 2019/10/21 14:57 https://github.com/google/kmsan.git master 3c8ca70889aa b24d2b8a .config log report
ci-upstream-kmsan-gce 2019/10/21 09:31 https://github.com/google/kmsan.git master 3c8ca70889aa 8c88c9c1 .config log report
ci-upstream-kmsan-gce 2019/10/21 03:01 https://github.com/google/kmsan.git master 3c8ca70889aa 8c88c9c1 .config log report
ci-upstream-kmsan-gce 2019/10/20 22:26 https://github.com/google/kmsan.git master 3c8ca70889aa 8c88c9c1 .config log report
ci-upstream-kmsan-gce 2019/10/20 06:29 https://github.com/google/kmsan.git master 3c8ca70889aa 8c88c9c1 .config log report
ci-upstream-kmsan-gce 2019/10/19 19:36 https://github.com/google/kmsan.git master 3c8ca70889aa 8c88c9c1 .config log report
ci-upstream-kmsan-gce 2019/10/18 15:17 https://github.com/google/kmsan.git master 3c8ca70889aa 8c88c9c1 .config log report
ci-upstream-kmsan-gce 2019/10/18 00:45 https://github.com/google/kmsan.git master 3c8ca70889aa 8c88c9c1 .config log report
ci-upstream-kmsan-gce 2019/10/16 22:00 https://github.com/google/kmsan.git master c24534505750 8c88c9c1 .config log report
ci-upstream-kmsan-gce 2019/10/16 20:19 https://github.com/google/kmsan.git master c24534505750 8c88c9c1 .config log report
ci-upstream-kmsan-gce 2019/10/16 01:09 https://github.com/google/kmsan.git master c24534505750 d4ea592f .config log report
ci-upstream-kmsan-gce 2019/10/15 15:40 https://github.com/google/kmsan.git master c24534505750 b5268b89 .config log report
ci-upstream-kmsan-gce 2019/10/15 13:03 https://github.com/google/kmsan.git master c24534505750 b5268b89 .config log report
ci-upstream-kmsan-gce 2019/10/14 07:51 https://github.com/google/kmsan.git master fa1690255288 2f661ec4 .config log report
ci-upstream-kmsan-gce 2019/10/14 04:57 https://github.com/google/kmsan.git master fa1690255288 2f661ec4 .config log report
ci-upstream-kmsan-gce 2019/10/14 01:16 https://github.com/google/kmsan.git master fa1690255288 2f661ec4 .config log report
ci-upstream-kmsan-gce 2019/10/14 00:09 https://github.com/google/kmsan.git master fa1690255288 2f661ec4 .config log report
ci-upstream-kmsan-gce 2019/10/13 08:34 https://github.com/google/kmsan.git master fa1690255288 426631dd .config log report
ci-upstream-kmsan-gce 2019/09/18 00:48 https://github.com/google/kmsan.git master cebbfdbcf2b7 03e0d245 .config log report
* Struck through repros no longer work on HEAD.