sg_write: data in/out 167162/433 bytes for SCSI command 0x69-- guessing data in; program syz-executor5 not setting count and/or reply_len properly ================================================================== BUG: KASAN: wild-memory-access in __copy_to_user arch/x86/include/asm/uaccess_64.h:182 [inline] BUG: KASAN: wild-memory-access in sg_read_oxfer drivers/scsi/sg.c:1975 [inline] BUG: KASAN: wild-memory-access in sg_read+0xe88/0x1470 drivers/scsi/sg.c:519 Read of size 4096 at addr ffe70873f768d000 by task syz-executor5/6001 CPU: 0 PID: 6001 Comm: syz-executor5 Not tainted 4.9.91-gbb94f9d #8 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801d7e879b8 ffffffff81d95169 ffe70873f768d000 0000000000001000 0000000000000000 0000000000000000 ffff8801d8762240 ffff8801d7e87a00 ffffffff8153da42 ffffffff8266ba38 0000000000000286 dc208329b9724299 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] kasan_report_error mm/kasan/report.c:353 [inline] [] kasan_report+0x162/0x380 mm/kasan/report.c:412 [] check_memory_region_inline mm/kasan/kasan.c:318 [inline] [] check_memory_region+0x137/0x190 mm/kasan/kasan.c:325 [] kasan_check_read+0x11/0x20 mm/kasan/kasan.c:330 [] __copy_to_user arch/x86/include/asm/uaccess_64.h:182 [inline] [] sg_read_oxfer drivers/scsi/sg.c:1975 [inline] [] sg_read+0xe88/0x1470 drivers/scsi/sg.c:519 [] do_loop_readv_writev.part.17+0xc8/0x2b0 fs/read_write.c:715 [] do_loop_readv_writev fs/read_write.c:1097 [inline] [] compat_do_readv_writev+0x5ff/0x740 fs/read_write.c:1091 [] compat_readv+0xe3/0x150 fs/read_write.c:1120 [] do_compat_readv+0xf4/0x1d0 fs/read_write.c:1140 [] C_SYSC_readv fs/read_write.c:1152 [inline] [] compat_SyS_readv+0x26/0x30 fs/read_write.c:1148 [] do_syscall_32_irqs_on arch/x86/entry/common.c:325 [inline] [] do_fast_syscall_32+0x2f5/0x870 arch/x86/entry/common.c:387 [] entry_SYSENTER_compat+0x90/0xa2 arch/x86/entry/entry_64_compat.S:137 ================================================================== Kernel panic - not syncing: panic_on_warn set ... CPU: 0 PID: 6001 Comm: syz-executor5 Tainted: G B 4.9.91-gbb94f9d #8 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801d7e878d8 ffffffff81d95169 ffffffff84197d57 ffff8801d7e879b0 0000000000000000 0000000000000000 ffff8801d8762240 ffff8801d7e879a0 ffffffff8142e7f1 0000000041b58ab3 ffffffff8418b7b0 ffffffff8142e635 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] panic+0x1bc/0x3a8 kernel/panic.c:179 [] kasan_end_report+0x50/0x50 mm/kasan/report.c:180 [] kasan_report_error mm/kasan/report.c:360 [inline] [] kasan_report+0x16b/0x380 mm/kasan/report.c:412 [] check_memory_region_inline mm/kasan/kasan.c:318 [inline] [] check_memory_region+0x137/0x190 mm/kasan/kasan.c:325 [] kasan_check_read+0x11/0x20 mm/kasan/kasan.c:330 [] __copy_to_user arch/x86/include/asm/uaccess_64.h:182 [inline] [] sg_read_oxfer drivers/scsi/sg.c:1975 [inline] [] sg_read+0xe88/0x1470 drivers/scsi/sg.c:519 [] do_loop_readv_writev.part.17+0xc8/0x2b0 fs/read_write.c:715 [] do_loop_readv_writev fs/read_write.c:1097 [inline] [] compat_do_readv_writev+0x5ff/0x740 fs/read_write.c:1091 [] compat_readv+0xe3/0x150 fs/read_write.c:1120 [] do_compat_readv+0xf4/0x1d0 fs/read_write.c:1140 [] C_SYSC_readv fs/read_write.c:1152 [inline] [] compat_SyS_readv+0x26/0x30 fs/read_write.c:1148 [] do_syscall_32_irqs_on arch/x86/entry/common.c:325 [inline] [] do_fast_syscall_32+0x2f5/0x870 arch/x86/entry/common.c:387 [] entry_SYSENTER_compat+0x90/0xa2 arch/x86/entry/entry_64_compat.S:137 Dumping ftrace buffer: (ftrace buffer empty) Kernel Offset: disabled Rebooting in 86400 seconds..