====================================================== WARNING: possible circular locking dependency detected 4.16.0-rc1+ #315 Not tainted ------------------------------------------------------ syz-executor0/5910 is trying to acquire lock: (sk_lock-AF_INET6){+.+.}, at: [<00000000d1314459>] lock_sock include/net/sock.h:1463 [inline] (sk_lock-AF_INET6){+.+.}, at: [<00000000d1314459>] do_ipv6_setsockopt.isra.8+0x3c5/0x39d0 net/ipv6/ipv6_sockglue.c:167 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<00000000a6f5af80>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (rtnl_mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0x16f/0x1a80 kernel/locking/mutex.c:893 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908 rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 unregister_netdevice_notifier+0x91/0x4e0 net/core/dev.c:1673 tee_tg_destroy+0x61/0xc0 net/netfilter/xt_TEE.c:123 cleanup_entry+0x218/0x350 net/ipv4/netfilter/ip_tables.c:654 __do_replace+0x79d/0xa50 net/ipv4/netfilter/ip_tables.c:1089 do_replace net/ipv4/netfilter/ip_tables.c:1145 [inline] do_ipt_set_ctl+0x40f/0x5f0 net/ipv4/netfilter/ip_tables.c:1675 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x67/0xc0 net/netfilter/nf_sockopt.c:115 ip_setsockopt+0x97/0xa0 net/ipv4/ip_sockglue.c:1259 udp_setsockopt+0x45/0x80 net/ipv4/udp.c:2401 ipv6_setsockopt+0xa0/0x130 net/ipv6/ipv6_sockglue.c:917 tcp_setsockopt+0x82/0xd0 net/ipv4/tcp.c:2905 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2975 SYSC_setsockopt net/socket.c:1849 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1828 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> #1 (&xt[i].mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0x16f/0x1a80 kernel/locking/mutex.c:893 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908 xt_find_table_lock+0x3e/0x3e0 net/netfilter/x_tables.c:1046 xt_request_find_table_lock+0x28/0xc0 net/netfilter/x_tables.c:1093 get_info+0x154/0x690 net/ipv6/netfilter/ip6_tables.c:989 do_ip6t_get_ctl+0x159/0xaf0 net/ipv6/netfilter/ip6_tables.c:1710 nf_sockopt net/netfilter/nf_sockopt.c:104 [inline] nf_getsockopt+0x6a/0xc0 net/netfilter/nf_sockopt.c:122 ipv6_getsockopt+0x1df/0x2e0 net/ipv6/ipv6_sockglue.c:1371 tcp_getsockopt+0x82/0xd0 net/ipv4/tcp.c:3359 sock_common_getsockopt+0x95/0xd0 net/core/sock.c:2934 SYSC_getsockopt net/socket.c:1880 [inline] SyS_getsockopt+0x178/0x340 net/socket.c:1862 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 -> #0 (sk_lock-AF_INET6){+.+.}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3920 lock_sock_nested+0xc2/0x110 net/core/sock.c:2777 lock_sock include/net/sock.h:1463 [inline] do_ipv6_setsockopt.isra.8+0x3c5/0x39d0 net/ipv6/ipv6_sockglue.c:167 ipv6_setsockopt+0xd7/0x130 net/ipv6/ipv6_sockglue.c:922 sctp_setsockopt+0x2b6/0x61d0 net/sctp/socket.c:4104 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2975 SYSC_setsockopt net/socket.c:1849 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1828 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 other info that might help us debug this: Chain exists of: sk_lock-AF_INET6 --> &xt[i].mutex --> rtnl_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(rtnl_mutex); lock(&xt[i].mutex); lock(rtnl_mutex); lock(sk_lock-AF_INET6); *** DEADLOCK *** 1 lock held by syz-executor0/5910: #0: (rtnl_mutex){+.+.}, at: [<00000000a6f5af80>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 stack backtrace: CPU: 1 PID: 5910 Comm: syz-executor0 Not tainted 4.16.0-rc1+ #315 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x257 lib/dump_stack.c:53 print_circular_bug.isra.38+0x2cd/0x2dc kernel/locking/lockdep.c:1223 check_prev_add kernel/locking/lockdep.c:1863 [inline] check_prevs_add kernel/locking/lockdep.c:1976 [inline] validate_chain kernel/locking/lockdep.c:2417 [inline] __lock_acquire+0x30a8/0x3e00 kernel/locking/lockdep.c:3431 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3920 lock_sock_nested+0xc2/0x110 net/core/sock.c:2777 lock_sock include/net/sock.h:1463 [inline] do_ipv6_setsockopt.isra.8+0x3c5/0x39d0 net/ipv6/ipv6_sockglue.c:167 ipv6_setsockopt+0xd7/0x130 net/ipv6/ipv6_sockglue.c:922 sctp_setsockopt+0x2b6/0x61d0 net/sctp/socket.c:4104 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2975 SYSC_setsockopt net/socket.c:1849 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1828 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x453a59 RSP: 002b:00007ff3305a8c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007ff3305a96d4 RCX: 0000000000453a59 RDX: 000000000000002d RSI: 0000000000000029 RDI: 0000000000000015 RBP: 000000000071bea0 R08: 000000000000039e R09: 0000000000000000 R10: 0000000020000fe0 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000004f7 R14: 00000000006f77c8 R15: 0000000000000000 netlink: 20 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 20 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 'syz-executor3': attribute type 1 has an invalid length. netlink: 'syz-executor3': attribute type 1 has an invalid length. xt_connbytes: Forcing CT accounting to be enabled TCP: request_sock_TCP: Possible SYN flooding on port 20021. Sending cookies. Check SNMP counters. QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl rfkill: input handler disabled rfkill: input handler enabled kauditd_printk_skb: 10 callbacks suppressed audit: type=1400 audit(1518822271.836:39): avc: denied { map } for pid=6154 comm="syz-executor7" path="/dev/binder0" dev="devtmpfs" ino=9160 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file permissive=1 audit: type=1400 audit(1518822271.869:40): avc: denied { set_context_mgr } for pid=6154 comm="syz-executor7" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=binder permissive=1 binder_alloc: binder_alloc_mmap_handler: 6154 20000000-20002000 already mapped failed -16 audit: type=1400 audit(1518822271.869:41): avc: denied { call } for pid=6154 comm="syz-executor7" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=binder permissive=1 binder: BINDER_SET_CONTEXT_MGR already set audit: type=1400 audit(1518822271.869:42): avc: denied { transfer } for pid=6154 comm="syz-executor7" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=binder permissive=1 binder_alloc: 6154: binder_alloc_buf, no vma binder: 6154:6159 ioctl 40046207 0 returned -16 binder: 6154:6162 transaction failed 29189/-3, size 80-8 line 2957 binder: 6154:6163 IncRefs 0 refcount change on invalid ref 1 ret -22 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 6154:6159 transaction 3 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 3, target dead binder_alloc: binder_alloc_mmap_handler: 6199 20000000-20002000 already mapped failed -16 audit: type=1400 audit(1518822272.299:43): avc: denied { net_bind_service } for pid=6251 comm="syz-executor5" capability=10 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 netlink: 'syz-executor5': attribute type 21 has an invalid length. netlink: 'syz-executor5': attribute type 21 has an invalid length. xt_hashlimit: overflow, rate too high: 0 binder_alloc: binder_alloc_mmap_handler: 6479 20000000-20002000 already mapped failed -16 binder_alloc: 6479: binder_alloc_buf, no vma binder: 6478:6490 transaction failed 29189/-3, size 0-8 line 2957 binder: 6478:6490 ioctl c0306201 2000b000 returned -14 binder: BINDER_SET_CONTEXT_MGR already set binder_alloc: 6479: binder_alloc_buf, no vma binder: 6479:6483 ioctl 40046207 0 returned -16 binder: 6479:6491 transaction failed 29189/-3, size 40-8 line 2957 binder: 6478:6490 ioctl c0045c77 0 returned -22 binder_alloc: binder_alloc_mmap_handler: 6478 20007000-20008000 already mapped failed -16 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 6479:6483 transaction 8 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 8, target dead binder: 6478:6490 transaction failed 29189/-22, size 0-8 line 2842 binder: 6478:6490 ioctl c0306201 2000b000 returned -14 binder: 6478:6490 ioctl c0045c77 0 returned -22 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 audit: type=1400 audit(1518822273.453:44): avc: denied { setfcap } for pid=6577 comm="syz-executor2" capability=31 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 binder: send failed reply for transaction 15 to 6596:6599 binder: 6596:6613 BC_INCREFS_DONE u0000000000000000 no match binder: send failed reply for transaction 19 to 6596:6599 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 syz5: refused to change device tx_queue_len syz5: refused to change device tx_queue_len audit: type=1400 audit(1518822273.764:45): avc: denied { fsetid } for pid=6686 comm="syz-executor0" capability=4 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 audit: type=1400 audit(1518822273.882:46): avc: denied { dyntransition } for pid=6698 comm="syz-executor2" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0,c1 tclass=process permissive=1 audit: type=1400 audit(1518822273.933:47): avc: denied { dyntransition } for pid=6698 comm="syz-executor2" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0,c1 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0,c1 tclass=process permissive=1 mmap: syz-executor4 (6732) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.txt. PPPIOCDETACH file->f_count=2 QAT: failed to copy from user cfg_data. device eql entered promiscuous mode audit: type=1400 audit(1518822274.743:48): avc: denied { getopt } for pid=6956 comm="syz-executor6" 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 netlink: 3 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor6'. syz-executor7 uses obsolete (PF_INET,SOCK_PACKET) device syz7 entered promiscuous mode device syz7 left promiscuous mode device syz7 entered promiscuous mode binder_alloc: binder_alloc_mmap_handler: 7248 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 7248:7256 ioctl 40046207 0 returned -16 binder_alloc: 7248: binder_alloc_buf, no vma binder: 7248:7258 transaction failed 29189/-3, size 40-0 line 2957 binder_alloc: 7248: binder_alloc_buf, no vma binder: 7248:7269 transaction failed 29189/-3, size 0-0 line 2957 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_COMPLETE binder: undelivered transaction 24, process died. binder: undelivered transaction 23, process died. QAT: Invalid ioctl QAT: Invalid ioctl ip_tunnel: non-ECT from 0.0.0.0 with TOS=0x3 ip_tunnel: non-ECT from 0.0.0.0 with TOS=0x3 openvswitch: netlink: Flow set message rejected, Key attribute missing. QAT: Invalid ioctl QAT: Invalid ioctl kauditd_printk_skb: 5 callbacks suppressed audit: type=1400 audit(1518822277.428:54): avc: denied { write } for pid=7545 comm="syz-executor0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:unlabeled_t:s0 tclass=socket permissive=1 audit: type=1400 audit(1518822277.631:55): avc: denied { validate_trans } for pid=7611 comm="syz-executor3" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:security_t:s0 tclass=security permissive=1 audit: type=1400 audit(1518822277.683:56): avc: denied { net_bind_service } for pid=1233 comm="kworker/u5:0" capability=10 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=cap_userns permissive=1 QAT: Invalid ioctl QAT: Invalid ioctl audit: type=1400 audit(1518822278.380:57): avc: denied { sys_ptrace } for pid=7687 comm="ps" capability=19 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=cap_userns permissive=1 ------------[ cut here ]------------ workqueue: WQ_MEM_RECLAIM hwsim_wq:destroy_radio is flushing !WQ_MEM_RECLAIM events_highpri:flush_backlog WARNING: CPU: 1 PID: 1728 at kernel/workqueue.c:2439 check_flush_dependency+0x239/0x380 kernel/workqueue.c:2435