================================================================== BUG: KASAN: slab-out-of-bounds in __lock_acquire+0x2eff/0x3640 kernel/locking/lockdep.c:3224 at addr ffff8801c895bf78 Read of size 8 by task syz-executor4/8532 CPU: 1 PID: 8532 Comm: syz-executor4 Not tainted 4.9.60-gdfe0a9b #81 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801c4bcf810 ffffffff81d91389 ffff8801d77fd500 ffff8801c895bf00 ffff8801c895bf60 ffffed003912b7ef ffff8801c895bf78 ffff8801c4bcf838 ffffffff8153c1bc ffffed003912b7ef ffff8801d77fd500 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 ffff8801c895bf00, in cache fasync_cache size: 96 Allocated: PID = 8532 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 entry_SYSCALL_64_fastpath+0x23/0xc6 Freed: PID = 0 (stack is not available) Memory state around the buggy address: ffff8801c895be00: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff8801c895be80: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc >ffff8801c895bf00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ^ ffff8801c895bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801c895c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ================================================================== BUG: KASAN: slab-out-of-bounds in __lock_acquire+0x2c56/0x3640 kernel/locking/lockdep.c:3228 at addr ffff8801c895bf80 Read of size 8 by task syz-executor4/8532 CPU: 1 PID: 8532 Comm: syz-executor4 Tainted: G B 4.9.60-gdfe0a9b #81 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801c4bcf810 ffffffff81d91389 ffff8801d77fd500 ffff8801c895bf80 ffff8801c895bfe0 ffffed003912b7f0 ffff8801c895bf80 ffff8801c4bcf838 ffffffff8153c1bc ffffed003912b7f0 ffff8801d77fd500 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+0x2c56/0x3640 kernel/locking/lockdep.c:3228 [] 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 ffff8801c895bf80, in cache fasync_cache size: 96 Allocated: PID = 0 (stack is not available) Freed: PID = 0 (stack is not available) Memory state around the buggy address: ffff8801c895be80: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff8801c895bf00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc >ffff8801c895bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8801c895c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801c895c080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ================================================================== BUG: KASAN: slab-out-of-bounds in look_up_lock_class kernel/locking/lockdep.c:676 [inline] at addr ffff8801c895bf78 BUG: KASAN: slab-out-of-bounds in register_lock_class+0x1318/0x1340 kernel/locking/lockdep.c:726 at addr ffff8801c895bf78 Read of size 8 by task syz-executor4/8532 CPU: 1 PID: 8532 Comm: syz-executor4 Tainted: G B 4.9.60-gdfe0a9b #81 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801c4bcf788 ffffffff81d91389 ffff8801d77fd500 ffff8801c895bf00 ffff8801c895bf60 ffffed003912b7ef ffff8801c895bf78 ffff8801c4bcf7b0 ffffffff8153c1bc ffffed003912b7ef ffff8801d77fd500 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 [] look_up_lock_class kernel/locking/lockdep.c:676 [inline] [] register_lock_class+0x1318/0x1340 kernel/locking/lockdep.c:726 [] __lock_acquire+0x16c/0x3640 kernel/locking/lockdep.c:3233 [] 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 ffff8801c895bf00, in cache fasync_cache size: 96 Allocated: PID = 8532 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 entry_SYSCALL_64_fastpath+0x23/0xc6 Freed: PID = 0 (stack is not available) Memory state around the buggy address: ffff8801c895be00: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff8801c895be80: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc >ffff8801c895bf00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ^ ffff8801c895bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801c895c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ================================================================== BUG: KASAN: slab-out-of-bounds in register_lock_class+0x11e9/0x1340 kernel/locking/lockdep.c:733 at addr ffff8801c895bf78 Read of size 8 by task syz-executor4/8532 CPU: 1 PID: 8532 Comm: syz-executor4 Tainted: G B 4.9.60-gdfe0a9b #81 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801c4bcf788 ffffffff81d91389 ffff8801d77fd500 ffff8801c895bf00 ffff8801c895bf60 ffffed003912b7ef ffff8801c895bf78 ffff8801c4bcf7b0 ffffffff8153c1bc ffffed003912b7ef ffff8801d77fd500 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 [] register_lock_class+0x11e9/0x1340 kernel/locking/lockdep.c:733 [] __lock_acquire+0x16c/0x3640 kernel/locking/lockdep.c:3233 [] 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 ffff8801c895bf00, in cache fasync_cache size: 96 Allocated: PID = 8532 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 entry_SYSCALL_64_fastpath+0x23/0xc6 Freed: PID = 0 (stack is not available) Memory state around the buggy address: ffff8801c895be00: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff8801c895be80: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc >ffff8801c895bf00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ^ ffff8801c895bf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8801c895c000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 1 PID: 8532 Comm: syz-executor4 Tainted: G B 4.9.60-gdfe0a9b #81 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801c4bcf848 ffffffff81d91389 0000000000000000 000000000000018a ffff8801c895bf78 ffffffff8533acb0 0000000000000000 ffff8801c4bcf8d0 ffffffff81236ddc ffffffff8123e746 0000000000000092 0000000004c27225 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] register_lock_class+0x12cc/0x1340 kernel/locking/lockdep.c:738 [] __lock_acquire+0x16c/0x3640 kernel/locking/lockdep.c:3233 [] 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