nla_parse: 1 callbacks suppressed netlink: 20 bytes leftover after parsing attributes in process `syz-executor.1'. BUG: sleeping function called from invalid context at kernel/locking/mutex.c:908 in_atomic(): 1, irqs_disabled(): 0, pid: 22418, name: udevd 2 locks held by udevd/22418: #0: 00000000cf789e77 (&sig->cred_guard_mutex){+.+.}, at: prepare_bprm_creds+0x55/0x120 fs/exec.c:1404 #1: 000000005bc10ff9 ((&sp->resync_t)){+.-.}, at: lockdep_copy_map include/linux/lockdep.h:168 [inline] #1: 000000005bc10ff9 ((&sp->resync_t)){+.-.}, at: call_timer_fn+0xda/0x720 kernel/time/timer.c:1316 Preemption disabled at: [] preempt_schedule_irq+0x88/0x140 kernel/sched/core.c:3740 CPU: 1 PID: 22418 Comm: udevd Not tainted 4.19.99-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 netlink: 20 bytes leftover after parsing attributes in process `syz-executor.2'. Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x197/0x210 lib/dump_stack.c:118 ___might_sleep.cold+0x1bd/0x1f6 kernel/sched/core.c:6192 __might_sleep+0x95/0x190 kernel/sched/core.c:6145 __mutex_lock_common kernel/locking/mutex.c:908 [inline] __mutex_lock+0xc8/0x1300 kernel/locking/mutex.c:1072 netlink: 20 bytes leftover after parsing attributes in process `syz-executor.2'. mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1087 tpk_write+0x5d/0x340 drivers/char/ttyprintk.c:123 resync_tnc+0x1b6/0x320 drivers/net/hamradio/6pack.c:522 call_timer_fn+0x18d/0x720 kernel/time/timer.c:1326 expire_timers kernel/time/timer.c:1363 [inline] __run_timers kernel/time/timer.c:1684 [inline] __run_timers kernel/time/timer.c:1652 [inline] run_timer_softirq+0x64f/0x16a0 kernel/time/timer.c:1697 __do_softirq+0x25c/0x921 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x180/0x1d0 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x13b/0x550 arch/x86/kernel/apic/apic.c:1094 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:893 RIP: 0010:preempt_schedule_irq+0xab/0x140 kernel/sched/core.c:3742 Code: 00 00 e8 68 34 f5 f9 e8 23 90 1c fa 4c 89 f0 48 c1 e8 03 80 3c 18 00 75 6c 48 83 3d 66 a7 9e 01 00 74 5e fb 66 0f 1f 44 00 00 01 00 00 00 e8 8b d4 ff ff 48 c7 c0 50 57 f2 88 48 c1 e8 03 80 RSP: 0018:ffff88805b9e77f8 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff11e4aeb RBX: dffffc0000000000 RCX: 1ffff1100af3515c RDX: 0000000000000000 RSI: ffff8880579a8ac0 RDI: ffff8880579a8abc RBP: ffff88805b9e7818 R08: ffff8880579a8240 R09: ffff8880579a8ae0 R10: 0000000000000000 R11: 0000000000000000 R12: ffffed100af35048 R13: ffff8880579a8240 R14: ffffffff88f25758 R15: 0000000000000000 retint_kernel+0x1b/0x2d RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:789 [inline] RIP: 0010:kmem_cache_free+0xab/0x260 mm/slab.c:3766 Code: e8 ea 31 00 00 84 c0 74 77 41 f7 c5 00 02 00 00 74 4f e8 28 d5 cd ff 48 83 3d 68 ec 4f 07 00 0f 84 ab 01 00 00 4c 89 ef 57 9d <0f> 1f 44 00 00 4c 8b 6d 08 0f 1f 44 00 00 65 8b 05 30 16 5f 7e 83 RSP: 0018:ffff88805b9e78d8 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff02 RAX: 0000000000000007 RBX: ffff888085be8850 RCX: 1ffff1100af3515c RDX: 0000000000000000 RSI: ffff8880579a8ac0 RDI: 0000000000000286 RBP: ffff88805b9e78f8 R08: ffff8880579a8240 R09: ffff8880579a8ae0 R10: 0000000000000000 R11: 0000000000000000 R12: ffff88821bc334c0 R13: 0000000000000286 R14: ffffffff8199d9b7 R15: ffff88808e400068 anon_vma_chain_free mm/rmap.c:134 [inline] unlink_anon_vmas+0x487/0x860 mm/rmap.c:419 free_pgtables+0x1af/0x2f0 mm/memory.c:640 exit_mmap+0x2d1/0x530 mm/mmap.c:3092 __mmput kernel/fork.c:1015 [inline] mmput+0x15f/0x4c0 kernel/fork.c:1036 exec_mmap fs/exec.c:1043 [inline] flush_old_exec+0x8d9/0x1c20 fs/exec.c:1276 load_elf_binary+0x9c0/0x53a0 fs/binfmt_elf.c:869 search_binary_handler fs/exec.c:1653 [inline] search_binary_handler+0x179/0x570 fs/exec.c:1631 exec_binprm fs/exec.c:1695 [inline] __do_execve_file.isra.0+0x1227/0x2150 fs/exec.c:1819 do_execveat_common fs/exec.c:1866 [inline] do_execve fs/exec.c:1883 [inline] __do_sys_execve fs/exec.c:1964 [inline] __se_sys_execve fs/exec.c:1959 [inline] __x64_sys_execve+0x8f/0xc0 fs/exec.c:1959 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7ff3da0cf207 Code: Bad RIP value. RSP: 002b:00007ffc11c00ea8 EFLAGS: 00000202 ORIG_RAX: 000000000000003b RAX: ffffffffffffffda RBX: 00000000ffffffff RCX: 00007ff3da0cf207 RDX: 00000000020b09f0 RSI: 00007ffc11c00fa0 RDI: 00007ffc11c01fb0 RBP: 0000000000625500 R08: 0000000000001faa R09: 0000000000001faa R10: 0000000000000000 R11: 0000000000000202 R12: 00000000020b09f0 R13: 0000000000000007 R14: 0000000001f1f030 R15: 0000000000000005 ================================ WARNING: inconsistent lock state 4.19.99-syzkaller #0 Tainted: G W -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. udevd/22418 [HC0[0]:SC1[1]:HE1:SE0] takes: 0000000027e9bb26 (&tpk_port.port_write_mutex){+.?.}, at: tpk_write+0x5d/0x340 drivers/char/ttyprintk.c:123 {SOFTIRQ-ON-W} state was registered at: lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:3903 __mutex_lock_common kernel/locking/mutex.c:925 [inline] __mutex_lock+0xf7/0x1300 kernel/locking/mutex.c:1072 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1087 tpk_close+0x50/0x95 drivers/char/ttyprintk.c:104 tty_release+0x3ba/0xe90 drivers/tty/tty_io.c:1678 __fput+0x2dd/0x8b0 fs/file_table.c:278 ____fput+0x16/0x20 fs/file_table.c:309 task_work_run+0x145/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x273/0x2c0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x53d/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe irq event stamp: 526 hardirqs last enabled at (526): [] trace_hardirqs_on_thunk+0x1a/0x1c hardirqs last disabled at (525): [] trace_hardirqs_off_thunk+0x1a/0x1c softirqs last enabled at (0): [] copy_process.part.0+0x15b2/0x7a60 kernel/fork.c:1840 softirqs last disabled at (433): [] invoke_softirq kernel/softirq.c:372 [inline] softirqs last disabled at (433): [] irq_exit+0x180/0x1d0 kernel/softirq.c:412 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&tpk_port.port_write_mutex); lock(&tpk_port.port_write_mutex); *** DEADLOCK *** 2 locks held by udevd/22418: #0: 00000000cf789e77 (&sig->cred_guard_mutex){+.+.}, at: prepare_bprm_creds+0x55/0x120 fs/exec.c:1404 #1: 000000005bc10ff9 ((&sp->resync_t)){+.-.}, at: lockdep_copy_map include/linux/lockdep.h:168 [inline] #1: 000000005bc10ff9 ((&sp->resync_t)){+.-.}, at: call_timer_fn+0xda/0x720 kernel/time/timer.c:1316 stack backtrace: CPU: 1 PID: 22418 Comm: udevd Tainted: G W 4.19.99-syzkaller #0 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+0x197/0x210 lib/dump_stack.c:118 print_usage_bug.cold+0x330/0x42a kernel/locking/lockdep.c:2540 valid_state kernel/locking/lockdep.c:2553 [inline] mark_lock_irq kernel/locking/lockdep.c:2747 [inline] mark_lock+0xd1b/0x1370 kernel/locking/lockdep.c:3127 mark_irqflags kernel/locking/lockdep.c:3005 [inline] __lock_acquire+0xc62/0x49c0 kernel/locking/lockdep.c:3368 lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:3903 __mutex_lock_common kernel/locking/mutex.c:925 [inline] __mutex_lock+0xf7/0x1300 kernel/locking/mutex.c:1072 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1087 tpk_write+0x5d/0x340 drivers/char/ttyprintk.c:123 resync_tnc+0x1b6/0x320 drivers/net/hamradio/6pack.c:522 call_timer_fn+0x18d/0x720 kernel/time/timer.c:1326 expire_timers kernel/time/timer.c:1363 [inline] __run_timers kernel/time/timer.c:1684 [inline] __run_timers kernel/time/timer.c:1652 [inline] run_timer_softirq+0x64f/0x16a0 kernel/time/timer.c:1697 __do_softirq+0x25c/0x921 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x180/0x1d0 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x13b/0x550 arch/x86/kernel/apic/apic.c:1094 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:893 RIP: 0010:preempt_schedule_irq+0xab/0x140 kernel/sched/core.c:3742 Code: 00 00 e8 68 34 f5 f9 e8 23 90 1c fa 4c 89 f0 48 c1 e8 03 80 3c 18 00 75 6c 48 83 3d 66 a7 9e 01 00 74 5e fb 66 0f 1f 44 00 00 01 00 00 00 e8 8b d4 ff ff 48 c7 c0 50 57 f2 88 48 c1 e8 03 80 RSP: 0018:ffff88805b9e77f8 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff11e4aeb RBX: dffffc0000000000 RCX: 1ffff1100af3515c RDX: 0000000000000000 RSI: ffff8880579a8ac0 RDI: ffff8880579a8abc RBP: ffff88805b9e7818 R08: ffff8880579a8240 R09: ffff8880579a8ae0 R10: 0000000000000000 R11: 0000000000000000 R12: ffffed100af35048 R13: ffff8880579a8240 R14: ffffffff88f25758 R15: 0000000000000000 retint_kernel+0x1b/0x2d RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:789 [inline] RIP: 0010:kmem_cache_free+0xab/0x260 mm/slab.c:3766 Code: e8 ea 31 00 00 84 c0 74 77 41 f7 c5 00 02 00 00 74 4f e8 28 d5 cd ff 48 83 3d 68 ec 4f 07 00 0f 84 ab 01 00 00 4c 89 ef 57 9d <0f> 1f 44 00 00 4c 8b 6d 08 0f 1f 44 00 00 65 8b 05 30 16 5f 7e 83 RSP: 0018:ffff88805b9e78d8 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff02 RAX: 0000000000000007 RBX: ffff888085be8850 RCX: 1ffff1100af3515c RDX: 0000000000000000 RSI: ffff8880579a8ac0 RDI: 0000000000000286 RBP: ffff88805b9e78f8 R08: ffff8880579a8240 R09: ffff8880579a8ae0 R10: 0000000000000000 R11: 0000000000000000 R12: ffff88821bc334c0 R13: 0000000000000286 R14: ffffffff8199d9b7 R15: ffff88808e400068 anon_vma_chain_free mm/rmap.c:134 [inline] unlink_anon_vmas+0x487/0x860 mm/rmap.c:419 free_pgtables+0x1af/0x2f0 mm/memory.c:640 exit_mmap+0x2d1/0x530 mm/mmap.c:3092 __mmput kernel/fork.c:1015 [inline] mmput+0x15f/0x4c0 kernel/fork.c:1036 exec_mmap fs/exec.c:1043 [inline] flush_old_exec+0x8d9/0x1c20 fs/exec.c:1276 load_elf_binary+0x9c0/0x53a0 fs/binfmt_elf.c:869 search_binary_handler fs/exec.c:1653 [inline] search_binary_handler+0x179/0x570 fs/exec.c:1631 exec_binprm fs/exec.c:1695 [inline] __do_execve_file.isra.0+0x1227/0x2150 fs/exec.c:1819 do_execveat_common fs/exec.c:1866 [inline] do_execve fs/exec.c:1883 [inline] __do_sys_execve fs/exec.c:1964 [inline] __se_sys_execve fs/exec.c:1959 [inline] __x64_sys_execve+0x8f/0xc0 fs/exec.c:1959 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7ff3da0cf207 Code: Bad RIP value. RSP: 002b:00007ffc11c00ea8 EFLAGS: 00000202 ORIG_RAX: 000000000000003b RAX: ffffffffffffffda RBX: 00000000ffffffff RCX: 00007ff3da0cf207 RDX: 00000000020b09f0 RSI: 00007ffc11c00fa0 RDI: 00007ffc11c01fb0 RBP: 0000000000625500 R08: 0000000000001faa R09: 0000000000001faa R10: 0000000000000000 R11: 0000000000000202 R12: 00000000020b09f0 R13: 0000000000000007 R14: 0000000001f1f030 R15: 0000000000000005 NOHZ: local_softirq_pending 08 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=52320 sclass=netlink_route_socket pig=22488 comm=syz-executor.1 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=22151 sclass=netlink_route_socket pig=22537 comm=syz-executor.1 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=22151 sclass=netlink_route_socket pig=22537 comm=syz-executor.1 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=5 sclass=netlink_route_socket pig=22600 comm=syz-executor.2 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=22618 comm=syz-executor.1 netlink: 20 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 20 bytes leftover after parsing attributes in process `syz-executor.1'. netlink: 20 bytes leftover after parsing attributes in process `syz-executor.1'. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=5 sclass=netlink_route_socket pig=22741 comm=syz-executor.2 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=32451 sclass=netlink_route_socket pig=22878 comm=syz-executor.1 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=32451 sclass=netlink_route_socket pig=22878 comm=syz-executor.1 BUG: sleeping function called from invalid context at kernel/locking/mutex.c:908 in_atomic(): 1, irqs_disabled(): 0, pid: 23023, name: syz-executor.0 INFO: lockdep is turned off. Preemption disabled at: [] __do_softirq+0xf3/0x921 kernel/softirq.c:269 CPU: 1 PID: 23023 Comm: syz-executor.0 Tainted: G W 4.19.99-syzkaller #0 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+0x197/0x210 lib/dump_stack.c:118 ___might_sleep.cold+0x1bd/0x1f6 kernel/sched/core.c:6192 __might_sleep+0x95/0x190 kernel/sched/core.c:6145 __mutex_lock_common kernel/locking/mutex.c:908 [inline] __mutex_lock+0xc8/0x1300 kernel/locking/mutex.c:1072 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:1087 tpk_write+0x5d/0x340 drivers/char/ttyprintk.c:123 resync_tnc+0x1b6/0x320 drivers/net/hamradio/6pack.c:522 call_timer_fn+0x18d/0x720 kernel/time/timer.c:1326 expire_timers kernel/time/timer.c:1363 [inline] __run_timers kernel/time/timer.c:1684 [inline] __run_timers kernel/time/timer.c:1652 [inline] run_timer_softirq+0x64f/0x16a0 kernel/time/timer.c:1697 __do_softirq+0x25c/0x921 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x180/0x1d0 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x13b/0x550 arch/x86/kernel/apic/apic.c:1094 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:893 RIP: 0010:arch_atomic_dec arch/x86/include/asm/atomic.h:110 [inline] RIP: 0010:atomic_dec include/asm-generic/atomic-instrumented.h:128 [inline] RIP: 0010:put_bh include/linux/buffer_head.h:289 [inline] RIP: 0010:__brelse+0x90/0xb0 fs/buffer.c:1141 Code: 87 e8 12 1c 84 ff 0f 0b e8 4d 8d b0 ff 5b 41 5c 41 5d 5d c3 e8 41 8d b0 ff be 04 00 00 00 4c 89 e7 e8 44 1b e8 ff f0 ff 4b 60 2b 8d b0 ff 5b 41 5c 41 5d 5d c3 4c 89 e7 e8 fc 2b e8 ff eb a2 RSP: 0018:ffff88805c32faf0 EFLAGS: 00000202 ORIG_RAX: ffffffffffffff13 RAX: ffffed100ad53909 RBX: ffff888056a9c7e0 RCX: ffffffff81ba775c RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffff888056a9c840 RBP: ffff88805c32fb08 R08: 1ffff1100ad53908 R09: ffffed100ad53909 R10: ffffed100ad53908 R11: ffff888056a9c843 R12: ffff888056a9c840 R13: 0000000000000002 R14: ffff88805c32fcb8 R15: ffff888056a9c7e0 brelse include/linux/buffer_head.h:295 [inline] recently_deleted fs/ext4/ialloc.c:707 [inline] find_inode_bit.isra.0+0x397/0x510 fs/ext4/ialloc.c:722 __ext4_new_inode+0x14b0/0x52d0 fs/ext4/ialloc.c:914 ext4_symlink+0x3f8/0xbe0 fs/ext4/namei.c:3128 vfs_symlink fs/namei.c:4126 [inline] vfs_symlink+0x373/0x5c0 fs/namei.c:4112 do_symlinkat+0x22b/0x290 fs/namei.c:4153 __do_sys_symlink fs/namei.c:4172 [inline] __se_sys_symlink fs/namei.c:4170 [inline] __x64_sys_symlink+0x59/0x80 fs/namei.c:4170 do_syscall_64+0xfd/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45b077 Code: 0f 1f 00 b8 5c 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 6d b9 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 b8 58 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 4d b9 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffc61e1d848 EFLAGS: 00000206 ORIG_RAX: 0000000000000058 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000045b077 RDX: 00007ffc61e1d8e7 RSI: 00000000004c0ee4 RDI: 00007ffc61e1d8d0 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000017 R10: 0000000000000075 R11: 0000000000000206 R12: 0000000000000000 R13: 00007ffc61e1d880 R14: 0000000000000000 R15: 00007ffc61e1d890 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=1052 sclass=netlink_route_socket pig=23107 comm=syz-executor.2 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=1052 sclass=netlink_route_socket pig=23107 comm=syz-executor.2 netlink: 20 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 20 bytes leftover after parsing attributes in process `syz-executor.2'. audit: type=1400 audit(1580235381.183:75): avc: denied { map } for pid=23219 comm="syz-executor.2" path="pipe:[91221]" dev="pipefs" ino=91221 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=fifo_file permissive=1 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=17492 sclass=netlink_route_socket pig=23308 comm=syz-executor.2 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=16269 sclass=netlink_route_socket pig=23315 comm=syz-executor.5 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=18023 sclass=netlink_route_socket pig=23327 comm=syz-executor.2