attempt to access beyond end of device ------------[ cut here ]------------ loop2: rw=12288, want=8200, limit=20 ODEBUG: free active (active state 0) object type: percpu_counter hint: (null) attempt to access beyond end of device WARNING: CPU: 1 PID: 25611 at lib/debugobjects.c:329 debug_print_object+0x16a/0x210 lib/debugobjects.c:326 loop2: rw=12288, want=12296, limit=20 Kernel panic - not syncing: panic_on_warn set ... CPU: 1 PID: 25611 Comm: syz-executor4 Not tainted 4.19.0+ #76 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1c4/0x2b6 lib/dump_stack.c:113 panic+0x238/0x4e7 kernel/panic.c:184 __warn.cold.8+0x20/0x4a kernel/panic.c:536 report_bug+0x254/0x2d0 lib/bug.c:186 fixup_bug arch/x86/kernel/traps.c:178 [inline] do_error_trap+0x1fc/0x4d0 arch/x86/kernel/traps.c:296 kobject: 'loop1' (00000000f21e6f79): kobject_uevent_env kobject: 'loop1' (00000000f21e6f79): fill_kobj_path: path = '/devices/virtual/block/loop1' do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:316 invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:993 RIP: 0010:debug_print_object+0x16a/0x210 lib/debugobjects.c:326 Code: 40 88 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 92 00 00 00 48 8b 14 dd 40 9c 40 88 4c 89 fe 48 c7 c7 e0 91 40 88 e8 76 49 bb fd <0f> 0b 83 05 f9 bf 66 06 01 48 83 c4 18 5b 41 5c 41 5d 41 5e 41 5f audit: type=1400 audit(1540256658.527:153): avc: denied { map } for pid=25655 comm="modprobe" path="/bin/kmod" dev="sda1" ino=1440 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 RSP: 0018:ffff88017fbbf2b0 EFLAGS: 00010086 RAX: 0000000000000000 RBX: 0000000000000003 RCX: ffffc9000a131000 RDX: 0000000000040000 RSI: ffffffff8164d6a5 RDI: 0000000000000005 RBP: ffff88017fbbf2f0 R08: ffff8801b5726600 R09: fffffbfff12720b0 R10: fffffbfff12720b0 R11: ffffffff89390583 R12: 0000000000000001 R13: ffffffff89708700 R14: 0000000000000000 R15: ffffffff88409680 __debug_check_no_obj_freed lib/debugobjects.c:786 [inline] debug_check_no_obj_freed+0x3ae/0x58d lib/debugobjects.c:818 kfree+0xbd/0x230 mm/slab.c:3812 f2fs_fill_super+0xe13/0x8160 fs/f2fs/super.c:3145 audit: type=1400 audit(1540256658.527:154): avc: denied { map } for pid=25656 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 mount_bdev+0x30c/0x3e0 fs/super.c:1158 audit: type=1400 audit(1540256658.527:155): avc: denied { map } for pid=25656 comm="blkid" path="/sbin/blkid" dev="sda1" ino=16128 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 f2fs_mount+0x34/0x40 fs/f2fs/super.c:3159 mount_fs+0xae/0x31d fs/super.c:1261 vfs_kern_mount.part.35+0xdc/0x4f0 fs/namespace.c:961 vfs_kern_mount fs/namespace.c:951 [inline] do_new_mount fs/namespace.c:2457 [inline] do_mount+0x581/0x31f0 fs/namespace.c:2787 audit: type=1400 audit(1540256658.527:156): avc: denied { map } for pid=25656 comm="blkid" path="/lib/x86_64-linux-gnu/ld-2.13.so" dev="sda1" ino=2668 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 ksys_mount+0x12d/0x140 fs/namespace.c:3003 audit: type=1400 audit(1540256658.527:157): avc: denied { map } for pid=25656 comm="blkid" path="/lib/x86_64-linux-gnu/ld-2.13.so" dev="sda1" ino=2668 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 __do_sys_mount fs/namespace.c:3017 [inline] __se_sys_mount fs/namespace.c:3014 [inline] __x64_sys_mount+0xbe/0x150 fs/namespace.c:3014 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 audit: type=1400 audit(1540256658.527:158): avc: denied { map } for pid=25656 comm="blkid" path="/etc/ld.so.cache" dev="sda1" ino=2503 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459fda Code: b8 a6 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 7d 89 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 5a 89 fb ff c3 66 0f 1f 84 00 00 00 00 00 RSP: 002b:00007f03af9e0a88 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f03af9e0b30 RCX: 0000000000459fda audit: type=1400 audit(1540256658.527:159): avc: denied { map } for pid=25656 comm="blkid" path="/lib/x86_64-linux-gnu/libblkid.so.1.1.0" dev="sda1" ino=2825 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 RDX: 00007f03af9e0ad0 RSI: 0000000020000100 RDI: 00007f03af9e0af0 RBP: 0000000020000100 R08: 00007f03af9e0b30 R09: 00007f03af9e0ad0 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000007 R13: 0000000000000000 R14: 00000000004d7da0 R15: 00000000ffffffff Kernel Offset: disabled ====================================================== WARNING: possible circular locking dependency detected 4.19.0+ #76 Not tainted ------------------------------------------------------ syz-executor4/25611 is trying to acquire lock: 0000000050fdc329 ((console_sem).lock){-.-.}, at: down_trylock+0x13/0x70 kernel/locking/semaphore.c:136 but task is already holding lock: 000000007dc55454 (&obj_hash[i].lock){-.-.}, at: __debug_check_no_obj_freed lib/debugobjects.c:777 [inline] 000000007dc55454 (&obj_hash[i].lock){-.-.}, at: debug_check_no_obj_freed+0x17a/0x58d lib/debugobjects.c:818 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&obj_hash[i].lock){-.-.}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x99/0xd0 kernel/locking/spinlock.c:152 __debug_object_init+0x127/0x1290 lib/debugobjects.c:384 debug_object_init+0x16/0x20 lib/debugobjects.c:432 debug_hrtimer_init kernel/time/hrtimer.c:410 [inline] debug_init kernel/time/hrtimer.c:458 [inline] hrtimer_init+0x97/0x490 kernel/time/hrtimer.c:1308 init_dl_task_timer+0x1b/0x50 kernel/sched/deadline.c:1057 __sched_fork+0x2ae/0x590 kernel/sched/core.c:2160 init_idle+0x75/0x7a0 kernel/sched/core.c:5377 sched_init+0xb33/0xc02 kernel/sched/core.c:6060 start_kernel+0x47d/0x92f init/main.c:602 x86_64_start_reservations+0x29/0x2b arch/x86/kernel/head64.c:470 x86_64_start_kernel+0x76/0x79 arch/x86/kernel/head64.c:451 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243 -> #2 (&rq->lock){-.-.}: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2d/0x40 kernel/locking/spinlock.c:144 rq_lock kernel/sched/sched.h:1824 [inline] task_fork_fair+0xb0/0x6d0 kernel/sched/fair.c:9675 sched_fork+0x443/0xba0 kernel/sched/core.c:2353 copy_process+0x2586/0x8780 kernel/fork.c:1839 _do_fork+0x1cb/0x11d0 kernel/fork.c:2166 kernel_thread+0x34/0x40 kernel/fork.c:2225 rest_init+0x22/0xe5 init/main.c:408 start_kernel+0x8f4/0x92f init/main.c:739 x86_64_start_reservations+0x29/0x2b arch/x86/kernel/head64.c:470 x86_64_start_kernel+0x76/0x79 arch/x86/kernel/head64.c:451 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243 -> #1 (&p->pi_lock){-.-.}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x99/0xd0 kernel/locking/spinlock.c:152 try_to_wake_up+0xd2/0x12f0 kernel/sched/core.c:1960 wake_up_process+0x10/0x20 kernel/sched/core.c:2123 __up.isra.1+0x1c0/0x2a0 kernel/locking/semaphore.c:262 up+0x13c/0x1c0 kernel/locking/semaphore.c:187 __up_console_sem+0xbe/0x1b0 kernel/printk/printk.c:244 console_unlock+0x814/0x1160 kernel/printk/printk.c:2427 do_con_write+0x1356/0x23b0 drivers/tty/vt/vt.c:2770 con_write+0x25/0xc0 drivers/tty/vt/vt.c:3119 process_output_block drivers/tty/n_tty.c:580 [inline] n_tty_write+0x6c1/0x11a0 drivers/tty/n_tty.c:2317 do_tty_write drivers/tty/tty_io.c:958 [inline] tty_write+0x3f1/0x880 drivers/tty/tty_io.c:1042 __vfs_write+0x119/0x9f0 fs/read_write.c:485 vfs_write+0x1fc/0x560 fs/read_write.c:549 ksys_write+0x101/0x260 fs/read_write.c:598 __do_sys_write fs/read_write.c:610 [inline] __se_sys_write fs/read_write.c:607 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:607 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 ((console_sem).lock){-.-.}: lock_acquire+0x1ed/0x520 kernel/locking/lockdep.c:3900 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x99/0xd0 kernel/locking/spinlock.c:152 down_trylock+0x13/0x70 kernel/locking/semaphore.c:136 __down_trylock_console_sem+0xae/0x200 kernel/printk/printk.c:227 console_trylock+0x15/0xa0 kernel/printk/printk.c:2245 console_trylock_spinning kernel/printk/printk.c:1649 [inline] vprintk_emit+0x322/0x930 kernel/printk/printk.c:1921 vprintk_default+0x28/0x30 kernel/printk/printk.c:1963 vprintk_func+0x7e/0x181 kernel/printk/printk_safe.c:398 printk+0xa7/0xcf kernel/printk/printk.c:1996 __warn_printk+0x8c/0xe0 kernel/panic.c:590 debug_print_object+0x16a/0x210 lib/debugobjects.c:326 __debug_check_no_obj_freed lib/debugobjects.c:786 [inline] debug_check_no_obj_freed+0x3ae/0x58d lib/debugobjects.c:818 kfree+0xbd/0x230 mm/slab.c:3812 f2fs_fill_super+0xe13/0x8160 fs/f2fs/super.c:3145 mount_bdev+0x30c/0x3e0 fs/super.c:1158 f2fs_mount+0x34/0x40 fs/f2fs/super.c:3159 mount_fs+0xae/0x31d fs/super.c:1261 vfs_kern_mount.part.35+0xdc/0x4f0 fs/namespace.c:961 vfs_kern_mount fs/namespace.c:951 [inline] do_new_mount fs/namespace.c:2457 [inline] do_mount+0x581/0x31f0 fs/namespace.c:2787 ksys_mount+0x12d/0x140 fs/namespace.c:3003 __do_sys_mount fs/namespace.c:3017 [inline] __se_sys_mount fs/namespace.c:3014 [inline] __x64_sys_mount+0xbe/0x150 fs/namespace.c:3014 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Chain exists of: (console_sem).lock --> &rq->lock --> &obj_hash[i].lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&obj_hash[i].lock); lock(&rq->lock); lock(&obj_hash[i].lock); lock((console_sem).lock); *** DEADLOCK *** 2 locks held by syz-executor4/25611: #0: 00000000e83f657c (&type->s_umount_key#73/1){+.+.}, at: alloc_super fs/super.c:226 [inline] #0: 00000000e83f657c (&type->s_umount_key#73/1){+.+.}, at: sget_userns+0x2e5/0xf10 fs/super.c:519 #1: 000000007dc55454 (&obj_hash[i].lock){-.-.}, at: __debug_check_no_obj_freed lib/debugobjects.c:777 [inline] #1: 000000007dc55454 (&obj_hash[i].lock){-.-.}, at: debug_check_no_obj_freed+0x17a/0x58d lib/debugobjects.c:818 stack backtrace: CPU: 1 PID: 25611 Comm: syz-executor4 Not tainted 4.19.0+ #76 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1c4/0x2b6 lib/dump_stack.c:113 print_circular_bug.isra.33.cold.54+0x1bd/0x27d kernel/locking/lockdep.c:1221 check_prev_add kernel/locking/lockdep.c:1861 [inline] check_prevs_add kernel/locking/lockdep.c:1974 [inline] validate_chain kernel/locking/lockdep.c:2415 [inline] __lock_acquire+0x33e4/0x4ec0 kernel/locking/lockdep.c:3411 lock_acquire+0x1ed/0x520 kernel/locking/lockdep.c:3900 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x99/0xd0 kernel/locking/spinlock.c:152 down_trylock+0x13/0x70 kernel/locking/semaphore.c:136 __down_trylock_console_sem+0xae/0x200 kernel/printk/printk.c:227 console_trylock+0x15/0xa0 kernel/printk/printk.c:2245 console_trylock_spinning kernel/printk/printk.c:1649 [inline] vprintk_emit+0x322/0x930 kernel/printk/printk.c:1921 vprintk_default+0x28/0x30 kernel/printk/printk.c:1963 vprintk_func+0x7e/0x181 kernel/printk/printk_safe.c:398 printk+0xa7/0xcf kernel/printk/printk.c:1996 __warn_printk+0x8c/0xe0 kernel/panic.c:590 debug_print_object+0x16a/0x210 lib/debugobjects.c:326 __debug_check_no_obj_freed lib/debugobjects.c:786 [inline] debug_check_no_obj_freed+0x3ae/0x58d lib/debugobjects.c:818 kfree+0xbd/0x230 mm/slab.c:3812 f2fs_fill_super+0xe13/0x8160 fs/f2fs/super.c:3145 mount_bdev+0x30c/0x3e0 fs/super.c:1158 f2fs_mount+0x34/0x40 fs/f2fs/super.c:3159 mount_fs+0xae/0x31d fs/super.c:1261 vfs_kern_mount.part.35+0xdc/0x4f0 fs/namespace.c:961 vfs_kern_mount fs/namespace.c:951 [inline] do_new_mount fs/namespace.c:2457 [inline] do_mount+0x581/0x31f0 fs/namespace.c:2787 ksys_mount+0x12d/0x140 fs/namespace.c:3003 __do_sys_mount fs/namespace.c:3017 [inline] __se_sys_mount fs/namespace.c:3014 [inline] __x64_sys_mount+0xbe/0x150 fs/namespace.c:3014 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x459fda Code: b8 a6 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 7d 89 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 5a 89 fb ff c3 66 0f 1f 84 00 00 00 00 00 RSP: 002b:00007f03af9e0a88 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f03af9e0b30 RCX: 0000000000459fda RDX: 00007f03af9e0ad0 RSI: 0000000020000100 RDI: 00007f03af9e0af0 RBP: 0000000020000100 R08: 00007f03af9e0b30 R09: 00007f03af9e0ad0 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000007 R13: 00 Rebooting in 86400 seconds..