====================================================== WARNING: possible circular locking dependency detected 4.16.0-rc2+ #326 Not tainted ------------------------------------------------------ syz-executor3/6055 is trying to acquire lock: (sk_lock-AF_INET){+.+.}, at: [<0000000059bb7f35>] lock_sock include/net/sock.h:1463 [inline] (sk_lock-AF_INET){+.+.}, at: [<0000000059bb7f35>] do_ip_getsockopt+0x1b3/0x2170 net/ipv4/ip_sockglue.c:1329 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<00000000feff84c7>] 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 rawv6_setsockopt+0x4a/0xf0 net/ipv6/raw.c:1060 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_arpt_get_ctl+0x2a9/0xa00 net/ipv4/netfilter/arp_tables.c:1481 nf_sockopt net/netfilter/nf_sockopt.c:104 [inline] nf_getsockopt+0x6a/0xc0 net/netfilter/nf_sockopt.c:122 ip_getsockopt+0x15c/0x220 net/ipv4/ip_sockglue.c:1571 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_INET){+.+.}: 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_ip_getsockopt+0x1b3/0x2170 net/ipv4/ip_sockglue.c:1329 ip_getsockopt+0x90/0x220 net/ipv4/ip_sockglue.c:1560 udp_getsockopt+0x45/0x80 net/ipv4/udp.c:2478 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 other info that might help us debug this: Chain exists of: sk_lock-AF_INET --> &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_INET); *** DEADLOCK *** 1 lock held by syz-executor3/6055: #0: (rtnl_mutex){+.+.}, at: [<00000000feff84c7>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 stack backtrace: CPU: 0 PID: 6055 Comm: syz-executor3 Not tainted 4.16.0-rc2+ #326 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/0x24d 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_ip_getsockopt+0x1b3/0x2170 net/ipv4/ip_sockglue.c:1329 ip_getsockopt+0x90/0x220 net/ipv4/ip_sockglue.c:1560 udp_getsockopt+0x45/0x80 net/ipv4/udp.c:2478 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 RIP: 0033:0x453de9 RSP: 002b:00007f3e2065ac68 EFLAGS: 00000246 ORIG_RAX: 0000000000000037 RAX: ffffffffffffffda RBX: 00007f3e2065b6d4 RCX: 0000000000453de9 RDX: 0000000000000029 RSI: 0000000000000000 RDI: 0000000000000014 RBP: 000000000072bea0 R08: 0000000020000080 R09: 0000000000000000 R10: 0000000020000040 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000000f2 R14: 00000000006f1750 R15: 0000000000000000 bond0 (unregistering): Released all slaves device eql entered promiscuous mode IPVS: ftp: loaded support on port[0] = 21 IPv6: ADDRCONF(NETDEV_UP): bridge0: link is not ready IPv6: ADDRCONF(NETDEV_UP): bond0: link is not ready 8021q: adding VLAN 0 to HW filter on device bond0 IPv6: ADDRCONF(NETDEV_UP): veth0: link is not ready IPv6: ADDRCONF(NETDEV_UP): veth1: link is not ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth0: link becomes ready kauditd_printk_skb: 12 callbacks suppressed audit: type=1400 audit(1519463171.475:33): avc: denied { map } for pid=6318 comm="syz-executor4" path="/dev/binder0" dev="devtmpfs" ino=1222 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(1519463171.507:34): avc: denied { call } for pid=6318 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=binder permissive=1 binder: BINDER_SET_CONTEXT_MGR already set audit: type=1400 audit(1519463171.509:35): avc: denied { transfer } for pid=6318 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=binder permissive=1 binder_alloc: 6318: binder_alloc_buf, no vma binder: 6318:6322 transaction failed 29189/-3, size 40-8 line 2963 binder: 6318:6337 ioctl 40046207 0 returned -16 netlink: 11 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 11 bytes leftover after parsing attributes in process `syz-executor1'. binder: undelivered TRANSACTION_ERROR: 29189 binder: release 6318:6337 transaction 6 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 6, target dead net_ratelimit: 6 callbacks suppressed IPv6: veth0: IPv6 duplicate address fe80::3:d used by aa:aa:aa:aa:03:0d detected! QAT: Invalid ioctl QAT: Invalid ioctl IPv6: veth1: IPv6 duplicate address fe80::a8aa:aaff:feaa:30d used by aa:aa:aa:aa:03:0d detected! device eql entered promiscuous mode capability: warning: `syz-executor4' uses 32-bit capabilities (legacy support in use) audit: type=1400 audit(1519463172.553:36): avc: denied { ioctl } for pid=6532 comm="syz-executor1" path="socket:[16277]" dev="sockfs" ino=16277 ioctlcmd=0x4504 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 audit: type=1400 audit(1519463172.639:37): avc: denied { map } for pid=6557 comm="syz-executor5" path=2F6D656D66643A202864656C6574656429 dev="tmpfs" ino=16311 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:tmpfs_t:s0 tclass=file permissive=1 audit: type=1400 audit(1519463172.639:38): avc: denied { name_connect } for pid=6553 comm="syz-executor6" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:port_t:s0 tclass=dccp_socket permissive=1 kernel msg: ebtables bug: please report to author: Total nentries is wrong kernel msg: ebtables bug: please report to author: Total nentries is wrong capability: warning: `syz-executor5' uses deprecated v2 capabilities in a way that may be insecure audit: type=1400 audit(1519463172.852:39): avc: denied { ioctl } for pid=6602 comm="syz-executor5" path="socket:[17232]" dev="sockfs" ino=17232 ioctlcmd=0x894b 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 QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl Protocol error: SET target dimension is over the limit! Protocol error: SET target dimension is over the limit! QAT: Invalid ioctl audit: type=1400 audit(1519463173.066:40): avc: denied { getattr } for pid=6688 comm="syz-executor7" path="socket:[17486]" dev="sockfs" ino=17486 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 mmap: syz-executor1 (6718) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.txt. netlink: 60 bytes leftover after parsing attributes in process `syz-executor5'. ip6t_rpfilter: unknown options encountered QAT: Invalid ioctl x_tables: ip6_tables: TCPMSS target: only valid for protocol 6 ip6t_rpfilter: unknown options encountered ip6t_REJECT: ECHOREPLY is not supported. QAT: Invalid ioctl audit: type=1400 audit(1519463173.287:41): avc: denied { setattr } for pid=6729 comm="syz-executor5" name="NETLINK" dev="sockfs" ino=17509 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 netlink: 60 bytes leftover after parsing attributes in process `syz-executor5'. ip6t_REJECT: ECHOREPLY is not supported. x_tables: ip6_tables: TCPMSS target: only valid for protocol 6 netlink: 'syz-executor5': attribute type 16 has an invalid length. xt_connbytes: Forcing CT accounting to be enabled audit: type=1326 audit(1519463173.421:42): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6758 comm="syz-executor0" exe="/root/syz-executor0" sig=9 arch=c000003e syscall=202 compat=0 ip=0x453de9 code=0x0 ion_ioctl: ioctl validate failed TCP: request_sock_TCPv6: Possible SYN flooding on port 20010. Sending cookies. Check SNMP counters. SELinux: failed to load policy SELinux: failed to load policy device eql entered promiscuous mode ipt_ECN: cannot use TCP operations on a non-tcp rule ipt_ECN: cannot use TCP operations on a non-tcp rule 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 binder: 7503:7511 transaction failed 29189/-22, size 40-8 line 2848 kernel msg: ebtables bug: please report to author: bad policy binder: 7503:7519 transaction failed 29189/-22, size 40-8 line 2848 kernel msg: ebtables bug: please report to author: bad policy Bearer <> rejected, not supported in standalone mode Bearer <> rejected, not supported in standalone mode dccp_xmit_packet: Payload too large (65423) for featneg. dccp_close: ABORT with 65423 bytes unread Bearer <> rejected, not supported in standalone mode Bearer <> rejected, not supported in standalone mode Bearer <> rejected, not supported in standalone mode Bearer <> rejected, not supported in standalone mode Bearer <> rejected, not supported in standalone mode binder: 7696:7719 tried to acquire reference to desc 0, got 1 instead Bearer <> rejected, not supported in standalone mode Bearer <> rejected, not supported in standalone mode Bearer <> rejected, not supported in standalone mode SELinux: unrecognized netlink message: protocol=0 nlmsg_type=35 sclass=netlink_route_socket pig=7839 comm=syz-executor7 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=35 sclass=netlink_route_socket pig=7855 comm=syz-executor7 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=35 sclass=netlink_route_socket pig=7892 comm=syz-executor7 xt_cluster: this node mask cannot be higher than the total number of nodes RDS: rds_bind could not find a transport for 224.0.0.2, load rds_tcp or rds_rdma? kauditd_printk_skb: 11 callbacks suppressed audit: type=1400 audit(1519463176.724:54): avc: denied { map } for pid=7905 comm="syz-executor6" path="mnt:[4026532953]" dev="nsfs" ino=4026532953 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:unlabeled_t:s0 tclass=file permissive=1 RDS: rds_bind could not find a transport for 224.0.0.2, load rds_tcp or rds_rdma? audit: type=1400 audit(1519463176.816:55): avc: denied { shutdown } for pid=7925 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=netlink_generic_socket permissive=1 xt_connbytes: Forcing CT accounting to be enabled audit: type=1400 audit(1519463177.583:56): avc: denied { setopt } for pid=8057 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_generic_socket permissive=1 ieee80211 phy2: Selected rate control algorithm 'minstrel_ht' audit: type=1400 audit(1519463177.637:57): avc: denied { getopt } for pid=8057 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_generic_socket permissive=1 audit: type=1400 audit(1519463177.657:58): avc: denied { map } for pid=8072 comm="syz-executor0" path="/84/file0/bus" dev="ramfs" ino=22610 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:ramfs_t:s0 tclass=file permissive=1 audit: type=1400 audit(1519463177.718:59): avc: denied { setuid } for pid=8098 comm="syz-executor1" capability=7 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 ieee80211 phy3: Selected rate control algorithm 'minstrel_ht' FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 1 CPU: 1 PID: 8153 Comm: syz-executor7 Not tainted 4.16.0-rc2+ #326 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/0x24d lib/dump_stack.c:53 fail_dump lib/fault-inject.c:51 [inline] should_fail+0x8c0/0xa40 lib/fault-inject.c:149 should_failslab+0xec/0x120 mm/failslab.c:32 slab_pre_alloc_hook mm/slab.h:422 [inline] slab_alloc_node mm/slab.c:3286 [inline] kmem_cache_alloc_node+0x56/0x760 mm/slab.c:3629 __alloc_skb+0xf1/0x780 net/core/skbuff.c:193 alloc_skb include/linux/skbuff.h:983 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1180 [inline] netlink_sendmsg+0xa86/0xe60 net/netlink/af_netlink.c:1872 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg+0xca/0x110 net/socket.c:640 ___sys_sendmsg+0x767/0x8b0 net/socket.c:2046 __sys_sendmsg+0xe5/0x210 net/socket.c:2080 SYSC_sendmsg net/socket.c:2091 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2087 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x453de9 RSP: 002b:00007f7d4910bc68 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f7d4910c6d4 RCX: 0000000000453de9 RDX: 0000000000000000 RSI: 0000000020023000 RDI: 0000000000000013 RBP: 000000000072bea0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000014 R13: 00000000000004b1 R14: 00000000006f7138 R15: 0000000000000000 Bearer <> rejected, not supported in standalone mode audit: type=1400 audit(1519463178.302:60): avc: denied { connect } for pid=8145 comm="syz-executor1" 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 Bearer <> rejected, not supported in standalone mode Bearer <> rejected, not supported in standalone mode Bearer <> rejected, not supported in standalone mode Bearer <> rejected, not supported in standalone mode Bearer <> rejected, not supported in standalone mode Bearer <> rejected, not supported in standalone mode Bearer <> rejected, not supported in standalone mode audit: type=1400 audit(1519463178.971:61): avc: denied { map } for pid=8393 comm="syz-executor5" path="/dev/adsp7" dev="devtmpfs" ino=22188 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:device_t:s0 tclass=file permissive=1 Bearer <> rejected, not supported in standalone mode Bearer <> rejected, not supported in standalone mode Bearer <> rejected, not supported in standalone mode Bearer <> rejected, not supported in standalone mode Bearer <> rejected, not supported in standalone mode TCP: request_sock_TCP: Possible SYN flooding on port 20006. Sending cookies. Check SNMP counters. audit: type=1400 audit(1519463179.401:62): avc: denied { create } for pid=8512 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=netlink_rdma_socket permissive=1 audit: type=1400 audit(1519463179.401:63): avc: denied { write } for pid=8512 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=netlink_rdma_socket permissive=1 Bearer <> rejected, not supported in standalone mode Bearer <> rejected, not supported in standalone mode SELinux: unrecognized netlink message: protocol=0 nlmsg_type=56 sclass=netlink_route_socket pig=8569 comm=syz-executor2 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=56 sclass=netlink_route_socket pig=8573 comm=syz-executor2