nf_conntrack: default automatic helper assignment has been turned off for security reasons and CT-based firewall rule not found. Use the iptables CT target to attach helpers instead. ======================================================== WARNING: possible irq lock inversion dependency detected 5.9.0-rc2-syzkaller #0 Not tainted -------------------------------------------------------- syz-executor.1/10214 just changed the state of lock: ffff88811f506338 (&f->f_owner.lock){.+..}-{2:2}, at: send_sigurg+0x1d/0x200 fs/fcntl.c:824 but this lock was taken by another, HARDIRQ-safe lock in the past: (&dev->event_lock){-...}-{2:2} and interrupts could create inverse lock ordering between them. other info that might help us debug this: Chain exists of: &dev->event_lock --> &new->fa_lock --> &f->f_owner.lock Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&f->f_owner.lock); local_irq_disable(); lock(&dev->event_lock); lock(&new->fa_lock); lock(&dev->event_lock); *** DEADLOCK *** 1 lock held by syz-executor.1/10214: #0: ffff88812f390120 (sk_lock-AF_INET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1583 [inline] #0: ffff88812f390120 (sk_lock-AF_INET){+.+.}-{0:0}, at: inet_wait_for_connect net/ipv4/af_inet.c:596 [inline] #0: ffff88812f390120 (sk_lock-AF_INET){+.+.}-{0:0}, at: __inet_stream_connect+0x1ad/0x370 net/ipv4/af_inet.c:686 the shortest dependencies between 2nd lock and 1st lock: -> (&dev->event_lock){-...}-{2:2} { IN-HARDIRQ-W at: lock_acquire+0xb0/0x3a0 kernel/locking/lockdep.c:5020 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x33/0x50 kernel/locking/spinlock.c:159 input_event+0x33/0x70 drivers/input/input.c:440 input_report_key include/linux/input.h:417 [inline] psmouse_report_standard_buttons+0x1b/0x50 drivers/input/mouse/psmouse-base.c:123 psmouse_report_standard_packet drivers/input/mouse/psmouse-base.c:141 [inline] psmouse_process_byte+0x70/0x260 drivers/input/mouse/psmouse-base.c:232 psmouse_handle_byte+0xa/0x50 drivers/input/mouse/psmouse-base.c:274 psmouse_interrupt+0xc5/0x3f0 drivers/input/mouse/psmouse-base.c:426 serio_interrupt+0x3b/0x80 drivers/input/serio/serio.c:1002 i8042_interrupt+0x153/0x280 drivers/input/serio/i8042.c:598 __handle_irq_event_percpu+0x3c/0x320 kernel/irq/handle.c:156 handle_irq_event_percpu+0x2b/0x70 kernel/irq/handle.c:196 handle_irq_event+0x2f/0x4c kernel/irq/handle.c:213 handle_edge_irq+0x8f/0x1b0 kernel/irq/chip.c:819 asm_call_on_stack+0xf/0x20 arch/x86/entry/entry_64.S:706 __run_on_irqstack arch/x86/include/asm/irq_stack.h:22 [inline] run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:48 [inline] handle_irq arch/x86/kernel/irq.c:230 [inline] __common_interrupt arch/x86/kernel/irq.c:249 [inline] common_interrupt+0x159/0x220 arch/x86/kernel/irq.c:239 asm_common_interrupt+0x1e/0x40 arch/x86/include/asm/idtentry.h:572 native_safe_halt arch/x86/include/asm/irqflags.h:60 [inline] arch_safe_halt arch/x86/include/asm/irqflags.h:103 [inline] acpi_safe_halt.part.12+0x13/0x30 drivers/acpi/processor_idle.c:111 acpi_idle_enter+0x11f/0x350 drivers/acpi/processor_idle.c:650 cpuidle_enter_state+0x9d/0x780 drivers/cpuidle/cpuidle.c:243 cpuidle_enter+0x24/0x40 drivers/cpuidle/cpuidle.c:355 call_cpuidle kernel/sched/idle.c:132 [inline] cpuidle_idle_call kernel/sched/idle.c:213 [inline] do_idle+0x263/0x2b0 kernel/sched/idle.c:273 cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:369 start_secondary+0x11a/0x170 arch/x86/kernel/smpboot.c:266 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243 INITIAL USE at: lock_acquire+0xb0/0x3a0 kernel/locking/lockdep.c:5020 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x33/0x50 kernel/locking/spinlock.c:159 input_inject_event+0x44/0x1b6 drivers/input/input.c:466 led_trigger_event+0x3c/0x60 drivers/leds/led-triggers.c:387 kbd_led_trigger_activate+0x4b/0x60 drivers/tty/vt/keyboard.c:1005 led_trigger_set+0x1fc/0x300 drivers/leds/led-triggers.c:195 led_trigger_set_default+0x8b/0xb0 drivers/leds/led-triggers.c:259 led_classdev_register_ext+0x23d/0x310 drivers/leds/led-class.c:412 led_classdev_register include/linux/leds.h:190 [inline] input_leds_connect+0x177/0x2ff drivers/input/input-leds.c:139 input_attach_handler+0x68/0x90 drivers/input/input.c:1031 input_register_device.cold.22+0xa4/0x152 drivers/input/input.c:2229 atkbd_connect+0x214/0x30e drivers/input/keyboard/atkbd.c:1293 serio_connect_driver+0x24/0x40 drivers/input/serio/serio.c:47 really_probe+0xd1/0x400 drivers/base/dd.c:553 driver_probe_device+0xd9/0x140 drivers/base/dd.c:738 device_driver_attach+0x4a/0x50 drivers/base/dd.c:1013 __driver_attach+0x80/0x140 drivers/base/dd.c:1090 bus_for_each_dev+0x71/0xb0 drivers/base/bus.c:305 serio_attach_driver drivers/input/serio/serio.c:808 [inline] serio_handle_event+0x1ee/0x250 drivers/input/serio/serio.c:227 process_one_work+0x26a/0x5f0 kernel/workqueue.c:2269 worker_thread+0x38/0x380 kernel/workqueue.c:2415 kthread+0x147/0x170 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 } ... key at: [] __key.34105+0x0/0x10 ... acquired at: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:354 [inline] evdev_pass_values+0x71/0x280 drivers/input/evdev.c:262 evdev_events+0xf7/0x1a0 drivers/input/evdev.c:307 input_to_handler+0x83/0xe0 drivers/input/input.c:115 input_pass_values.part.8+0x1b0/0x260 drivers/input/input.c:145 input_pass_values drivers/input/input.c:134 [inline] input_handle_event+0x4cf/0x5f0 drivers/input/input.c:399 input_inject_event+0x14f/0x1b6 drivers/input/input.c:471 evdev_write+0x136/0x230 drivers/input/evdev.c:530 vfs_write+0xc7/0x230 fs/read_write.c:576 ksys_write+0xb9/0xd0 fs/read_write.c:631 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> (&client->buffer_lock){....}-{2:2} { INITIAL USE at: lock_acquire+0xb0/0x3a0 kernel/locking/lockdep.c:5020 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:354 [inline] evdev_pass_values+0x71/0x280 drivers/input/evdev.c:262 evdev_events+0xf7/0x1a0 drivers/input/evdev.c:307 input_to_handler+0x83/0xe0 drivers/input/input.c:115 input_pass_values.part.8+0x1b0/0x260 drivers/input/input.c:145 input_pass_values drivers/input/input.c:134 [inline] input_handle_event+0x4cf/0x5f0 drivers/input/input.c:399 input_inject_event+0x14f/0x1b6 drivers/input/input.c:471 evdev_write+0x136/0x230 drivers/input/evdev.c:530 vfs_write+0xc7/0x230 fs/read_write.c:576 ksys_write+0xb9/0xd0 fs/read_write.c:631 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 } ... key at: [] __key.36392+0x0/0x10 ... acquired at: __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:223 kill_fasync_rcu fs/fcntl.c:1002 [inline] kill_fasync+0xa7/0x200 fs/fcntl.c:1023 __pass_event drivers/input/evdev.c:240 [inline] evdev_pass_values+0x18a/0x280 drivers/input/evdev.c:279 evdev_events+0xf7/0x1a0 drivers/input/evdev.c:307 input_to_handler+0x83/0xe0 drivers/input/input.c:115 input_pass_values.part.8+0x1b0/0x260 drivers/input/input.c:145 input_pass_values drivers/input/input.c:134 [inline] input_handle_event+0x4cf/0x5f0 drivers/input/input.c:399 input_inject_event+0x14f/0x1b6 drivers/input/input.c:471 evdev_write+0x136/0x230 drivers/input/evdev.c:530 vfs_write+0xc7/0x230 fs/read_write.c:576 ksys_write+0xb9/0xd0 fs/read_write.c:631 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> (&new->fa_lock){....}-{2:2} { INITIAL USE at: lock_acquire+0xb0/0x3a0 kernel/locking/lockdep.c:5020 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:223 kill_fasync_rcu fs/fcntl.c:1002 [inline] kill_fasync+0xa7/0x200 fs/fcntl.c:1023 __pass_event drivers/input/evdev.c:240 [inline] evdev_pass_values+0x18a/0x280 drivers/input/evdev.c:279 evdev_events+0xf7/0x1a0 drivers/input/evdev.c:307 input_to_handler+0x83/0xe0 drivers/input/input.c:115 input_pass_values.part.8+0x1b0/0x260 drivers/input/input.c:145 input_pass_values drivers/input/input.c:134 [inline] input_handle_event+0x4cf/0x5f0 drivers/input/input.c:399 input_inject_event+0x14f/0x1b6 drivers/input/input.c:471 evdev_write+0x136/0x230 drivers/input/evdev.c:530 vfs_write+0xc7/0x230 fs/read_write.c:576 ksys_write+0xb9/0xd0 fs/read_write.c:631 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 } ... key at: [] __key.45767+0x0/0x10 ... acquired at: __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:223 send_sigio+0x23/0x200 fs/fcntl.c:786 kill_fasync_rcu fs/fcntl.c:1009 [inline] kill_fasync+0xd2/0x200 fs/fcntl.c:1023 __pass_event drivers/input/evdev.c:240 [inline] evdev_pass_values+0x18a/0x280 drivers/input/evdev.c:279 evdev_events+0xf7/0x1a0 drivers/input/evdev.c:307 input_to_handler+0x83/0xe0 drivers/input/input.c:115 input_pass_values.part.8+0x1b0/0x260 drivers/input/input.c:145 input_pass_values drivers/input/input.c:134 [inline] input_handle_event+0x4cf/0x5f0 drivers/input/input.c:399 input_inject_event+0x14f/0x1b6 drivers/input/input.c:471 evdev_write+0x136/0x230 drivers/input/evdev.c:530 vfs_write+0xc7/0x230 fs/read_write.c:576 ksys_write+0xb9/0xd0 fs/read_write.c:631 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> (&f->f_owner.lock){.+..}-{2:2} { HARDIRQ-ON-R at: lock_acquire+0xb0/0x3a0 kernel/locking/lockdep.c:5020 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:223 send_sigurg+0x1d/0x200 fs/fcntl.c:824 sk_send_sigurg+0x31/0x160 net/core/sock.c:2944 tcp_check_urg net/ipv4/tcp_input.c:5412 [inline] tcp_urg+0xa2/0x1f0 net/ipv4/tcp_input.c:5453 tcp_rcv_established+0x1de/0x6b0 net/ipv4/tcp_input.c:5783 tcp_v4_do_rcv+0x11c/0x1d0 net/ipv4/tcp_ipv4.c:1642 sk_backlog_rcv include/net/sock.h:1011 [inline] __release_sock+0x68/0x100 net/core/sock.c:2542 release_sock+0x26/0xa0 net/core/sock.c:3065 sk_stream_wait_memory+0x175/0x360 net/core/stream.c:145 tcp_sendmsg_locked+0x454/0xdd0 net/ipv4/tcp.c:1401 tcp_sendmsg+0x22/0x40 net/ipv4/tcp.c:1441 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0x2b/0x40 net/socket.c:671 __sys_sendto+0xec/0x160 net/socket.c:1992 __do_sys_sendto net/socket.c:2004 [inline] __se_sys_sendto net/socket.c:2000 [inline] __x64_sys_sendto+0x1f/0x30 net/socket.c:2000 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 INITIAL USE at: lock_acquire+0xb0/0x3a0 kernel/locking/lockdep.c:5020 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:223 send_sigio+0x23/0x200 fs/fcntl.c:786 kill_fasync_rcu fs/fcntl.c:1009 [inline] kill_fasync+0xd2/0x200 fs/fcntl.c:1023 __pass_event drivers/input/evdev.c:240 [inline] evdev_pass_values+0x18a/0x280 drivers/input/evdev.c:279 evdev_events+0xf7/0x1a0 drivers/input/evdev.c:307 input_to_handler+0x83/0xe0 drivers/input/input.c:115 input_pass_values.part.8+0x1b0/0x260 drivers/input/input.c:145 input_pass_values drivers/input/input.c:134 [inline] input_handle_event+0x4cf/0x5f0 drivers/input/input.c:399 input_inject_event+0x14f/0x1b6 drivers/input/input.c:471 evdev_write+0x136/0x230 drivers/input/evdev.c:530 vfs_write+0xc7/0x230 fs/read_write.c:576 ksys_write+0xb9/0xd0 fs/read_write.c:631 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 } ... key at: [] __key.49897+0x0/0x10 ... acquired at: mark_lock_irq kernel/locking/lockdep.c:3568 [inline] mark_lock+0x24f/0x850 kernel/locking/lockdep.c:4006 mark_usage kernel/locking/lockdep.c:3911 [inline] __lock_acquire+0x874/0x2ad0 kernel/locking/lockdep.c:4380 lock_acquire+0xb0/0x3a0 kernel/locking/lockdep.c:5020 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:223 send_sigurg+0x1d/0x200 fs/fcntl.c:824 sk_send_sigurg+0x31/0x160 net/core/sock.c:2944 tcp_check_urg net/ipv4/tcp_input.c:5412 [inline] tcp_urg+0xa2/0x1f0 net/ipv4/tcp_input.c:5453 tcp_rcv_established+0x1de/0x6b0 net/ipv4/tcp_input.c:5783 tcp_v4_do_rcv+0x11c/0x1d0 net/ipv4/tcp_ipv4.c:1642 sk_backlog_rcv include/net/sock.h:1011 [inline] __release_sock+0x68/0x100 net/core/sock.c:2542 release_sock+0x26/0xa0 net/core/sock.c:3065 sk_stream_wait_memory+0x175/0x360 net/core/stream.c:145 tcp_sendmsg_locked+0x454/0xdd0 net/ipv4/tcp.c:1401 tcp_sendmsg+0x22/0x40 net/ipv4/tcp.c:1441 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0x2b/0x40 net/socket.c:671 __sys_sendto+0xec/0x160 net/socket.c:1992 __do_sys_sendto net/socket.c:2004 [inline] __se_sys_sendto net/socket.c:2000 [inline] __x64_sys_sendto+0x1f/0x30 net/socket.c:2000 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 stack backtrace: CPU: 1 PID: 10214 Comm: syz-executor.1 Not tainted 5.9.0-rc2-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+0x77/0xa0 lib/dump_stack.c:118 print_irq_inversion_bug kernel/locking/lockdep.c:3429 [inline] check_usage_backwards.cold.63+0x1d/0x26 kernel/locking/lockdep.c:3480 mark_lock_irq kernel/locking/lockdep.c:3568 [inline] mark_lock+0x24f/0x850 kernel/locking/lockdep.c:4006 mark_usage kernel/locking/lockdep.c:3911 [inline] __lock_acquire+0x874/0x2ad0 kernel/locking/lockdep.c:4380 lock_acquire+0xb0/0x3a0 kernel/locking/lockdep.c:5020 __raw_read_lock include/linux/rwlock_api_smp.h:149 [inline] _raw_read_lock+0x5b/0x70 kernel/locking/spinlock.c:223 send_sigurg+0x1d/0x200 fs/fcntl.c:824 sk_send_sigurg+0x31/0x160 net/core/sock.c:2944 tcp_check_urg net/ipv4/tcp_input.c:5412 [inline] tcp_urg+0xa2/0x1f0 net/ipv4/tcp_input.c:5453 tcp_rcv_established+0x1de/0x6b0 net/ipv4/tcp_input.c:5783 tcp_v4_do_rcv+0x11c/0x1d0 net/ipv4/tcp_ipv4.c:1642 sk_backlog_rcv include/net/sock.h:1011 [inline] __release_sock+0x68/0x100 net/core/sock.c:2542 release_sock+0x26/0xa0 net/core/sock.c:3065 sk_stream_wait_memory+0x175/0x360 net/core/stream.c:145 tcp_sendmsg_locked+0x454/0xdd0 net/ipv4/tcp.c:1401 tcp_sendmsg+0x22/0x40 net/ipv4/tcp.c:1441 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0x2b/0x40 net/socket.c:671 __sys_sendto+0xec/0x160 net/socket.c:1992 __do_sys_sendto net/socket.c:2004 [inline] __se_sys_sendto net/socket.c:2000 [inline] __x64_sys_sendto+0x1f/0x30 net/socket.c:2000 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45deb9 Code: 0d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f8ff5aa3c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 000000000002e900 RCX: 000000000045deb9 RDX: ffffffffffffff58 RSI: 0000000020000140 RDI: 0000000000000004 RBP: 000000000118bf78 R08: 0000000020000100 R09: 0000000000000010 R10: 0000000020008005 R11: 0000000000000246 R12: 000000000118bf2c R13: 00007ffc90a4667f R14: 00007f8ff5aa49c0 R15: 000000000118bf2c