====================================================== WARNING: possible circular locking dependency detected 4.16.0-rc1+ #315 Not tainted ------------------------------------------------------ syz-executor2/5503 is trying to acquire lock: (sk_lock-AF_INET6){+.+.}, at: [<0000000058ae48b9>] lock_sock include/net/sock.h:1463 [inline] (sk_lock-AF_INET6){+.+.}, at: [<0000000058ae48b9>] do_ipv6_setsockopt.isra.8+0x3c5/0x39d0 net/ipv6/ipv6_sockglue.c:167 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<0000000082b8348b>] 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_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-executor2/5503: #0: (rtnl_mutex){+.+.}, at: [<0000000082b8348b>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 stack backtrace: CPU: 1 PID: 5503 Comm: syz-executor2 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:00007f7ee9762c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007f7ee97636d4 RCX: 0000000000453a59 RDX: 000000000000002a RSI: 0000000000000029 RDI: 0000000000000013 RBP: 000000000071bea0 R08: 0000000000000066 R09: 0000000000000000 R10: 000000002065cf78 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000004fb R14: 00000000006f7828 R15: 0000000000000000 audit: type=1400 audit(1518826030.321:33): avc: denied { name_connect } for pid=5535 comm="syz-executor4" 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(1518826030.396:34): avc: denied { write } for pid=5567 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_netfilter_socket permissive=1 audit: type=1400 audit(1518826030.457:35): avc: denied { setfcap } for pid=5594 comm="syz-executor0" 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 audit: type=1400 audit(1518826030.458:36): avc: denied { map } for pid=5592 comm="syz-executor5" path="/dev/kvm" dev="devtmpfs" ino=9067 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:kvm_device_t:s0 tclass=chr_file permissive=1 audit: type=1400 audit(1518826030.557:37): avc: denied { map } for pid=5606 comm="syz-executor4" path=2F616E6F6E5F6875676570616765202864656C6574656429 dev="hugetlbfs" ino=14890 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:hugetlbfs_t:s0 tclass=file permissive=1 binder: 5676:5682 BC_DEAD_BINDER_DONE 0000000000000000 not found device eql entered promiscuous mode binder: 5676:5682 BC_FREE_BUFFER u0000000000000000 no match binder: 5676:5682 got transaction to invalid handle binder: 5676:5682 transaction failed 29201/-22, size 0-0 line 2842 binder: 5676:5697 unknown command 0 binder: 5676:5697 ioctl c0306201 20004000 returned -22 SELinux: policydb magic number 0x0 does not match expected magic number 0xf97cff8c binder: undelivered TRANSACTION_ERROR: 29201 SELinux: failed to load policy SELinux: policydb magic number 0x0 does not match expected magic number 0xf97cff8c SELinux: failed to load policy device eql entered promiscuous mode 9pnet_virtio: no channels available for device ./file0 9pnet_virtio: no channels available for device ./file0 binder: 5809:5812 ioctl 4138ae84 20b41ec8 returned -22 binder: 5809:5812 ioctl 4138ae84 20b41ec8 returned -22 binder: BINDER_SET_CONTEXT_MGR already set binder: 5809:5819 ioctl 40046207 0 returned -16 xt_connbytes: Forcing CT accounting to be enabled Cannot find del_set index 0 as target Cannot find del_set index 0 as target ip6_tables: ip6tables: counters copy to user failed while replacing table ip6_tables: ip6tables: counters copy to user failed while replacing table PPPIOCDETACH file->f_count=2 binder: 5997:6001 transaction failed 29189/-22, size 0-0 line 2842 TCP: request_sock_TCPv6: Possible SYN flooding on port 20022. Sending cookies. Check SNMP counters. binder: 5997:6011 transaction failed 29189/-22, size 0-0 line 2842 binder: undelivered TRANSACTION_ERROR: 29189 irq bypass consumer (token 000000008dd0a91b) registration fails: -16 binder: undelivered TRANSACTION_ERROR: 29189 irq bypass consumer (token 0000000098faa511) registration fails: -16 netlink: 'syz-executor2': attribute type 1 has an invalid length. binder: BINDER_SET_CONTEXT_MGR already set binder: 6124:6127 ioctl 40046207 0 returned -16 xt_hashlimit: max count of 1 reached binder: BINDER_SET_CONTEXT_MGR already set binder: 6124:6139 ioctl 40046207 0 returned -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 6124:6127 ioctl 40046207 0 returned -16 xt_hashlimit: max count of 1 reached encrypted_key: insufficient parameters specified encrypted_key: insufficient parameters specified sctp: [Deprecated]: syz-executor4 (pid 6247) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead RDS: rds_bind could not find a transport for 224.0.0.1, load rds_tcp or rds_rdma? xt_connbytes: Forcing CT accounting to be enabled Cannot find add_set index 0 as target Cannot find add_set index 0 as target autofs4:pid:6438:check_dev_ioctl_version: ioctl control interface version mismatch: kernel(1.1), user(3590324411.0), cmd(0x0000937e) autofs4:pid:6438:validate_dev_ioctl: invalid device control module version supplied for cmd(0x0000937e) device eql entered promiscuous mode xt_HL: TTL: invalid or unknown mode 3 xt_HL: TTL: invalid or unknown mode 3 kauditd_printk_skb: 7 callbacks suppressed audit: type=1400 audit(1518826033.887:45): avc: denied { map } for pid=6647 comm="syz-executor2" path="/dev/vcs3" dev="devtmpfs" ino=12787 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:tty_device_t:s0 tclass=chr_file permissive=1 xt_connbytes: Forcing CT accounting to be enabled audit: type=1400 audit(1518826034.276:46): avc: denied { map } for pid=6790 comm="syz-executor0" path="/proc/301/net/pfkey" dev="proc" ino=4026533189 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:proc_net_t:s0 tclass=file permissive=1 binder: 6802:6808 ERROR: BC_REGISTER_LOOPER called without request binder: 6808 RLIMIT_NICE not set binder: 6808 RLIMIT_NICE not set binder: BINDER_SET_CONTEXT_MGR already set binder: 6802:6819 ERROR: BC_REGISTER_LOOPER called without request binder: 6802:6808 ioctl 40046207 0 returned -16 binder: 6819 RLIMIT_NICE not set binder_alloc: 6802: binder_alloc_buf, no vma binder: 6802:6808 transaction failed 29189/-3, size 0-0 line 2957 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 6802:6819 transaction 12 out, still active binder: undelivered TRANSACTION_COMPLETE binder: release 6802:6808 transaction 12 in, still active binder: send failed reply for transaction 12, target dead QAT: Invalid ioctl QAT: Invalid ioctl encrypted_key: master key parameter '' is invalid syz-executor7 (6886) used greatest stack depth: 14976 bytes left sg_write: data in/out 524252/24 bytes for SCSI command 0x0-- guessing data in; program syz-executor3 not setting count and/or reply_len properly audit: type=1400 audit(1518826034.808:47): avc: denied { setgid } for pid=6939 comm="syz-executor4" 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(1518826034.809:48): avc: denied { fsetid } for pid=6948 comm="syz-executor6" 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 xt_ecn: cannot match TCP bits in rule for non-tcp packets xt_ecn: cannot match TCP bits in rule for non-tcp packets QAT: Invalid ioctl arp_tables: arp_tables: error: 'îÏ ¡˜™«arY,Gµí>+×t€ó_Ãm ' QAT: Invalid ioctl arp_tables: arp_tables: error: 'îÏ ¡˜™«arY,Gµí>+×t€ó_Ãm ' binder: BINDER_SET_CONTEXT_MGR already set binder: 7065:7078 ioctl 40046207 0 returned -16 xt_connbytes: Forcing CT accounting to be enabled x_tables: ip_tables: icmp match: only valid for protocol 1 x_tables: ip_tables: icmp match: only valid for protocol 1 device eql entered promiscuous mode netlink: 8 bytes leftover after parsing attributes in process `syz-executor7'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor7'. ip_tables: error: `{‹ÅÉMà>¿¨ÀƒzýQ°Â “ÿ|,lûL _ 3¸' ptrace attach of "/root/syz-executor3"[4206] was attempted by "/root/syz-executor3"[7322] mmap: syz-executor5 (7413) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.txt. audit: type=1400 audit(1518826036.453:49): avc: denied { setpcap } for pid=7433 comm="syz-executor3" capability=8 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(1518826036.818:50): avc: denied { name_bind } for pid=7543 comm="syz-executor1" src=20004 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:port_t:s0 tclass=dccp_socket permissive=1 SELinux: Invalid class 85 audit: type=1400 audit(1518826036.818:51): avc: denied { node_bind } for pid=7543 comm="syz-executor1" saddr=::1 src=20004 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:node_t:s0 tclass=dccp_socket permissive=1 SELinux: Invalid class 85 audit: type=1400 audit(1518826037.054:52): avc: denied { map } for pid=7603 comm="syz-executor3" path="socket:[21895]" dev="sockfs" ino=21895 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=rawip_socket permissive=1 irq bypass consumer (token 00000000bafd9073) registration fails: -16 device eql entered promiscuous mode netlink: 3 bytes leftover after parsing attributes in process `syz-executor2'. Protocol error: SET target dimension is over the limit! netlink: 3 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 'syz-executor2': attribute type 1 has an invalid length. binder_alloc: binder_alloc_mmap_handler: 7925 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 7925:7940 ioctl 40046207 0 returned -16 binder: 7963:7972 ioctl c018620b 2009cfe8 returned -14 QAT: failed to copy from user. xt_connbytes: Forcing CT accounting to be enabled binder: 7999:8001 transaction failed 29189/-22, size 40-0 line 2842 binder: undelivered TRANSACTION_ERROR: 29189 ieee80211 phy2: Selected rate control algorithm 'minstrel_ht' binder: 7999:8006 transaction failed 29189/-22, size 40-0 line 2842 binder: undelivered TRANSACTION_ERROR: 29189 ieee80211 phy3: Selected rate control algorithm 'minstrel_ht'