================================================================== BUG: KASAN: slab-out-of-bounds in __lock_acquire+0x2eff/0x3640 kernel/locking/lockdep.c:3224 at addr ffff8801ce6af1f8 Read of size 8 by task syz-executor4/6120 CPU: 0 PID: 6120 Comm: syz-executor4 Not tainted 4.9.68-gfb66dc2 #3 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801c99777b0 ffffffff81d90889 ffff8801d6758000 ffff8801ce6af180 ffff8801ce6af1e0 ffffed0039cd5e3f ffff8801ce6af1f8 ffff8801c99777d8 ffffffff8153a44c ffffed0039cd5e3f ffff8801d6758000 0000000000000000 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] kasan_object_err+0x1c/0x70 mm/kasan/report.c:160 [] print_address_description mm/kasan/report.c:198 [inline] [] kasan_report_error mm/kasan/report.c:287 [inline] [] kasan_report.part.1+0x21c/0x500 mm/kasan/report.c:309 [] kasan_report mm/kasan/report.c:330 [inline] [] __asan_report_load8_noabort+0x29/0x30 mm/kasan/report.c:330 [] __lock_acquire+0x2eff/0x3640 kernel/locking/lockdep.c:3224 [] lock_acquire+0x12e/0x410 kernel/locking/lockdep.c:3756 [] __raw_write_lock_irqsave include/linux/rwlock_api_smp.h:186 [inline] [] _raw_write_lock_irqsave+0x4e/0x62 kernel/locking/spinlock.c:303 [] sg_remove_request+0x70/0x120 drivers/scsi/sg.c:2122 [] sg_finish_rem_req+0x295/0x340 drivers/scsi/sg.c:1838 [] sg_read+0xa1c/0x1440 drivers/scsi/sg.c:527 [] __vfs_read+0x103/0x670 fs/read_write.c:452 [] vfs_read+0x11e/0x380 fs/read_write.c:475 [] SYSC_read fs/read_write.c:591 [inline] [] SyS_read+0xd9/0x1b0 fs/read_write.c:584 [] do_syscall_32_irqs_on arch/x86/entry/common.c:322 [inline] [] do_fast_syscall_32+0x2f7/0x890 arch/x86/entry/common.c:384 [] entry_SYSENTER_compat+0x51/0x60 arch/x86/entry/entry_64_compat.S:124 Object at ffff8801ce6af180, in cache fasync_cache size: 96 Allocated: PID = 6120 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:495 set_track mm/kasan/kasan.c:507 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:598 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:537 slab_post_alloc_hook mm/slab.h:417 [inline] slab_alloc_node mm/slub.c:2715 [inline] slab_alloc mm/slub.c:2723 [inline] kmem_cache_alloc+0xba/0x290 mm/slub.c:2728 fasync_alloc fs/fcntl.c:604 [inline] fasync_add_entry fs/fcntl.c:662 [inline] fasync_helper+0x37/0xb0 fs/fcntl.c:691 sg_fasync+0x86/0xb0 drivers/scsi/sg.c:1203 setfl fs/fcntl.c:70 [inline] do_fcntl fs/fcntl.c:267 [inline] SYSC_fcntl fs/fcntl.c:372 [inline] SyS_fcntl+0x658/0xc70 fs/fcntl.c:357 C_SYSC_fcntl64 fs/compat.c:469 [inline] compat_SyS_fcntl64+0xce/0x4f0 fs/compat.c:403 do_syscall_32_irqs_on arch/x86/entry/common.c:322 [inline] do_fast_syscall_32+0x2f7/0x890 arch/x86/entry/common.c:384 entry_SYSENTER_compat+0x51/0x60 arch/x86/entry/entry_64_compat.S:124 Freed: PID = 14830 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:495 set_track mm/kasan/kasan.c:507 [inline] kasan_slab_free+0x73/0xc0 mm/kasan/kasan.c:571 slab_free_hook mm/slub.c:1355 [inline] slab_free_freelist_hook mm/slub.c:1377 [inline] slab_free mm/slub.c:2958 [inline] kmem_cache_free+0xb2/0x2e0 mm/slub.c:2980 fasync_free_rcu+0x1d/0x20 fs/fcntl.c:563 __rcu_reclaim kernel/rcu/rcu.h:118 [inline] rcu_do_batch kernel/rcu/tree.c:2789 [inline] invoke_rcu_callbacks kernel/rcu/tree.c:3053 [inline] __rcu_process_callbacks kernel/rcu/tree.c:3020 [inline] rcu_process_callbacks+0x871/0x12c0 kernel/rcu/tree.c:3037 __do_softirq+0x206/0x951 kernel/softirq.c:284 Memory state around the buggy address: ffff8801ce6af080: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff8801ce6af100: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc >ffff8801ce6af180: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ^ ffff8801ce6af200: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ffff8801ce6af280: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ================================================================== 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: 0 PID: 6120 Comm: syz-executor4 Tainted: G B 4.9.68-gfb66dc2 #3 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8801ce474800 task.stack: ffff8801c9970000 RIP: 0010:[] [] __lock_acquire+0x194/0x3640 kernel/locking/lockdep.c:3234 RSP: 0018:ffff8801c9977880 EFLAGS: 00010086 RAX: dead4ead00000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 1ffff10039cd5e40 RSI: 0000000000000000 RDI: ffff8801ce6af200 RBP: ffff8801c9977a40 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000000 R11: ffff8801ce474800 R12: 0000000000000001 R13: 0000000000000001 R14: 0000000000000000 R15: ffff8801ce6af1f8 FS: 0000000000000000(0000) GS:ffff8801db200000(0063) knlGS:00000000f77f4b40 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 0000000020fbff8c CR3: 00000001d0dec000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: ffffffff814cb7a0 0000000000000004 ffff8801ce474800 ffffed0039c8ea15 dffffc0000000000 ffff8801ca05bac0 0000000000000000 ffff8801ce4750b0 ffff8801ce475088 ffff8801c9977980 0000000000000246 ffff8801ce474800 Call Trace: [] lock_acquire+0x12e/0x410 kernel/locking/lockdep.c:3756 [] __raw_write_lock_irqsave include/linux/rwlock_api_smp.h:186 [inline] [] _raw_write_lock_irqsave+0x4e/0x62 kernel/locking/spinlock.c:303 [] sg_remove_request+0x70/0x120 drivers/scsi/sg.c:2122 [] sg_finish_rem_req+0x295/0x340 drivers/scsi/sg.c:1838 [] sg_read+0xa1c/0x1440 drivers/scsi/sg.c:527 [] __vfs_read+0x103/0x670 fs/read_write.c:452 [] vfs_read+0x11e/0x380 fs/read_write.c:475 [] SYSC_read fs/read_write.c:591 [inline] [] SyS_read+0xd9/0x1b0 fs/read_write.c:584 [] do_syscall_32_irqs_on arch/x86/entry/common.c:322 [inline] [] do_fast_syscall_32+0x2f7/0x890 arch/x86/entry/common.c:384 [] entry_SYSENTER_compat+0x51/0x60 arch/x86/entry/entry_64_compat.S:124 Code: 9e ff ff 44 8b 94 24 98 00 00 00 48 85 c0 8b 8c 24 90 00 00 00 44 8b 8c 24 88 00 00 00 4c 8b 9c 24 80 00 00 00 0f 84 ff 07 00 00 ff 80 98 01 00 00 49 8d b3 a8 08 00 00 48 ba 00 00 00 00 00 RIP [] __lock_acquire+0x194/0x3640 kernel/locking/lockdep.c:3234 RSP ---[ end trace 0d386af223be3ab1 ]---