================================================================== BUG: KMSAN: kernel-infoleak in _copy_to_user+0x16b/0x1f0 lib/usercopy.c:32 CPU: 0 PID: 11783 Comm: rsyslogd 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] syslog_print kernel/printk/printk.c:1406 [inline] do_syslog+0x2e62/0x3160 kernel/printk/printk.c:1531 kmsg_read+0x142/0x1a0 fs/proc/kmsg.c:40 proc_reg_read+0x25f/0x360 fs/proc/inode.c:223 __vfs_read+0x1a9/0xc90 fs/read_write.c:425 vfs_read+0x359/0x6f0 fs/read_write.c:461 ksys_read+0x265/0x430 fs/read_write.c:587 __do_sys_read fs/read_write.c:597 [inline] __se_sys_read+0x92/0xb0 fs/read_write.c:595 __x64_sys_read+0x4a/0x70 fs/read_write.c:595 do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x63/0xe7 RIP: 0033:0x7f68b51c71fd Code: d1 20 00 00 75 10 b8 00 00 00 00 0f 05 48 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 5e fa ff ff 48 89 04 24 b8 00 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 a7 fa ff ff 48 89 d0 48 83 c4 08 48 3d 01 RSP: 002b:00007f68b2766e30 EFLAGS: 00000293 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 0000000000c99670 RCX: 00007f68b51c71fd RDX: 0000000000000fff RSI: 00007f68b3f9b5a0 RDI: 0000000000000004 RBP: 0000000000000000 R08: 0000000000c84260 R09: 0000000000000000 R10: 0000000000000012 R11: 0000000000000293 R12: 000000000065e420 R13: 00007f68b27679c0 R14: 00007f68b580c040 R15: 0000000000000003 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 msg_print_text+0x871/0xa70 kernel/printk/printk.c:1338 syslog_print kernel/printk/printk.c:1387 [inline] do_syslog+0x2a3f/0x3160 kernel/printk/printk.c:1531 kmsg_read+0x142/0x1a0 fs/proc/kmsg.c:40 proc_reg_read+0x25f/0x360 fs/proc/inode.c:223 __vfs_read+0x1a9/0xc90 fs/read_write.c:425 vfs_read+0x359/0x6f0 fs/read_write.c:461 ksys_read+0x265/0x430 fs/read_write.c:587 __do_sys_read fs/read_write.c:597 [inline] __se_sys_read+0x92/0xb0 fs/read_write.c:595 __x64_sys_read+0x4a/0x70 fs/read_write.c:595 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 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 log_store+0xe7e/0x14d0 kernel/printk/printk.c:639 log_output kernel/printk/printk.c:1901 [inline] vprintk_store+0xbf7/0x11d0 kernel/printk/printk.c:1952 vprintk_emit+0x2d9/0x8a0 kernel/printk/printk.c:1980 vprintk_default+0x90/0xa0 kernel/printk/printk.c:2025 vprintk_func+0x635/0x810 kernel/printk/printk_safe.c:386 printk+0x180/0x1c3 kernel/printk/printk.c:2058 device_authorization drivers/media/usb/hdpvr/hdpvr-core.c:140 [inline] hdpvr_device_init drivers/media/usb/hdpvr/hdpvr-core.c:201 [inline] hdpvr_probe+0x1003/0x2e70 drivers/media/usb/hdpvr/hdpvr-core.c:342 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 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:187 [inline] kmsan_internal_chain_origin+0xcc/0x150 mm/kmsan/kmsan.c:345 __msan_chain_origin+0x6b/0xe0 mm/kmsan/kmsan_instr.c:190 string_nocheck lib/vsprintf.c:609 [inline] string+0x530/0x600 lib/vsprintf.c:668 vsnprintf+0x218f/0x3210 lib/vsprintf.c:2503 vscnprintf+0xc2/0x180 lib/vsprintf.c:2606 vprintk_store+0xef/0x11d0 kernel/printk/printk.c:1919 vprintk_emit+0x2d9/0x8a0 kernel/printk/printk.c:1980 vprintk_default+0x90/0xa0 kernel/printk/printk.c:2025 vprintk_func+0x635/0x810 kernel/printk/printk_safe.c:386 printk+0x180/0x1c3 kernel/printk/printk.c:2058 device_authorization drivers/media/usb/hdpvr/hdpvr-core.c:140 [inline] hdpvr_device_init drivers/media/usb/hdpvr/hdpvr-core.c:201 [inline] hdpvr_probe+0x1003/0x2e70 drivers/media/usb/hdpvr/hdpvr-core.c:342 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 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 created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:187 [inline] kmsan_internal_poison_shadow+0x53/0xa0 mm/kmsan/kmsan.c:146 kmsan_slab_alloc+0xaa/0x120 mm/kmsan/kmsan_hooks.c:175 slab_alloc_node mm/slub.c:2790 [inline] slab_alloc mm/slub.c:2799 [inline] kmem_cache_alloc_trace+0x8c5/0xd20 mm/slub.c:2816 kmalloc include/linux/slab.h:552 [inline] hdpvr_probe+0x31e/0x2e70 drivers/media/usb/hdpvr/hdpvr-core.c:297 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 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 Bytes 116-123 of 125 are uninitialized Memory access of size 125 starts at ffff8880a49c4400 Data copied to user address 00007f68b3f9b5e9 ==================================================================