====================================================== WARNING: possible circular locking dependency detected 4.16.0-rc1+ #314 Not tainted ------------------------------------------------------ syz-executor0/5522 is trying to acquire lock: (sk_lock-AF_INET6){+.+.}, at: [<000000007725db2d>] lock_sock include/net/sock.h:1463 [inline] (sk_lock-AF_INET6){+.+.}, at: [<000000007725db2d>] do_ip_setsockopt.isra.12+0x1d9/0x3210 net/ipv4/ip_sockglue.c:646 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<0000000038410352>] 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_ip_setsockopt.isra.12+0x1d9/0x3210 net/ipv4/ip_sockglue.c:646 ip_setsockopt+0x3a/0xa0 net/ipv4/ip_sockglue.c:1252 udp_setsockopt+0x45/0x80 net/ipv4/udp.c:2401 ipv6_setsockopt+0xa0/0x130 net/ipv6/ipv6_sockglue.c:917 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/5522: #0: (rtnl_mutex){+.+.}, at: [<0000000038410352>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 stack backtrace: CPU: 1 PID: 5522 Comm: syz-executor0 Not tainted 4.16.0-rc1+ #314 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_ip_setsockopt.isra.12+0x1d9/0x3210 net/ipv4/ip_sockglue.c:646 ip_setsockopt+0x3a/0xa0 net/ipv4/ip_sockglue.c:1252 udp_setsockopt+0x45/0x80 net/ipv4/udp.c:2401 ipv6_setsockopt+0xa0/0x130 net/ipv6/ipv6_sockglue.c:917 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:00007fae41a1cc68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007fae41a1d6d4 RCX: 0000000000453a59 RDX: 000000000000002d RSI: 0000000000000000 RDI: 0000000000000014 RBP: 000000000071bea0 R08: 0000000000000088 R09: 0000000000000000 R10: 00000000200e1000 R11: 0000000000000246 R12: 00000000ffffffff R13: 000000000000051b R14: 00000000006f7b28 R15: 0000000000000000 QAT: Invalid ioctl QAT: Invalid ioctl syz-executor0 (5601) used greatest stack depth: 15520 bytes left xt_connbytes: Forcing CT accounting to be enabled audit: type=1400 audit(1518799025.788:22): avc: denied { ipc_owner } for pid=5624 comm="syz-executor7" capability=15 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 Cannot find add_set index 0 as target Cannot find add_set index 0 as target TCP: request_sock_TCP: Possible SYN flooding on port 20030. Sending cookies. Check SNMP counters. audit: type=1400 audit(1518799026.089:23): avc: denied { create } for pid=5719 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_crypto_socket permissive=1 audit: type=1400 audit(1518799026.136:24): avc: denied { ioctl } for pid=5719 comm="syz-executor3" path="socket:[14979]" dev="sockfs" ino=14979 ioctlcmd=0xaf30 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_crypto_socket permissive=1 audit: type=1400 audit(1518799026.177:25): avc: denied { bind } for pid=5719 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_crypto_socket permissive=1 syz-executor3 uses obsolete (PF_INET,SOCK_PACKET) binder: 5771:5774 transaction failed 29189/-22, size 0-0 line 2842 binder: 5771:5791 transaction failed 29189/-22, size 0-0 line 2842 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29189 audit: type=1400 audit(1518799026.382:26): avc: denied { name_connect } for pid=5801 comm="syz-executor0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:port_t:s0 tclass=dccp_socket permissive=1 audit: type=1400 audit(1518799026.525:27): avc: denied { getopt } for pid=5844 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_generic_socket permissive=1 RDS: rds_bind could not find a transport for 224.0.0.1, load rds_tcp or rds_rdma? RDS: rds_bind could not find a transport for 224.0.0.1, load rds_tcp or rds_rdma? xt_l2tp: wrong L2TP version: 0 xt_l2tp: wrong L2TP version: 0 device eql entered promiscuous mode netlink: 44 bytes leftover after parsing attributes in process `syz-executor6'. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=128 sclass=netlink_route_socket pig=6105 comm=syz-executor4 ipt_CLUSTERIP: Please specify destination IP netlink: 44 bytes leftover after parsing attributes in process `syz-executor6'. ipt_CLUSTERIP: Please specify destination IP SELinux: unrecognized netlink message: protocol=0 nlmsg_type=128 sclass=netlink_route_socket pig=6111 comm=syz-executor4 netlink: 'syz-executor3': attribute type 21 has an invalid length. netlink: 'syz-executor3': attribute type 21 has an invalid length. x_tables: ip6_tables: rpfilter match: used from hooks PREROUTING/OUTPUT, but only valid from PREROUTING netlink: 'syz-executor7': attribute type 1 has an invalid length. netlink: 'syz-executor7': attribute type 1 has an invalid length. netlink: 'syz-executor0': attribute type 4 has an invalid length. netlink: 17 bytes leftover after parsing attributes in process `syz-executor0'. netlink: 'syz-executor0': attribute type 4 has an invalid length. netlink: 17 bytes leftover after parsing attributes in process `syz-executor0'. A link change request failed with some changes committed already. Interface vcan0 may have been left with an inconsistent configuration, please check. A link change request failed with some changes committed already. Interface vcan0 may have been left with an inconsistent configuration, please check. kvm: vcpu 0: requested 68374 ns lapic timer period limited to 500000 ns kvm: vcpu 0: requested 68374 ns lapic timer period limited to 500000 ns netlink: 'syz-executor7': attribute type 7 has an invalid length. kauditd_printk_skb: 12 callbacks suppressed audit: type=1400 audit(1518799029.730:40): avc: denied { map } for pid=6619 comm="syz-executor6" path="/dev/usbmon0" dev="devtmpfs" ino=9115 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:usbmon_device_t:s0 tclass=chr_file permissive=1 netlink: 20 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 20 bytes leftover after parsing attributes in process `syz-executor1'. xt_connbytes: Forcing CT accounting to be enabled audit: type=1400 audit(1518799030.043:41): avc: denied { map } for pid=6708 comm="syz-executor2" path="/dev/binder0" dev="devtmpfs" ino=1159 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file permissive=1 binder: 6770:6773 Acquire 1 refcount change on invalid ref 0 ret -22 binder: 6770:6773 Acquire 1 refcount change on invalid ref 0 ret -22 audit: type=1400 audit(1518799030.346:42): avc: denied { map } for pid=6812 comm="syz-executor6" path="socket:[18808]" dev="sockfs" ino=18808 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=packet_socket permissive=1 xt_hashlimit: hashlimit invalid rate xt_hashlimit: hashlimit invalid rate audit: type=1400 audit(1518799031.035:43): avc: denied { create } for pid=7020 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_fib_lookup_socket permissive=1 xt_CT: You must specify a L4 protocol, and not use inversions on it. xt_CT: You must specify a L4 protocol, and not use inversions on it. audit: type=1400 audit(1518799031.064:44): avc: denied { write } for pid=7020 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_fib_lookup_socket permissive=1 ipt_CLUSTERIP: ipt_CLUSTERIP is deprecated and it will removed soon, use xt_cluster instead audit: type=1400 audit(1518799031.129:45): avc: denied { map } for pid=7040 comm="syz-executor2" path="/dev/net/tun" dev="devtmpfs" ino=9112 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:tun_tap_device_t:s0 tclass=chr_file permissive=1 QAT: Invalid ioctl QAT: Invalid ioctl audit: type=1400 audit(1518799031.501:46): avc: denied { ipc_lock } for pid=7166 comm="syz-executor6" 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 ip6t_REJECT: TCP_RESET illegal for non-tcp 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 ip6t_REJECT: TCP_RESET illegal for non-tcp openvswitch: netlink: Flow get message rejected, Key attribute missing. openvswitch: netlink: Flow get message rejected, Key attribute missing. QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl audit: type=1400 audit(1518799033.358:47): avc: denied { map } for pid=7484 comm="syz-executor6" path="/dev/snd/pcmC0D0c" dev="devtmpfs" ino=1198 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:sound_device_t:s0 tclass=chr_file permissive=1 xt_connbytes: Forcing CT accounting to be enabled netlink: 'syz-executor4': attribute type 1 has an invalid length. netlink: 'syz-executor4': attribute type 1 has an invalid length. syz-executor3 (7518) used greatest stack depth: 11264 bytes left xt_connbytes: Forcing CT accounting to be enabled xt_connbytes: Forcing CT accounting to be enabled device eql entered promiscuous mode Cannot find add_set index 0 as target Cannot find add_set index 0 as target audit: type=1400 audit(1518799034.182:48): avc: denied { bind } for pid=7692 comm="syz-executor5" 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: 'syz-executor4': attribute type 1 has an invalid length. netlink: 'syz-executor4': attribute type 1 has an invalid length. dccp_invalid_packet: P.Data Offset(66) too large dccp_invalid_packet: P.Data Offset(66) too large audit: type=1326 audit(1518799034.646:49): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=7779 comm="syz-executor4" exe="/root/syz-executor4" sig=9 arch=c000003e syscall=202 compat=0 ip=0x453a59 code=0x0