====================================================== WARNING: possible circular locking dependency detected 4.16.0-rc1+ #315 Not tainted ------------------------------------------------------ syz-executor4/5458 is trying to acquire lock: (sk_lock-AF_INET6){+.+.}, at: [<0000000014496e0b>] lock_sock include/net/sock.h:1463 [inline] (sk_lock-AF_INET6){+.+.}, at: [<0000000014496e0b>] do_ipv6_setsockopt.isra.8+0x3c5/0x39d0 net/ipv6/ipv6_sockglue.c:167 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<00000000b315a739>] 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+0x242/0x380 net/ipv6/netfilter/ip6_tables.c:673 __do_replace+0x7ac/0xa70 net/ipv6/netfilter/ip6_tables.c:1108 do_replace net/ipv6/netfilter/ip6_tables.c:1164 [inline] do_ip6t_set_ctl+0x40f/0x5f0 net/ipv6/netfilter/ip6_tables.c:1686 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x67/0xc0 net/netfilter/nf_sockopt.c:115 ipv6_setsockopt+0x10b/0x130 net/ipv6/ipv6_sockglue.c:927 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 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 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-executor4/5458: #0: (rtnl_mutex){+.+.}, at: [<00000000b315a739>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 stack backtrace: CPU: 1 PID: 5458 Comm: syz-executor4 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 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 RIP: 0033:0x453a59 RSP: 002b:00007f7c82060c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007f7c820616d4 RCX: 0000000000453a59 RDX: 000000000000001c RSI: 0000000000000029 RDI: 0000000000000014 RBP: 000000000071bea0 R08: 0000000000000014 R09: 0000000000000000 R10: 0000000020000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000509 R14: 00000000006f7978 R15: 0000000000000000 audit: type=1400 audit(1518841976.476:25): avc: denied { dac_read_search } for pid=5477 comm="syz-executor0" capability=2 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 device eql entered promiscuous mode audit: type=1400 audit(1518841976.797:26): avc: denied { setgid } for pid=5570 comm="syz-executor3" capability=6 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(1518841976.914:27): avc: denied { map } for pid=5595 comm="syz-executor3" path=2F616E6F6E5F6875676570616765202864656C6574656429 dev="hugetlbfs" ino=15104 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:hugetlbfs_t:s0 tclass=file permissive=1 audit: type=1400 audit(1518841977.023:28): avc: denied { map } for pid=5612 comm="syz-executor1" path="/dev/ashmem" dev="devtmpfs" ino=103 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file permissive=1 mmap: syz-executor3 (5635) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.txt. print_req_error: I/O error, dev loop0, sector 0 audit: type=1400 audit(1518841977.574:29): avc: denied { map_read } for pid=5763 comm="syz-executor0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=bpf permissive=1 audit: type=1400 audit(1518841977.641:30): avc: denied { write } for pid=5785 comm="syz-executor3" 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 capability: warning: `syz-executor6' uses 32-bit capabilities (legacy support in use) snd_dummy snd_dummy.0: control 120:0:0:Î:0 is already present QAT: Invalid ioctl QAT: Invalid ioctl SELinux: unrecognized netlink message: protocol=0 nlmsg_type=62459 sclass=netlink_route_socket pig=6023 comm=syz-executor2 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=62459 sclass=netlink_route_socket pig=6023 comm=syz-executor2 dccp_invalid_packet: P.type (REQUEST) not Data || [Data]Ack, while P.X == 0 dccp_invalid_packet: P.type (REQUEST) not Data || [Data]Ack, while P.X == 0 arp_tables: arp_tables: error: 'îÏ ¡˜™«arY,Gµí>+×t€ó_Ãm ' arp_tables: arp_tables: error: 'îÏ ¡˜™«arY,Gµí>+×t€ó_Ãm ' snd_dummy snd_dummy.0: control 120:0:0:Î:0 is already present snd_dummy snd_dummy.0: control 120:0:0:Î:0 is already present syz-executor3 (6221) used greatest stack depth: 16336 bytes left SELinux: unrecognized netlink message: protocol=9 nlmsg_type=22 sclass=netlink_audit_socket pig=6388 comm=syz-executor0 SELinux: unrecognized netlink message: protocol=9 nlmsg_type=22 sclass=netlink_audit_socket pig=6388 comm=syz-executor0 binder: 6455:6462 ioctl c0306201 20007000 returned -14 binder: 6455:6471 ioctl c0306201 20007000 returned -14 device eql entered promiscuous mode device eql entered promiscuous mode kauditd_printk_skb: 14 callbacks suppressed audit: type=1400 audit(1518841980.382:45): avc: denied { setattr } for pid=6602 comm="syz-executor4" name="NETLINK" dev="sockfs" ino=18730 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(1518841980.382:46): avc: denied { ioctl } for pid=6602 comm="syz-executor4" path="socket:[18730]" dev="sockfs" ino=18730 ioctlcmd=0x89e3 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(1518841980.388:47): avc: denied { getopt } for pid=6602 comm="syz-executor4" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 rfkill: input handler disabled rfkill: input handler enabled ipt_CLUSTERIP: Please specify destination IP openvswitch: netlink: Either Ethernet header or EtherType is required. binder: 6714 RLIMIT_NICE not set openvswitch: netlink: Either Ethernet header or EtherType is required. binder: 6731 RLIMIT_NICE not set binder: undelivered death notification, 0000000000000000 binder: undelivered death notification, 0000000000000000 ptrace attach of "/root/syz-executor1"[4280] was attempted by "/root/syz-executor1"[6912] ptrace attach of "/root/syz-executor1"[4280] was attempted by "/root/syz-executor1"[6923] audit: type=1400 audit(1518841981.601:48): avc: denied { ioctl } for pid=6939 comm="syz-executor0" path="socket:[18173]" dev="sockfs" ino=18173 ioctlcmd=0x89e0 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=sock_file permissive=1 IPVS: Scheduler module ip_vs_ not found IPVS: Scheduler module ip_vs_ not found *** Guest State *** CR0: actual=0xffffffff9ffffffc, shadow=0xfffffffffffffffc, gh_mask=fffffffffffffff7 CR4: actual=0x0000000000002060, shadow=0x0000000000000020, gh_mask=ffffffffffffe871 CR3 = 0x0000000000000000 PDPTR0 = 0x0000000100000001 PDPTR1 = 0x0000001900000019 PDPTR2 = 0x0000000100000001 PDPTR3 = 0x0000001900000019 RSP = 0x0000000000000000 RIP = 0x000000000000fff0 RFLAGS=0x00010002 DR7 = 0x0000000000000400 Sysenter RSP=0000000000000000 CS:RIP=0000:0000000000000000 CS: sel=0x0000, attr=0x10000, limit=0x00000000, base=0x0000000000000000 DS: sel=0x0000, attr=0x10000, limit=0x00000000, base=0x0000000000000000 SS: sel=0x0000, attr=0x10000, limit=0x00000000, base=0x0000000000000000 ES: sel=0x0000, attr=0x10000, limit=0x00000000, base=0x0000000000000000 FS: sel=0x0000, attr=0x10000, limit=0x00000000, base=0x0000000000000000 GS: sel=0x0000, attr=0x10000, limit=0x00000000, base=0x0000000000000000 GDTR: limit=0x00000000, base=0x0000000000000000 LDTR: sel=0x0000, attr=0x10000, limit=0x00000000, base=0x0000000000000000 IDTR: limit=0x00000000, base=0x0000000000000000 TR: sel=0x0000, attr=0x10000, limit=0x00000000, base=0x0000000000000000 EFER = 0x0000000000000000 PAT = 0x0007040600070406 DebugCtl = 0x0000000000000000 DebugExceptions = 0x0000000000000000 Interruptibility = 00000000 ActivityState = 00000000 *** Host State *** RIP = 0xffffffff811cd915 RSP = 0xffff8801acb3f3b8 CS=0010 SS=0018 DS=0000 ES=0000 FS=0000 GS=0000 TR=0040 FSBase=00007f7c8203f700 GSBase=ffff8801db500000 TRBase=fffffe0000034000 GDTBase=fffffe0000032000 IDTBase=fffffe0000000000 CR0=0000000080050033 CR3=00000001cf8fb001 CR4=00000000001626e0 Sysenter RSP=fffffe0000033200 CS:RIP=0010:ffffffff85a01e70 EFER = 0x0000000000000d01 PAT = 0x0000000000000000 *** Control State *** PinBased=0000003f CPUBased=b5986dfa SecondaryExec=000000c2 EntryControls=0000d1ff ExitControls=0023efff ExceptionBitmap=00060042 PFECmask=00000000 PFECmatch=00000000 VMEntry: intr_info=80000306 errcode=00000000 ilen=00000000 VMExit: intr_info=00000000 errcode=00000000 ilen=00000003 reason=80000021 qualification=0000000000000000 IDTVectoring: info=00000000 errcode=00000000 TSC Offset = 0xffffffe40c06d8da EPT pointer = 0x00000001c66d001e audit: type=1400 audit(1518841982.417:49): avc: denied { ipc_lock } for pid=7134 comm="syz-executor0" capability=14 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 xt_policy: neither incoming nor outgoing policy selected QAT: Invalid ioctl QAT: Invalid ioctl syz-executor5 (7325) used greatest stack depth: 15728 bytes left binder: 7400:7402 unknown command 0 binder: 7400:7402 ioctl c0306201 2000a000 returned -22 audit: type=1400 audit(1518841983.228:50): avc: denied { call } for pid=7400 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: 7400 20000000-20002000 already mapped failed -16 audit: type=1400 audit(1518841983.228:51): avc: denied { transfer } for pid=7400 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 binder: 7400:7402 ioctl 40046207 0 returned -16 binder: 7400:7428 unknown command 0 binder: 7400:7428 ioctl c0306201 2000a000 returned -22 binder: release 7400:7402 transaction 10 out, still active binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 10, target dead ipt_CLUSTERIP: Please specify destination IP ipt_CLUSTERIP: Please specify destination IP binder: 7587:7589 got transaction to invalid handle binder: 7587:7589 transaction failed 29201/-22, size 0-8 line 2842 audit: type=1400 audit(1518841983.863:52): avc: denied { create } for pid=7591 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_connector_socket permissive=1 audit: type=1400 audit(1518841983.866:53): avc: denied { ioctl } for pid=7591 comm="syz-executor6" path="socket:[19851]" dev="sockfs" ino=19851 ioctlcmd=0x8910 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_connector_socket permissive=1 audit: type=1400 audit(1518841983.867:54): avc: denied { bind } for pid=7591 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_connector_socket permissive=1 binder: undelivered TRANSACTION_ERROR: 29201 snd_dummy snd_dummy.0: control 120:0:0:Î:0 is already present snd_dummy snd_dummy.0: control 120:0:0:Î:0 is already present netlink: 40 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 40 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 'syz-executor1': attribute type 26 has an invalid length. binder: 7788:7799 transaction failed 29189/-22, size 0-0 line 2842 binder: 7788:7810 transaction failed 29189/-22, size 0-0 line 2842 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 xt_connbytes: Forcing CT accounting to be enabled SELinux: unrecognized netlink message: protocol=0 nlmsg_type=25462 sclass=netlink_route_socket pig=7858 comm=syz-executor0 QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl NFQUEUE: number of total queues is 0 QAT: Invalid ioctl NFQUEUE: number of total queues is 0 QAT: Invalid ioctl binder_alloc: binder_alloc_mmap_handler: 7967 20fa2000-20fa3000 already mapped failed -16 binder_alloc: binder_alloc_mmap_handler: 7967 20fa2000-20fa3000 already mapped failed -16 ipt_REJECT: TCP_RESET invalid for non-tcp ipt_REJECT: TCP_RESET invalid for non-tcp