program syz-executor2 not setting count and/or reply_len properly kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] PREEMPT SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 1 PID: 3728 Comm: syz-executor2 Not tainted 4.9.63-ga828714 #93 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8801a6219800 task.stack: ffff8801a4b78000 RIP: 0010:[] [] sg_read_oxfer drivers/scsi/sg.c:1976 [inline] [] sg_read+0xd0c/0x1440 drivers/scsi/sg.c:520 RSP: 0018:ffff8801a4b7fac0 EFLAGS: 00010246 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffc900025e9000 RDX: 0000000000000000 RSI: 00000000000000d2 RDI: ffff8801a866c370 RBP: ffff8801a4b7fbc8 R08: 0000000000000007 R09: ffffed003495e179 R10: 0000000000000005 R11: ffffed003495e178 R12: 0000000000001000 R13: 0000000000000000 R14: ffff8801a4af0ba0 R15: ffff8801a866c340 FS: 00007f85e7729700(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000002056d000 CR3: 00000001a62c9000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: ffff8801d57366c0 ffff8801a4b7faf0 ffff8801a866c358 ffff8801000000d2[ 23.850400] 0000000000000000 ffff8801a866c368 00000000000000f6 0000000000000246[ 23.850410] ffff8801d1b8ca00 1ffff1003496ff64 000000002042ff0a 000000002042ff2e[ 23.850420] Call Trace: [] do_loop_readv_writev.part.17+0x141/0x1e0 fs/read_write.c:714 [] do_loop_readv_writev fs/read_write.c:880 [inline] [] do_readv_writev+0x520/0x750 fs/read_write.c:874 [] vfs_readv+0x84/0xc0 fs/read_write.c:898 [] do_readv+0xe6/0x250 fs/read_write.c:924 [] SYSC_readv fs/read_write.c:1011 [inline] [] SyS_readv+0x27/0x30 fs/read_write.c:1008 [] entry_SYSCALL_64_fastpath+0x23/0xc6 Code: 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 8a 06 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 5f 28 48 89 da 48 c1 ea 03 <80> 3c 02 00 0f 85 df 05 00 00 48 8b 1b 48 85 db 0f 84 51 03 00 [ 23.850755] RIP [] sg_read_oxfer drivers/scsi/sg.c:1976 [inline] [] sg_read+0xd0c/0x1440 drivers/scsi/sg.c:520 ---[ end trace 95117c3cd92a9086 ]--- Kernel panic - not syncing: Fatal exception ffffffff816623c7 0000000000005d9e ffff8801a49ab8f0 ffff8801a49ab8a0 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] handle_userfault+0xa37/0x1300 fs/userfaultfd.c:323 [] do_anonymous_page mm/memory.c:2747 [inline] [] handle_pte_fault mm/memory.c:3488 [inline] [] __handle_mm_fault mm/memory.c:3577 [inline] [] handle_mm_fault+0x1fd1/0x2530 mm/memory.c:3614 [] __do_page_fault+0x5b7/0xd70 arch/x86/mm/fault.c:1396 [] do_page_fault+0x27/0x30 arch/x86/mm/fault.c:1460 [] page_fault+0x28/0x30 arch/x86/entry/entry_64.S:1012 [] strndup_user+0x28/0xb0 mm/util.c:160 [] SYSC_request_key security/keys/keyctl.c:186 [inline] [] SyS_request_key+0xd6/0x2d0 security/keys/keyctl.c:158 [] entry_SYSCALL_64_fastpath+0x23/0xc6 Dumping ftrace buffer: (ftrace buffer empty) Kernel Offset: disabled Rebooting in 86400 seconds..