================================================================== BUG: KASAN: out-of-bounds in list_empty include/linux/list.h:189 [inline] BUG: KASAN: out-of-bounds in sg_remove_request+0xf9/0x110 drivers/scsi/sg.c:2120 Read of size 8 at addr ffff8801cedba6c0 by task syzkaller707326/8124 CPU: 1 PID: 8124 Comm: syzkaller707326 Not tainted 4.4.113-g962d1f3 #2 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 608eba61c4baec3c ffff8801cdc2fab0 ffffffff81d028ed ffffea00073b6e80 ffff8801cedba6c0 0000000000000000 ffff8801cedba6c8 ffff8800b1430238 ffff8801cdc2fae8 ffffffff814fd1c3 ffff8801cedba6c0 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x124 lib/dump_stack.c:51 [] print_address_description+0x73/0x260 mm/kasan/report.c:252 [] kasan_report_error mm/kasan/report.c:351 [inline] [] kasan_report+0x285/0x370 mm/kasan/report.c:408 [] __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:429 [] list_empty include/linux/list.h:189 [inline] [] sg_remove_request+0xf9/0x110 drivers/scsi/sg.c:2120 [] sg_finish_rem_req+0x295/0x340 drivers/scsi/sg.c:1837 [] sg_read+0xa1b/0x1490 drivers/scsi/sg.c:537 [] __vfs_read+0x103/0x440 fs/read_write.c:432 [] vfs_read+0x123/0x3a0 fs/read_write.c:454 [] SYSC_read fs/read_write.c:569 [inline] [] SyS_read+0xd9/0x1b0 fs/read_write.c:562 [] entry_SYSCALL_64_fastpath+0x1c/0x98 Allocated by task 8143: [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63 [] save_stack+0x43/0xd0 mm/kasan/kasan.c:512 [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:616 [] kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:554 [] slab_post_alloc_hook mm/slub.c:1349 [inline] [] slab_alloc_node mm/slub.c:2615 [inline] [] slab_alloc mm/slub.c:2623 [inline] [] kmem_cache_alloc+0xba/0x290 mm/slub.c:2628 [] fasync_alloc fs/fcntl.c:603 [inline] [] fasync_add_entry fs/fcntl.c:661 [inline] [] fasync_helper+0x37/0xb0 fs/fcntl.c:690 [] sg_fasync+0x86/0xb0 drivers/scsi/sg.c:1202 [] ioctl_fioasync fs/ioctl.c:511 [inline] [] do_vfs_ioctl+0x981/0xee0 fs/ioctl.c:576 [] SYSC_ioctl fs/ioctl.c:622 [inline] [] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:613 [] entry_SYSCALL_64_fastpath+0x1c/0x98 Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff8801cedba680 which belongs to the cache fasync_cache of size 96 The buggy address is located 64 bytes inside of 96-byte region [ffff8801cedba680, ffff8801cedba6e0) The buggy address belongs to the page: kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory accessgeneral protection fault: 0000 [#1] PREEMPT SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.4.113-g962d1f3 #2 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffffffff84217840 task.stack: ffffffff84200000 RIP: 0010:[] [] __rb_insert lib/rbtree.c:120 [inline] RIP: 0010:[] [] rb_insert_color+0x9f/0xcb0 lib/rbtree.c:420 RSP: 0000:ffff8801db207d18 EFLAGS: 00010003 RAX: 0a0508a8e82a0be9 RBX: ffffffff838a8de0 RCX: ffffffff838a8de0 RDX: 1ffffffff07151bd RSI: ffff8801db219710 RDI: ffff8801db219c40 RBP: ffff8801db207d60 R08: ffffffff8580af08 R09: 0000000000000001 R10: 0000000000000000 R11: 1ffff1003b640f62 R12: ffff8801c944fdf8 R13: 5028454741505f4e R14: ffff8801db219c40 R15: dffffc0000000000 FS: 0000000000000000(0000) GS:ffff8801db200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffff8148fa51 CR3: 000000000420c000 CR4: 0000000000160670 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: ffffffff842bdb20 ffffffff842180b0 0000000000000000 ffff8801db207d70 ffff8801db219c40 dffffc0000000000 0000000000000000 ffff8801db219710 ffff8801c944fe00 ffff8801db207db0 ffffffff81d201c7 ffff8801db219c58 Call Trace: [] timerqueue_add+0x157/0x2a0 lib/timerqueue.c:57 [] enqueue_hrtimer+0x168/0x450 kernel/time/hrtimer.c:890 [] __run_hrtimer kernel/time/hrtimer.c:1268 [inline] [] __hrtimer_run_queues+0x732/0xfe0 kernel/time/hrtimer.c:1317 [] hrtimer_interrupt+0x1a6/0x440 kernel/time/hrtimer.c:1351 [] local_apic_timer_interrupt+0x6a/0xb0 arch/x86/kernel/apic/apic.c:901 [] smp_apic_timer_interrupt+0x76/0xa0 arch/x86/kernel/apic/apic.c:925 [] apic_timer_interrupt+0xa0/0xb0 arch/x86/entry/entry_64.S:737 [] arch_safe_halt arch/x86/include/asm/paravirt.h:117 [inline] [] default_idle+0x55/0x3c0 arch/x86/kernel/process.c:291 [] arch_cpu_idle+0xa/0x10 arch/x86/kernel/process.c:282 [] default_idle_call+0x48/0x70 kernel/sched/idle.c:93 [] cpuidle_idle_call kernel/sched/idle.c:157 [inline] [] cpu_idle_loop kernel/sched/idle.c:253 [inline] [] cpu_startup_entry+0x5fd/0x8f0 kernel/sched/idle.c:301 [] rest_init+0x189/0x190 init/main.c:410 [] start_kernel+0x6b9/0x6ee init/main.c:682 [] x86_64_start_reservations+0x2a/0x2c arch/x86/kernel/head64.c:196 [] x86_64_start_kernel+0x140/0x163 arch/x86/kernel/head64.c:185 Code: 48 89 c2 48 c1 ea 03 42 80 3c 3a 00 0f 85 94 09 00 00 4c 8b 6b 08 4d 39 e5 0f 84 b0 01 00 00 4d 85 ed 74 1d 4c 89 e8 48 c1 e8 03 <42> 80 3c 38 00 0f 85 95 09 00 00 41 f6 45 00 01 0f 84 20 03 00 RIP [] __rb_insert lib/rbtree.c:120 [inline] RIP [] rb_insert_color+0x9f/0xcb0 lib/rbtree.c:420 RSP ---[ end trace 9220861b03f03b05 ]---