================================================================== BUG: KASAN: use-after-free in strlen+0x79/0x90 lib/string.c:525 Read of size 1 at addr ffff8881d499df38 by task syz-executor509/1732 CPU: 1 PID: 1732 Comm: syz-executor509 Not tainted 5.3.0-rc2+ #25 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+0xca/0x13e lib/dump_stack.c:113 print_address_description+0x6a/0x32c mm/kasan/report.c:351 __kasan_report.cold+0x1a/0x33 mm/kasan/report.c:482 kasan_report+0xe/0x12 mm/kasan/common.c:612 strlen+0x79/0x90 lib/string.c:525 strlen include/linux/string.h:281 [inline] hidraw_ioctl+0x245/0xae0 drivers/hid/hidraw.c:446 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0xd2d/0x1330 fs/ioctl.c:696 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:713 __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:718 do_syscall_64+0xb7/0x580 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x445769 Code: e8 8c e8 ff ff 48 83 c4 18 c3 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 eb cc fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffc59564918 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000445769 RDX: 0000000000000000 RSI: 0000000080404805 RDI: 0000000000000004 RBP: 00000000006d0018 R08: 000000000000000b R09: 00000000004002e0 R10: 000000000000000f R11: 0000000000000246 R12: 00000000004028e0 R13: 0000000000402970 R14: 0000000000000000 R15: 0000000000000000 kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN CPU: 1 PID: 1732 Comm: syz-executor509 Not tainted 5.3.0-rc2+ #25 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:nearest_obj include/linux/slub_def.h:176 [inline] RIP: 0010:print_address_description+0xc5/0x32c mm/kasan/report.c:356 Code: 00 00 b9 0b 00 00 00 49 8b 5c 24 18 be 11 ff ff 01 48 89 e8 48 c1 e1 29 48 c1 e6 27 4c 01 e1 48 c1 f9 06 48 c1 e1 0c 48 01 f1 <8b> 73 18 48 29 c8 48 99 48 f7 fe 66 41 8b 44 24 2a 48 89 f7 48 89 RSP: 0018:ffff8881d289fbd0 EFLAGS: 00010086 RAX: ffff8881d499df38 RBX: dead000000000400 RCX: ffff8881d499d000 RDX: ffffea0007526601 RSI: ffff888000000000 RDI: ffffed103a513f6c RBP: ffff8881d499df38 R08: 0000000000000000 R09: ffffed103b663ee7 R10: ffffed103b663ee6 R11: ffff8881db31f737 R12: ffffea0007526740 R13: ffffffff85698e79 R14: ffff8881d94e9800 R15: 0000000000000005 FS: 0000555556a29880(0000) GS:ffff8881db300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffc59564924 CR3: 00000001d4125000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __kasan_report.cold+0x1a/0x33 mm/kasan/report.c:482 kasan_report+0xe/0x12 mm/kasan/common.c:612 strlen+0x79/0x90 lib/string.c:525 strlen include/linux/string.h:281 [inline] hidraw_ioctl+0x245/0xae0 drivers/hid/hidraw.c:446 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0xd2d/0x1330 fs/ioctl.c:696 ksys_ioctl+0x9b/0xc0 fs/ioctl.c:713 __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x6f/0xb0 fs/ioctl.c:718 do_syscall_64+0xb7/0x580 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x445769 Code: e8 8c e8 ff ff 48 83 c4 18 c3 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 eb cc fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffc59564918 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000445769 RDX: 0000000000000000 RSI: 0000000080404805 RDI: 0000000000000004 RBP: 00000000006d0018 R08: 000000000000000b R09: 00000000004002e0 R10: 000000000000000f R11: 0000000000000246 R12: 00000000004028e0 R13: 0000000000402970 R14: 0000000000000000 R15: 0000000000000000 Modules linked in: ---[ end trace 9b5be50ea9c21e33 ]--- RIP: 0010:nearest_obj include/linux/slub_def.h:176 [inline] RIP: 0010:print_address_description+0xc5/0x32c mm/kasan/report.c:356 Code: 00 00 b9 0b 00 00 00 49 8b 5c 24 18 be 11 ff ff 01 48 89 e8 48 c1 e1 29 48 c1 e6 27 4c 01 e1 48 c1 f9 06 48 c1 e1 0c 48 01 f1 <8b> 73 18 48 29 c8 48 99 48 f7 fe 66 41 8b 44 24 2a 48 89 f7 48 89 RSP: 0018:ffff8881d289fbd0 EFLAGS: 00010086 RAX: ffff8881d499df38 RBX: dead000000000400 RCX: ffff8881d499d000 RDX: ffffea0007526601 RSI: ffff888000000000 RDI: ffffed103a513f6c RBP: ffff8881d499df38 R08: 0000000000000000 R09: ffffed103b663ee7 R10: ffffed103b663ee6 R11: ffff8881db31f737 R12: ffffea0007526740 R13: ffffffff85698e79 R14: ffff8881d94e9800 R15: 0000000000000005 FS: 0000555556a29880(0000) GS:ffff8881db300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffc59564924 CR3: 00000001d4125000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400