x_tables: ip_tables: TCPOPTSTRIP target: only valid in mangle table, not raw ================================ WARNING: inconsistent lock state 4.19.195-syzkaller #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-executor.2/24477 [HC0[0]:SC1[1]:HE1:SE0] takes: 00000000759f4d0a (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}, at: spin_lock include/linux/spinlock.h:329 [inline] 00000000759f4d0a (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}, at: sco_sock_timeout+0x31/0x210 net/bluetooth/sco.c:82 {SOFTIRQ-ON-W} state was registered at: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [inline] sco_conn_del+0xe2/0x240 net/bluetooth/sco.c:175 sco_disconn_cfm+0x74/0xb0 net/bluetooth/sco.c:1133 hci_disconn_cfm include/net/bluetooth/hci_core.h:1262 [inline] hci_conn_hash_flush+0x127/0x260 net/bluetooth/hci_conn.c:1512 hci_dev_do_close+0x659/0xf10 net/bluetooth/hci_core.c:1673 hci_unregister_dev+0x18b/0x910 net/bluetooth/hci_core.c:3278 vhci_release+0x70/0xe0 drivers/bluetooth/hci_vhci.c:354 __fput+0x2ce/0x890 fs/file_table.c:278 task_work_run+0x148/0x1c0 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0xbf3/0x2be0 kernel/exit.c:870 do_group_exit+0x125/0x310 kernel/exit.c:967 __do_sys_exit_group kernel/exit.c:978 [inline] __se_sys_exit_group kernel/exit.c:976 [inline] __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:976 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe irq event stamp: 68912 hardirqs last enabled at (68912): [] trace_hardirqs_on_thunk+0x1a/0x1c hardirqs last disabled at (68911): [] trace_hardirqs_off_thunk+0x1a/0x1c softirqs last enabled at (67296): [] __do_softirq+0x678/0x980 kernel/softirq.c:318 softirqs last disabled at (68885): [] invoke_softirq kernel/softirq.c:372 [inline] softirqs last disabled at (68885): [] irq_exit+0x215/0x260 kernel/softirq.c:412 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(slock-AF_BLUETOOTH-BTPROTO_SCO); lock(slock-AF_BLUETOOTH-BTPROTO_SCO); *** DEADLOCK *** 3 locks held by syz-executor.2/24477: #0: 00000000c61d55f1 (pernet_ops_rwsem){++++}, at: copy_net_ns+0x1d8/0x340 net/core/net_namespace.c:434 #1: 000000009c6fcc39 (rcu_read_lock){....}, at: __read_once_size include/linux/compiler.h:261 [inline] #1: 000000009c6fcc39 (rcu_read_lock){....}, at: inet_twsk_purge+0xd3/0x7c0 net/ipv4/inet_timewait_sock.c:269 #2: 00000000b0607737 ((&sk->sk_timer)#2){+.-.}, at: lockdep_copy_map include/linux/lockdep.h:168 [inline] #2: 00000000b0607737 ((&sk->sk_timer)#2){+.-.}, at: call_timer_fn+0xc9/0x700 kernel/time/timer.c:1328 stack backtrace: CPU: 1 PID: 24477 Comm: syz-executor.2 Not tainted 4.19.195-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+0x1fc/0x2ef lib/dump_stack.c:118 print_usage_bug.cold+0x42e/0x570 kernel/locking/lockdep.c:2545 valid_state kernel/locking/lockdep.c:2558 [inline] mark_lock_irq kernel/locking/lockdep.c:2752 [inline] mark_lock+0xc70/0x1160 kernel/locking/lockdep.c:3132 mark_irqflags kernel/locking/lockdep.c:3010 [inline] __lock_acquire+0xdc4/0x3ff0 kernel/locking/lockdep.c:3373 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [inline] sco_sock_timeout+0x31/0x210 net/bluetooth/sco.c:82 call_timer_fn+0x177/0x700 kernel/time/timer.c:1338 expire_timers+0x243/0x4e0 kernel/time/timer.c:1375 __run_timers kernel/time/timer.c:1696 [inline] run_timer_softirq+0x21c/0x670 kernel/time/timer.c:1709 __do_softirq+0x265/0x980 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x215/0x260 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1098 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:789 [inline] RIP: 0010:lock_acquire+0x1ec/0x3c0 kernel/locking/lockdep.c:3911 Code: 08 00 00 00 00 00 00 48 c1 e8 03 80 3c 10 00 0f 85 b7 01 00 00 48 83 3d 39 30 a6 08 00 0f 84 2a 01 00 00 48 8b 7c 24 08 57 9d <0f> 1f 44 00 00 48 83 c4 18 5b 5d 41 5c 41 5d 41 5e 41 5f c3 65 8b RSP: 0018:ffff8880b3a778e8 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff13e3049 RBX: ffff88803a63c240 RCX: 19c083a54f2aa927 RDX: dffffc0000000000 RSI: 0000000078f696be RDI: 0000000000000286 RBP: ffffffff89f85ee0 R08: 00000000991747d6 R09: 0000000000000001 R10: ffff88803a63caf0 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000002 R15: 0000000000000000 rcu_lock_acquire include/linux/rcupdate.h:242 [inline] rcu_read_lock include/linux/rcupdate.h:627 [inline] inet_twsk_purge+0x115/0x7c0 net/ipv4/inet_timewait_sock.c:267 ops_exit_list+0xf9/0x150 net/core/net_namespace.c:156 setup_net+0x3d1/0x720 net/core/net_namespace.c:332 copy_net_ns+0x1f7/0x340 net/core/net_namespace.c:438 create_new_namespaces+0x3f6/0x7b0 kernel/nsproxy.c:107 copy_namespaces+0x325/0x3c0 kernel/nsproxy.c:165 copy_process.part.0+0x3a59/0x8260 kernel/fork.c:1915 copy_process kernel/fork.c:1709 [inline] _do_fork+0x22f/0xf30 kernel/fork.c:2218 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4665d9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f2d2791e188 EFLAGS: 00000246 ORIG_RAX: 0000000000000038 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665d9 RDX: 0000000020000080 RSI: 0000000020000040 RDI: 0000000050800000 RBP: 00000000004bfcb9 R08: 0000000020000180 R09: 0000000000000000 R10: 0000000020000140 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007fff3ae36fbf R14: 00007f2d2791e300 R15: 0000000000022000 x_tables: ip_tables: TCPOPTSTRIP target: only valid in mangle table, not raw EXT4-fs warning (device sda1): ext4_group_add:1682: No reserved GDT blocks, can't resize x_tables: ip_tables: TCPOPTSTRIP target: only valid in mangle table, not raw IPVS: ftp: loaded support on port[0] = 21 x_tables: ip_tables: TCPOPTSTRIP target: only valid in mangle table, not raw EXT4-fs warning (device sda1): ext4_group_add:1682: No reserved GDT blocks, can't resize x_tables: ip_tables: TCPOPTSTRIP target: only valid in mangle table, not raw EXT4-fs warning (device sda1): ext4_group_add:1682: No reserved GDT blocks, can't resize x_tables: ip_tables: TCPOPTSTRIP target: only valid in mangle table, not raw xt_check_target: 4 callbacks suppressed x_tables: ip_tables: TCPOPTSTRIP target: only valid in mangle table, not raw x_tables: ip_tables: TCPOPTSTRIP target: only valid in mangle table, not raw x_tables: ip_tables: TCPOPTSTRIP target: only valid in mangle table, not raw x_tables: ip_tables: TCPOPTSTRIP target: only valid in mangle table, not raw Bluetooth: hci2: command 0x0405 tx timeout x_tables: ip_tables: TCPOPTSTRIP target: only valid in mangle table, not raw x_tables: ip_tables: TCPOPTSTRIP target: only valid in mangle table, not raw x_tables: ip_tables: TCPOPTSTRIP target: only valid in mangle table, not raw x_tables: ip_tables: TCPOPTSTRIP target: only valid in mangle table, not raw x_tables: ip_tables: TCPOPTSTRIP target: only valid in mangle table, not raw x_tables: ip_tables: TCPOPTSTRIP target: only valid in mangle table, not raw Bluetooth: hci2: command 0x0405 tx timeout IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 Bluetooth: hci2: command 0x0405 tx timeout xt_check_target: 11 callbacks suppressed x_tables: ip_tables: TCPOPTSTRIP target: only valid in mangle table, not raw x_tables: ip_tables: TCPOPTSTRIP target: only valid in mangle table, not raw