================================================================== BUG: KMSAN: kernel-infoleak in _copy_to_user+0x16b/0x1f0 lib/usercopy.c:32 CPU: 1 PID: 11952 Comm: syz-executor.0 Not tainted 5.3.0-rc3+ #17 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+0x162/0x2d0 mm/kmsan/kmsan_report.c:109 kmsan_internal_check_memory+0x455/0x8d0 mm/kmsan/kmsan.c:522 kmsan_copy_to_user+0xa9/0xb0 mm/kmsan/kmsan_hooks.c:493 _copy_to_user+0x16b/0x1f0 lib/usercopy.c:32 copy_to_user include/linux/uaccess.h:174 [inline] fuzzer_ioctl_event_fetch drivers/usb/gadget/fuzzer/fuzzer.c:796 [inline] fuzzer_ioctl+0x2605/0x5690 drivers/usb/gadget/fuzzer/fuzzer.c:1392 full_proxy_unlocked_ioctl+0x1ca/0x380 fs/debugfs/file.c:205 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+0xbc/0xf0 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x63/0xe7 RIP: 0033:0x459697 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 5d b9 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f2f18a413e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000459697 RDX: 00007f2f18a41830 RSI: 0000000080085502 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f2f18a426d4 R13: 00000000004bee86 R14: 00000000004dff00 R15: 00000000ffffffff Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:187 [inline] kmsan_internal_chain_origin+0xcc/0x150 mm/kmsan/kmsan.c:345 kmsan_memcpy_memmove_metadata+0x819/0xa80 mm/kmsan/kmsan.c:278 kmsan_memcpy_metadata+0xb/0x10 mm/kmsan/kmsan.c:298 __msan_memcpy+0x56/0x70 mm/kmsan/kmsan_instr.c:129 fuzzer_event_queue_add drivers/usb/gadget/fuzzer/fuzzer.c:72 [inline] gadget_setup+0x498/0xb60 drivers/usb/gadget/fuzzer/fuzzer.c:531 dummy_timer+0x1fba/0x6770 drivers/usb/gadget/udc/dummy_hcd.c:1897 call_timer_fn+0x232/0x530 kernel/time/timer.c:1322 expire_timers kernel/time/timer.c:1366 [inline] __run_timers+0xcdc/0x11a0 kernel/time/timer.c:1685 run_timer_softirq+0x2d/0x50 kernel/time/timer.c:1698 __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:537 smp_apic_timer_interrupt+0x48/0x70 arch/x86/kernel/apic/apic.c:1097 apic_timer_interrupt+0x2e/0x40 arch/x86/entry/entry_64.S:835 BLEND_OP crypto/sha256_generic.c:63 [inline] sha256_transform crypto/sha256_generic.c:78 [inline] sha256_generic_block_fn+0x32c/0x8870 crypto/sha256_generic.c:233 sha256_base_do_update include/crypto/sha256_base.h:79 [inline] crypto_sha256_update+0x3f6/0x480 crypto/sha256_generic.c:241 crypto_shash_update+0x4eb/0x550 crypto/shash.c:107 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:361 [inline] ima_calc_file_shash security/integrity/ima/ima_crypto.c:381 [inline] ima_calc_file_hash+0x170a/0x3240 security/integrity/ima/ima_crypto.c:446 ima_collect_measurement+0x4a5/0x9e0 security/integrity/ima/ima_api.c:239 process_measurement+0x1a7d/0x2ba0 security/integrity/ima/ima_main.c:311 ima_file_check+0x131/0x170 security/integrity/ima/ima_main.c:422 do_last fs/namei.c:3420 [inline] path_openat+0x4b09/0x6bb0 fs/namei.c:3533 do_filp_open+0x2b8/0x710 fs/namei.c:3563 do_sys_open+0x642/0xa30 fs/open.c:1089 __do_sys_openat fs/open.c:1116 [inline] __se_sys_openat+0xcb/0xe0 fs/open.c:1110 __x64_sys_openat+0x56/0x70 fs/open.c:1110 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x63/0xe7 Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:187 [inline] kmsan_internal_chain_origin+0xcc/0x150 mm/kmsan/kmsan.c:345 __msan_chain_origin+0x6b/0xe0 mm/kmsan/kmsan_instr.c:190 dummy_timer+0x2d76/0x6770 drivers/usb/gadget/udc/dummy_hcd.c:1865 call_timer_fn+0x232/0x530 kernel/time/timer.c:1322 expire_timers kernel/time/timer.c:1366 [inline] __run_timers+0xcdc/0x11a0 kernel/time/timer.c:1685 run_timer_softirq+0x2d/0x50 kernel/time/timer.c:1698 __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:537 smp_apic_timer_interrupt+0x48/0x70 arch/x86/kernel/apic/apic.c:1097 apic_timer_interrupt+0x2e/0x40 arch/x86/entry/entry_64.S:835 BLEND_OP crypto/sha256_generic.c:63 [inline] sha256_transform crypto/sha256_generic.c:78 [inline] sha256_generic_block_fn+0x32c/0x8870 crypto/sha256_generic.c:233 sha256_base_do_update include/crypto/sha256_base.h:79 [inline] crypto_sha256_update+0x3f6/0x480 crypto/sha256_generic.c:241 crypto_shash_update+0x4eb/0x550 crypto/shash.c:107 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:361 [inline] ima_calc_file_shash security/integrity/ima/ima_crypto.c:381 [inline] ima_calc_file_hash+0x170a/0x3240 security/integrity/ima/ima_crypto.c:446 ima_collect_measurement+0x4a5/0x9e0 security/integrity/ima/ima_api.c:239 process_measurement+0x1a7d/0x2ba0 security/integrity/ima/ima_main.c:311 ima_file_check+0x131/0x170 security/integrity/ima/ima_main.c:422 do_last fs/namei.c:3420 [inline] path_openat+0x4b09/0x6bb0 fs/namei.c:3533 do_filp_open+0x2b8/0x710 fs/namei.c:3563 do_sys_open+0x642/0xa30 fs/open.c:1089 __do_sys_openat fs/open.c:1116 [inline] __se_sys_openat+0xcb/0xe0 fs/open.c:1110 __x64_sys_openat+0x56/0x70 fs/open.c:1110 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x63/0xe7 Uninit was stored to memory at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:187 [inline] kmsan_internal_chain_origin+0xcc/0x150 mm/kmsan/kmsan.c:345 __msan_chain_origin+0x6b/0xe0 mm/kmsan/kmsan_instr.c:190 usb_control_msg+0x61b/0x7f0 drivers/usb/core/message.c:152 __usbnet_write_cmd drivers/net/usb/usbnet.c:2020 [inline] usbnet_write_cmd+0x386/0x430 drivers/net/usb/usbnet.c:2058 asix_write_cmd+0x155/0x270 drivers/net/usb/asix_common.c:48 ax88772a_hw_reset+0x1ab/0x1030 drivers/net/usb/asix_devices.c:456 ax88772_bind+0x67a/0x11f0 drivers/net/usb/asix_devices.c:731 usbnet_probe+0x10ae/0x3960 drivers/net/usb/usbnet.c:1722 usb_probe_interface+0xd19/0x1310 drivers/usb/core/driver.c:361 really_probe+0x1373/0x1dc0 drivers/base/dd.c:552 driver_probe_device+0x1ba/0x510 drivers/base/dd.c:709 __device_attach_driver+0x5b8/0x790 drivers/base/dd.c:816 bus_for_each_drv+0x28e/0x3b0 drivers/base/bus.c:454 __device_attach+0x489/0x750 drivers/base/dd.c:882 device_initial_probe+0x4a/0x60 drivers/base/dd.c:929 bus_probe_device+0x131/0x390 drivers/base/bus.c:514 device_add+0x25b5/0x2df0 drivers/base/core.c:2114 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+0x1373/0x1dc0 drivers/base/dd.c:552 driver_probe_device+0x1ba/0x510 drivers/base/dd.c:709 __device_attach_driver+0x5b8/0x790 drivers/base/dd.c:816 bus_for_each_drv+0x28e/0x3b0 drivers/base/bus.c:454 __device_attach+0x489/0x750 drivers/base/dd.c:882 device_initial_probe+0x4a/0x60 drivers/base/dd.c:929 bus_probe_device+0x131/0x390 drivers/base/bus.c:514 device_add+0x25b5/0x2df0 drivers/base/core.c:2114 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 worker_thread+0x111b/0x2460 kernel/workqueue.c:2415 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:187 [inline] kmsan_internal_chain_origin+0xcc/0x150 mm/kmsan/kmsan.c:345 __msan_chain_origin+0x6b/0xe0 mm/kmsan/kmsan_instr.c:190 ax88772_bind+0xa12/0x11f0 drivers/net/usb/asix_devices.c:720 usbnet_probe+0x10ae/0x3960 drivers/net/usb/usbnet.c:1722 usb_probe_interface+0xd19/0x1310 drivers/usb/core/driver.c:361 really_probe+0x1373/0x1dc0 drivers/base/dd.c:552 driver_probe_device+0x1ba/0x510 drivers/base/dd.c:709 __device_attach_driver+0x5b8/0x790 drivers/base/dd.c:816 bus_for_each_drv+0x28e/0x3b0 drivers/base/bus.c:454 __device_attach+0x489/0x750 drivers/base/dd.c:882 device_initial_probe+0x4a/0x60 drivers/base/dd.c:929 bus_probe_device+0x131/0x390 drivers/base/bus.c:514 device_add+0x25b5/0x2df0 drivers/base/core.c:2114 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+0x1373/0x1dc0 drivers/base/dd.c:552 driver_probe_device+0x1ba/0x510 drivers/base/dd.c:709 __device_attach_driver+0x5b8/0x790 drivers/base/dd.c:816 bus_for_each_drv+0x28e/0x3b0 drivers/base/bus.c:454 __device_attach+0x489/0x750 drivers/base/dd.c:882 device_initial_probe+0x4a/0x60 drivers/base/dd.c:929 bus_probe_device+0x131/0x390 drivers/base/bus.c:514 device_add+0x25b5/0x2df0 drivers/base/core.c:2114 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 worker_thread+0x111b/0x2460 kernel/workqueue.c:2415 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:313 [inline] asix_read_phy_addr drivers/net/usb/asix_common.c:296 [inline] asix_get_phy_addr+0x4d/0x280 drivers/net/usb/asix_common.c:315 ax88772_bind+0x472/0x11f0 drivers/net/usb/asix_devices.c:720 Byte 10 of 16 is uninitialized Memory access of size 16 starts at ffff888101a136e0 Data copied to user address 00007f2f18a41830 ==================================================================