[....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 36.857394] random: sshd: uninitialized urandom read (32 bytes read) [ 37.151008] kauditd_printk_skb: 10 callbacks suppressed [ 37.151016] audit: type=1400 audit(1579963338.092:35): avc: denied { map } for pid=7232 comm="bash" path="/bin/bash" dev="sda1" ino=1457 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 [ 37.208358] random: sshd: uninitialized urandom read (32 bytes read) [ 37.929478] random: sshd: uninitialized urandom read (32 bytes read) [ 42.431869] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.10.27' (ECDSA) to the list of known hosts. [ 47.982975] random: sshd: uninitialized urandom read (32 bytes read) executing program [ 48.103497] audit: type=1400 audit(1579963349.042:36): avc: denied { map } for pid=7244 comm="syz-executor454" path="/root/syz-executor454762051" dev="sda1" ino=16483 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file permissive=1 executing program [ 48.202558] ip_tables: iptables: counters copy to user failed while replacing table [ 48.217945] audit: type=1400 audit(1579963349.152:37): avc: denied { create } for pid=7245 comm="syz-executor454" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1 [ 48.306914] audit: type=1400 audit(1579963349.182:38): avc: denied { write } for pid=7245 comm="syz-executor454" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_netfilter_socket permissive=1 [ 48.362094] [ 48.363754] ====================================================== [ 48.370174] WARNING: possible circular locking dependency detected [ 48.376681] 4.14.167-syzkaller #0 Not tainted [ 48.381180] ------------------------------------------------------ [ 48.387631] syz-executor454/7267 is trying to acquire lock: [ 48.393338] (rtnl_mutex){+.+.}, at: [] rtnl_lock+0x17/0x20 [ 48.401004] [ 48.401004] but task is already holding lock: [ 48.406970] (&xt[i].mutex){+.+.}, at: [] xt_find_table_lock+0x3c/0x3d0 [ 48.415427] [ 48.415427] which lock already depends on the new lock. [ 48.415427] [ 48.424100] [ 48.424100] the existing dependency chain (in reverse order) is: [ 48.431712] [ 48.431712] -> #2 (&xt[i].mutex){+.+.}: [ 48.437200] lock_acquire+0x16f/0x430 [ 48.441525] __mutex_lock+0xe8/0x1470 [ 48.445847] mutex_lock_nested+0x16/0x20 [ 48.450444] xt_find_revision+0x82/0x200 [ 48.455181] nfnl_compat_get+0x229/0x950 [ 48.459904] nfnetlink_rcv_msg+0xa08/0xc00 [ 48.464668] netlink_rcv_skb+0x14f/0x3c0 [ 48.469461] nfnetlink_rcv+0x1ab/0x1650 [ 48.473953] netlink_unicast+0x44d/0x650 [ 48.478600] netlink_sendmsg+0x7c4/0xc60 [ 48.483187] sock_sendmsg+0xce/0x110 [ 48.487423] ___sys_sendmsg+0x70a/0x840 [ 48.491918] __sys_sendmsg+0xb9/0x140 [ 48.496398] SyS_sendmsg+0x2d/0x50 [ 48.500550] do_syscall_64+0x1e8/0x640 [ 48.504961] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 48.511098] [ 48.511098] -> #1 (&table[i].mutex){+.+.}: [ 48.516922] lock_acquire+0x16f/0x430 [ 48.521240] __mutex_lock+0xe8/0x1470 [ 48.525662] mutex_lock_nested+0x16/0x20 [ 48.530245] nfnl_lock+0x24/0x30 [ 48.534129] nf_tables_netdev_event+0x13f/0x580 [ 48.539314] notifier_call_chain+0x111/0x1b0 [ 48.544422] raw_notifier_call_chain+0x2e/0x40 [ 48.549565] call_netdevice_notifiers_info+0x56/0x70 [ 48.555246] rollback_registered_many+0x70d/0xb60 [ 48.560611] unregister_netdevice_many.part.0+0x1b/0x1e0 [ 48.566596] unregister_netdevice_many+0x3b/0x50 [ 48.571873] rtnl_newlink+0x1398/0x1700 [ 48.576366] rtnetlink_rcv_msg+0x3da/0xb70 [ 48.581419] netlink_rcv_skb+0x14f/0x3c0 [ 48.586001] rtnetlink_rcv+0x1d/0x30 [ 48.590249] netlink_unicast+0x44d/0x650 [ 48.594832] netlink_sendmsg+0x7c4/0xc60 [ 48.599415] sock_sendmsg+0xce/0x110 [ 48.603646] ___sys_sendmsg+0x70a/0x840 [ 48.608138] __sys_sendmsg+0xb9/0x140 [ 48.612457] SyS_sendmsg+0x2d/0x50 [ 48.616516] do_syscall_64+0x1e8/0x640 [ 48.620925] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 48.626627] [ 48.626627] -> #0 (rtnl_mutex){+.+.}: [ 48.632033] __lock_acquire+0x2cb3/0x4620 [ 48.636744] lock_acquire+0x16f/0x430 [ 48.641182] __mutex_lock+0xe8/0x1470 [ 48.645656] mutex_lock_nested+0x16/0x20 [ 48.650233] rtnl_lock+0x17/0x20 [ 48.654237] unregister_netdevice_notifier+0x5f/0x2c0 [ 48.659945] tee_tg_destroy+0x61/0xc0 [ 48.664267] cleanup_entry+0x17d/0x230 [ 48.668676] __do_replace+0x3c5/0x5b0 [ 48.673023] do_ipt_set_ctl+0x296/0x3ee [ 48.677864] nf_setsockopt+0x67/0xc0 [ 48.682127] ip_setsockopt+0x9b/0xb0 [ 48.686361] udp_setsockopt+0x4e/0x90 [ 48.690845] sock_common_setsockopt+0x94/0xd0 [ 48.695858] SyS_setsockopt+0x13c/0x210 [ 48.700351] do_syscall_64+0x1e8/0x640 [ 48.704757] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 48.710699] [ 48.710699] other info that might help us debug this: [ 48.710699] [ 48.718838] Chain exists of: [ 48.718838] rtnl_mutex --> &table[i].mutex --> &xt[i].mutex [ 48.718838] [ 48.729072] Possible unsafe locking scenario: [ 48.729072] [ 48.735290] CPU0 CPU1 [ 48.739949] ---- ---- [ 48.744604] lock(&xt[i].mutex); [ 48.748053] lock(&table[i].mutex); [ 48.754377] lock(&xt[i].mutex); [ 48.760341] lock(rtnl_mutex); [ 48.763625] [ 48.763625] *** DEADLOCK *** [ 48.763625] [ 48.769682] 1 lock held by syz-executor454/7267: [ 48.774431] #0: (&xt[i].mutex){+.+.}, at: [] xt_find_table_lock+0x3c/0x3d0 [ 48.783186] [ 48.783186] stack backtrace: [ 48.787677] CPU: 1 PID: 7267 Comm: syz-executor454 Not tainted 4.14.167-syzkaller #0 [ 48.795690] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 48.805074] Call Trace: [ 48.807699] dump_stack+0x142/0x197 [ 48.811333] print_circular_bug.isra.0.cold+0x1cc/0x28f [ 48.816713] __lock_acquire+0x2cb3/0x4620 [ 48.820872] ? trace_hardirqs_on+0x10/0x10 [ 48.825107] ? __kernel_text_address+0xd/0x40 [ 48.829730] lock_acquire+0x16f/0x430 [ 48.833533] ? rtnl_lock+0x17/0x20 [ 48.837093] ? rtnl_lock+0x17/0x20 [ 48.840635] __mutex_lock+0xe8/0x1470 [ 48.844456] ? rtnl_lock+0x17/0x20 [ 48.847999] ? __bitmap_weight+0xbd/0xf0 [ 48.852066] ? rtnl_lock+0x17/0x20 [ 48.855604] ? pcpu_next_md_free_region+0x14c/0x2f0 [ 48.860613] ? mutex_trylock+0x1c0/0x1c0 [ 48.864673] ? pcpu_chunk_refresh_hint+0x29b/0x350 [ 48.869615] ? free_percpu+0x232/0x710 [ 48.873566] ? find_held_lock+0x35/0x130 [ 48.877629] ? free_percpu+0x232/0x710 [ 48.881526] mutex_lock_nested+0x16/0x20 [ 48.885591] ? mutex_lock_nested+0x16/0x20 [ 48.889822] rtnl_lock+0x17/0x20 [ 48.893187] unregister_netdevice_notifier+0x5f/0x2c0 [ 48.898503] ? trace_hardirqs_on_caller+0x400/0x590 [ 48.903674] ? register_netdevice_notifier+0x520/0x520 [ 48.908939] ? free_percpu+0x24f/0x710 [ 48.912815] tee_tg_destroy+0x61/0xc0 [ 48.916605] ? tee_tg6+0x160/0x160 [ 48.920140] cleanup_entry+0x17d/0x230 [ 48.924024] ? cleanup_match+0x140/0x140 [ 48.928073] __do_replace+0x3c5/0x5b0 [ 48.931864] ? compat_do_ipt_get_ctl+0x7f0/0x7f0 [ 48.936728] ? _copy_from_user+0x99/0x110 [ 48.941044] do_ipt_set_ctl+0x296/0x3ee [ 48.945015] ? compat_do_ipt_set_ctl+0x150/0x150 [ 48.949757] ? mutex_unlock+0xd/0x10 [ 48.953519] ? nf_sockopt_find.constprop.0+0x1b7/0x230 [ 48.958794] nf_setsockopt+0x67/0xc0 [ 48.962494] ip_setsockopt+0x9b/0xb0 [ 48.966249] udp_setsockopt+0x4e/0x90 [ 48.970085] sock_common_setsockopt+0x94/0xd0 [ 48.974573] SyS_setsockopt+0x13c/0x210 [ 48.978569] ? SyS_recv+0x40/0x40 [ 48.982049] ? do_syscall_64+0x53/0x640 [ 48.986028] ? SyS_recv+0x40/0x40 [ 48.989472] do_syscall_64+0x1e8/0x640 [ 48.993388] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 48.998219] entry_SYSCALL_64_after_hwframe+0x42/0xb7 [ 49.003389] RIP: 0033:0x441de9 [ 49.006613] RSP: 002b:00007ffe21f96f38 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 executing program [ 49.014854] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441de9 [ 49.022109] RDX: 0000000000000040 RSI: 0000000000000000 RDI: 0000000000000004 [ 49.029607] RBP: 000000000000bbe9 R08: 0000000000000408 R09: 00000000004002c8 [ 49.037203] R10: 0000000020000700 R11: 0000000000000246 R12: 0000000000402c10 [ 49.044459] R13: 0000000000402ca0 R14: 0000000000000000 R15: 0000000000000000 [ 49.052722] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 49.120474] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 49.201371] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 49.310802] ip_tables: iptables: counters copy to user failed while replacing table [ 49.425801] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 49.721209] ip_tables: iptables: counters copy to user failed while replacing table executing program executing program [ 50.033000] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 50.221289] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 50.452695] ip_tables: iptables: counters copy to user failed while replacing table executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 53.302120] net_ratelimit: 13 callbacks suppressed [ 53.302123] ip_tables: iptables: counters copy to user failed while replacing table executing program executing program [ 53.531586] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 53.701946] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 53.911247] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 54.193623] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 54.450820] ip_tables: iptables: counters copy to user failed while replacing table [ 54.561208] ip_tables: iptables: counters copy to user failed while replacing table executing program executing program [ 54.801192] ip_tables: iptables: counters copy to user failed while replacing table [ 54.931613] ip_tables: iptables: counters copy to user failed while replacing table executing program [ 55.152320] ip_tables: iptables: counters copy to user failed while replacing table executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 58.342785] net_ratelimit: 14 callbacks suppressed [ 58.342789] ip_tables: iptables: counters copy to user failed while replacing table