================================================================== BUG: KASAN: slab-out-of-bounds in list_empty include/linux/list.h:189 [inline] BUG: KASAN: slab-out-of-bounds in sg_remove_request+0xf9/0x110 drivers/scsi/sg.c:2130 Read of size 8 at addr ffff8801cd34c340 by task syzkaller684860/3328 CPU: 0 PID: 3328 Comm: syzkaller684860 Not tainted 4.4.111-gc2f631b #20 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 bc605937ca7bafe2 ffff8801d07af970 ffffffff81d0513d ffffea000734d300 ffff8801cd34c340 0000000000000000 ffff8801cd34c340 ffff8801d079c438 ffff8801d07af9a8 ffffffff814fd433 ffff8801cd34c340 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:2130 [] sg_finish_rem_req+0x295/0x340 drivers/scsi/sg.c:1848 [] sg_read+0xa21/0x1490 drivers/scsi/sg.c:538 [] do_loop_readv_writev+0x141/0x1e0 fs/read_write.c:680 [] compat_do_readv_writev+0x5df/0x6e0 fs/read_write.c:984 [] compat_readv+0xd9/0x140 fs/read_write.c:1013 [] C_SYSC_readv fs/read_write.c:1033 [inline] [] compat_SyS_readv+0xd8/0x1b0 fs/read_write.c:1022 [] do_syscall_32_irqs_on arch/x86/entry/common.c:390 [inline] [] do_fast_syscall_32+0x314/0x890 arch/x86/entry/common.c:457 [] sysenter_flags_fixed+0xd/0x17 Allocated by task 0: (stack is not available) Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff8801cd34c300 which belongs to the cache fasync_cache of size 96 The buggy address is located 64 bytes inside of 96-byte region [ffff8801cd34c300, ffff8801cd34c360) 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: 1 PID: 3327 Comm: syzkaller684860 Not tainted 4.4.111-gc2f631b #20 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8800b5644740 task.stack: ffff8801d0a08000 RIP: 0010:[] [] __rb_insert lib/rbtree.c:120 [inline] RIP: 0010:[] [] rb_insert_color+0x9f/0xcb0 lib/rbtree.c:420 RSP: 0018:ffff8801db307d18 EFLAGS: 00010003 RAX: 0a0508a8e82a0be9 RBX: ffffffff838a8360 RCX: ffffffff838a8360 RDX: 1ffffffff071506d RSI: ffff8801db319710 RDI: ffff8801db319c40 RBP: ffff8801db307d60 R08: ffffffff857d0748 R09: 0000000000000001 R10: 0000000000000000 R11: 1ffff1003b660f62 R12: ffff8801d077fdf8 R13: 5028454741505f4e R14: ffff8801db319c40 R15: dffffc0000000000 FS: 0000000000000000(0000) GS:ffff8801db300000(0063) knlGS:00000000f773bb40 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 000000002047cff7 CR3: 00000001d1b48000 CR4: 0000000000160670 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: ffffffff842bcb20 ffff8800b5644fb0 0000000000000001 ffff8801db307d70 ffff8801db319c40 dffffc0000000000 0000000000000000 ffff8801db319710 ffff8801d077fe00 ffff8801db307db0 ffffffff81d22a07 ffff8801db319c58 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:725 [] smp_call_function_many+0x481/0x710 kernel/smp.c:435 [] native_flush_tlb_others+0xfe/0x710 arch/x86/mm/tlb.c:292 [] flush_tlb_others arch/x86/include/asm/paravirt.h:338 [inline] [] flush_tlb_mm_range+0x103/0x560 arch/x86/mm/tlb.c:358 [] tlb_flush_mmu_tlbonly+0x185/0x2f0 mm/memory.c:242 [] tlb_flush_mmu mm/memory.c:263 [inline] [] tlb_finish_mmu+0x1b/0xa0 mm/memory.c:275 [] unmap_region+0x250/0x330 mm/mmap.c:2468 [] do_munmap+0x70f/0xec0 mm/mmap.c:2662 [] mmap_region+0x423/0x1250 mm/mmap.c:1605 [] do_mmap+0x4fd/0x9d0 mm/mmap.c:1441 [] do_mmap_pgoff include/linux/mm.h:1915 [inline] [] vm_mmap_pgoff+0x16e/0x1c0 mm/util.c:272 [] SYSC_mmap_pgoff mm/mmap.c:1491 [inline] [] SyS_mmap_pgoff+0xd0/0x560 mm/mmap.c:1449 [] do_syscall_32_irqs_on arch/x86/entry/common.c:390 [inline] [] do_fast_syscall_32+0x314/0x890 arch/x86/entry/common.c:457 [] sysenter_flags_fixed+0xd/0x17 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 10b782937b787297 ]---