[ OK ] Reached target Graphical Interface. Starting Update UTMP about System Runlevel Changes... Starting Load/Save RF Kill Switch Status... [ OK ] Started Load/Save RF Kill Switch Status. [ OK ] Started Update UTMP about System Runlevel Changes. Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.18' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 28.322232] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 28.388333] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 28.401885] [ 28.403516] ====================================================== [ 28.409811] WARNING: possible circular locking dependency detected [ 28.416103] 4.14.260-syzkaller #0 Not tainted [ 28.420571] ------------------------------------------------------ [ 28.426861] syz-executor186/7977 is trying to acquire lock: [ 28.432539] (&table[i].mutex){+.+.}, at: [] nf_tables_netdev_event+0x10d/0x4d0 [ 28.441528] [ 28.441528] but task is already holding lock: [ 28.447473] (rtnl_mutex){+.+.}, at: [] rtnetlink_rcv_msg+0x31d/0xb10 [ 28.455594] [ 28.455594] which lock already depends on the new lock. [ 28.455594] [ 28.463880] [ 28.463880] the existing dependency chain (in reverse order) is: [ 28.471469] [ 28.471469] -> #2 (rtnl_mutex){+.+.}: [ 28.476728] __mutex_lock+0xc4/0x1310 [ 28.481028] unregister_netdevice_notifier+0x5e/0x2b0 [ 28.486717] tee_tg_destroy+0x5c/0xb0 [ 28.491016] cleanup_entry+0x232/0x310 [ 28.495399] __do_replace+0x38d/0x580 [ 28.499694] do_ip6t_set_ctl+0x256/0x3b0 [ 28.504251] nf_setsockopt+0x5f/0xb0 [ 28.508458] ipv6_setsockopt+0xc0/0x120 [ 28.512939] tcp_setsockopt+0x7b/0xc0 [ 28.517236] SyS_setsockopt+0x110/0x1e0 [ 28.521703] do_syscall_64+0x1d5/0x640 [ 28.526089] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.531771] [ 28.531771] -> #1 (&xt[i].mutex){+.+.}: [ 28.537198] __mutex_lock+0xc4/0x1310 [ 28.541493] match_revfn+0x43/0x210 [ 28.545611] xt_find_revision+0x8d/0x1d0 [ 28.550173] nfnl_compat_get+0x1f7/0x870 [ 28.554996] nfnetlink_rcv_msg+0x9bb/0xc00 [ 28.559728] netlink_rcv_skb+0x125/0x390 [ 28.564284] nfnetlink_rcv+0x1ab/0x1da0 [ 28.568760] netlink_unicast+0x437/0x610 [ 28.573328] netlink_sendmsg+0x648/0xbc0 [ 28.577888] sock_sendmsg+0xb5/0x100 [ 28.582097] ___sys_sendmsg+0x6c8/0x800 [ 28.586566] __sys_sendmsg+0xa3/0x120 [ 28.590860] SyS_sendmsg+0x27/0x40 [ 28.594896] do_syscall_64+0x1d5/0x640 [ 28.599278] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.604960] [ 28.604960] -> #0 (&table[i].mutex){+.+.}: [ 28.610658] lock_acquire+0x170/0x3f0 [ 28.614956] __mutex_lock+0xc4/0x1310 [ 28.619257] nf_tables_netdev_event+0x10d/0x4d0 [ 28.624423] notifier_call_chain+0x108/0x1a0 [ 28.629333] rollback_registered_many+0x765/0xba0 [ 28.634680] rollback_registered+0xca/0x170 [ 28.639500] unregister_netdevice_queue+0x1b4/0x360 [ 28.645062] macsec_newlink+0x640/0x1290 [ 28.649620] rtnl_newlink+0xfab/0x1860 [ 28.654002] rtnetlink_rcv_msg+0x3be/0xb10 [ 28.658732] netlink_rcv_skb+0x125/0x390 [ 28.663286] netlink_unicast+0x437/0x610 [ 28.667840] netlink_sendmsg+0x648/0xbc0 [ 28.672395] sock_sendmsg+0xb5/0x100 [ 28.676602] ___sys_sendmsg+0x6c8/0x800 [ 28.681069] __sys_sendmsg+0xa3/0x120 [ 28.685379] SyS_sendmsg+0x27/0x40 [ 28.689418] do_syscall_64+0x1d5/0x640 [ 28.693812] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 28.699498] [ 28.699498] other info that might help us debug this: [ 28.699498] [ 28.707615] Chain exists of: [ 28.707615] &table[i].mutex --> &xt[i].mutex --> rtnl_mutex [ 28.707615] [ 28.717834] Possible unsafe locking scenario: [ 28.717834] [ 28.723869] CPU0 CPU1 [ 28.728515] ---- ---- [ 28.733161] lock(rtnl_mutex); [ 28.736419] lock(&xt[i].mutex); [ 28.742369] lock(rtnl_mutex); [ 28.748149] lock(&table[i].mutex); [ 28.751856] [ 28.751856] *** DEADLOCK *** [ 28.751856] [ 28.757891] 1 lock held by syz-executor186/7977: [ 28.762622] #0: (rtnl_mutex){+.+.}, at: [] rtnetlink_rcv_msg+0x31d/0xb10 [ 28.771187] [ 28.771187] stack backtrace: [ 28.775663] CPU: 0 PID: 7977 Comm: syz-executor186 Not tainted 4.14.260-syzkaller #0 [ 28.783516] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 28.792845] Call Trace: [ 28.795409] dump_stack+0x1b2/0x281 [ 28.799028] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 28.804808] __lock_acquire+0x2e0e/0x3f20 [ 28.808942] ? lock_downgrade+0x740/0x740 [ 28.813073] ? unwind_next_frame+0xe54/0x17d0 [ 28.817548] ? trace_hardirqs_on+0x10/0x10 [ 28.821770] ? kernel_text_address+0xbd/0xf0 [ 28.826154] ? __kernel_text_address+0x9/0x30 [ 28.830626] ? unwind_get_return_address+0x51/0x90 [ 28.835534] lock_acquire+0x170/0x3f0 [ 28.839313] ? nf_tables_netdev_event+0x10d/0x4d0 [ 28.844134] ? nf_tables_netdev_event+0x10d/0x4d0 [ 28.848993] __mutex_lock+0xc4/0x1310 [ 28.852776] ? nf_tables_netdev_event+0x10d/0x4d0 [ 28.857604] ? nf_tables_netdev_event+0x10d/0x4d0 [ 28.862540] ? __ww_mutex_wakeup_for_backoff+0x210/0x210 [ 28.867981] ? trace_hardirqs_on+0x10/0x10 [ 28.872205] ? trace_hardirqs_on_caller+0x3a8/0x580 [ 28.877201] ? lock_downgrade+0x740/0x740 [ 28.881335] nf_tables_netdev_event+0x10d/0x4d0 [ 28.885984] ? mirred_device_event+0x12f/0x170 [ 28.890546] ? nf_tables_netdev_init_net+0x140/0x140 [ 28.895629] ? mirred_device_event+0x12f/0x170 [ 28.900190] ? __local_bh_enable_ip+0xc1/0x170 [ 28.904758] notifier_call_chain+0x108/0x1a0 [ 28.909153] rollback_registered_many+0x765/0xba0 [ 28.913983] ? netconsole_netdev_event+0x60/0x250 [ 28.918805] ? netdev_state_change+0xf0/0xf0 [ 28.923196] rollback_registered+0xca/0x170 [ 28.927616] ? rollback_registered_many+0xba0/0xba0 [ 28.932623] unregister_netdevice_queue+0x1b4/0x360 [ 28.937737] macsec_newlink+0x640/0x1290 [ 28.941780] ? macsec_encrypt_done+0x580/0x580 [ 28.946340] ? dev_validate_mtu+0x90/0xf0 [ 28.950466] rtnl_newlink+0xfab/0x1860 [ 28.954335] ? __lock_acquire+0x5fc/0x3f20 [ 28.958551] ? macsec_encrypt_done+0x580/0x580 [ 28.963121] ? trace_hardirqs_on+0x10/0x10 [ 28.967345] ? rtnl_dellink+0x6a0/0x6a0 [ 28.971300] ? trace_hardirqs_on+0x10/0x10 [ 28.975512] ? __read_once_size_nocheck.constprop.0+0x10/0x10 [ 28.981375] ? deref_stack_reg+0x124/0x1a0 [ 28.985699] ? lock_acquire+0x170/0x3f0 [ 28.989660] ? lock_downgrade+0x740/0x740 [ 28.993795] ? rtnl_dellink+0x6a0/0x6a0 [ 28.997755] rtnetlink_rcv_msg+0x3be/0xb10 [ 29.001972] ? rtnl_calcit.isra.0+0x3a0/0x3a0 [ 29.006448] ? __netlink_lookup+0x345/0x5d0 [ 29.010756] netlink_rcv_skb+0x125/0x390 [ 29.014800] ? rtnl_calcit.isra.0+0x3a0/0x3a0 [ 29.019272] ? netlink_ack+0x9a0/0x9a0 [ 29.023139] netlink_unicast+0x437/0x610 [ 29.027179] ? netlink_sendskb+0xd0/0xd0 [ 29.031246] ? __check_object_size+0x179/0x230 [ 29.035807] netlink_sendmsg+0x648/0xbc0 [ 29.039844] ? nlmsg_notify+0x1b0/0x1b0 [ 29.043800] ? kernel_recvmsg+0x210/0x210 [ 29.047932] ? security_socket_sendmsg+0x83/0xb0 [ 29.052664] ? nlmsg_notify+0x1b0/0x1b0 [ 29.056612] sock_sendmsg+0xb5/0x100 [ 29.060304] ___sys_sendmsg+0x6c8/0x800 [ 29.064255] ? copy_msghdr_from_user+0x3b0/0x3b0 [ 29.068997] ? trace_hardirqs_on+0x10/0x10 [ 29.073210] ? trace_hardirqs_on+0x10/0x10 [ 29.077424] ? apparmor_file_alloc_security+0x129/0x800 [ 29.082769] ? rcu_lockdep_current_cpu_online+0xed/0x140 [ 29.088207] ? __lockdep_init_map+0x100/0x560 [ 29.092677] ? __fd_install+0x1ec/0x5c0 [ 29.097061] ? lock_acquire+0x170/0x3f0 [ 29.101015] ? lock_downgrade+0x740/0x740 [ 29.105138] ? __fdget+0x167/0x1f0 [ 29.108654] ? sockfd_lookup_light+0xb2/0x160 [ 29.113127] __sys_sendmsg+0xa3/0x120 [ 29.116906] ? SyS_shutdown+0x160/0x160 [ 29.120857] ? move_addr_to_kernel+0x60/0x60 [ 29.125242] SyS_sendmsg+0x27/0x40 [ 29.128758] ? __sys_sendmsg+0x120/0x120 [ 29.132800] do_syscall_64+0x1d5/0x640 [ 29.136667] entry_SYSCALL_64_after_hwframe+0x46/0xbb [ 29.141832] RIP: 0033:0x7f5a5b1896b9 [ 29.145525] RSP: 002b:00007ffe2835ac38 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 29.153217] RAX: ffffffffffffffda RBX: 00306576656e6567 RCX: 00007f5a5b1896b9 [ 29.160461] RDX: 0000000000040010 RSI: 0000000020000080 RDI: 0000000000000005 [ 29.167718] RBP: 0000000000000000 R08: 00007ffe2835add8 R09: 00007ffe2835add8 [ 29.174971] R10: 00007ffe2835add8 R11: 0000000000000246 R12: 00007ffe2835ac4c [ 29.182217] R13: 431bde82d7b634db R14: 0000000000000000 R15: 0000000000000000 executing program executing program [ 29.258981] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.305895] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.360186] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.416453] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 29.470486] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 29.507355] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program [ 29.582426] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 29.627190] ip6_tables: ip6tables: 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 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 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 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 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 [ 33.365951] net_ratelimit: 73 callbacks suppressed [ 33.365954] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 33.414758] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.484731] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.552618] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program [ 33.621271] ip6_tables: ip6tables: counters copy to user failed while replacing table [ 33.662803] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program executing program [ 33.733115] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.794297] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.843807] ip6_tables: ip6tables: counters copy to user failed while replacing table executing program [ 33.902845] ip6_tables: ip6tables: 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 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 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 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 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 executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program