================================================================== BUG: KASAN: slab-out-of-bounds in __lock_acquire+0x2eff/0x3640 kernel/locking/lockdep.c:3224 at addr ffff8801a751e6f8 Read of size 8 by task syz-executor7/18786 CPU: 1 PID: 18786 Comm: syz-executor7 Not tainted 4.9.60-g4ca16e6 #83 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801cd20f810 ffffffff81d91389 ffff8801d74358c0 ffff8801a751e680 ffff8801a751e6e0 ffffed0034ea3cdf ffff8801a751e6f8 ffff8801cd20f838 ffffffff8153c1bc ffffed0034ea3cdf ffff8801d74358c0 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+0x91c/0x1400 drivers/scsi/sg.c:527 [] __vfs_read+0x103/0x670 fs/read_write.c:452 [] vfs_read+0x107/0x330 fs/read_write.c:475 [] SYSC_read fs/read_write.c:591 [inline] [] SyS_read+0xd9/0x1b0 fs/read_write.c:584 [] entry_SYSCALL_64_fastpath+0x23/0xc6 Object at ffff8801a751e680, in cache fasync_cache size: 96 Allocated: PID = 18786 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 ioctl_fioasync fs/ioctl.c:534 [inline] do_vfs_ioctl+0x2d8/0x10c0 fs/ioctl.c:639 SYSC_ioctl fs/ioctl.c:694 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:685 entry_SYSCALL_64_fastpath+0x23/0xc6 Freed: PID = 16494 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: ffff8801a751e580: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff8801a751e600: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc >ffff8801a751e680: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ^ ffff8801a751e700: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ffff8801a751e780: 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: 1 PID: 18786 Comm: syz-executor7 Tainted: G B 4.9.60-g4ca16e6 #83 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8801ab7f3000 task.stack: ffff8801cd208000 RIP: 0010:[] [] __lock_acquire+0x194/0x3640 kernel/locking/lockdep.c:3234 RSP: 0018:ffff8801cd20f8e0 EFLAGS: 00010086 RAX: dead4ead00000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 1ffff10034ea3ce0 RSI: 0000000000000000 RDI: ffff8801a751e700 RBP: ffff8801cd20faa0 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000000 R11: ffff8801ab7f3000 R12: 0000000000000001 R13: 0000000000000001 R14: 0000000000000000 R15: ffff8801a751e6f8 FS: 00007f957a884700(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000208ba000 CR3: 00000001a979c000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: 00000000024000c0 ffff8801a8e7e328 ffff8801da0018c0 ffff8801cd20fb28 ffffffff8153b503 0000004000000009 ffff8801cd20f920 ffffffff00000000 ffffffff8107c6a6 ffffffff8153b4a3 ffffffff8153b72d ffffffff815377eb 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+0x91c/0x1400 drivers/scsi/sg.c:527 [] __vfs_read+0x103/0x670 fs/read_write.c:452 [] vfs_read+0x107/0x330 fs/read_write.c:475 [] SYSC_read fs/read_write.c:591 [inline] [] SyS_read+0xd9/0x1b0 fs/read_write.c:584 [] entry_SYSCALL_64_fastpath+0x23/0xc6 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 a14cb7e43844afd4 ]---