====================================================== WARNING: possible circular locking dependency detected 4.16.0-rc2+ #323 Not tainted ------------------------------------------------------ syz-executor5/5445 is trying to acquire lock: (sk_lock-AF_INET){+.+.}, at: [<000000003e72c295>] lock_sock include/net/sock.h:1463 [inline] (sk_lock-AF_INET){+.+.}, at: [<000000003e72c295>] do_ip_getsockopt+0x1b3/0x2170 net/ipv4/ip_sockglue.c:1329 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<00000000c3cabd44>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 audit: type=1400 audit(1519224617.865:31): avc: denied { set_context_mgr } for pid=5456 comm="syz-executor2" 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 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-executor5/5445: #0: (rtnl_mutex){+.+.}, at: [<00000000c3cabd44>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 stack backtrace: CPU: 0 PID: 5445 Comm: syz-executor5 Not tainted 4.16.0-rc2+ #323 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_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:0x453da9 RSP: 002b:00007ff03a47cc68 EFLAGS: 00000246 ORIG_RAX: 0000000000000037 RAX: ffffffffffffffda RBX: 00007ff03a47d6d4 RCX: 0000000000453da9 RDX: 0000000000000029 RSI: 0000000000000000 RDI: 0000000000000014 RBP: 000000000072bea0 R08: 0000000020000080 R09: 0000000000000000 R10: 0000000020000040 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000000f2 R14: 00000000006f1750 R15: 0000000000000000 audit: type=1400 audit(1519224618.732:32): avc: denied { create } for pid=5473 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_netfilter_socket permissive=1 syz-executor4 uses obsolete (PF_INET,SOCK_PACKET) audit: type=1400 audit(1519224618.769:33): avc: denied { map } for pid=5479 comm="syz-executor5" path="socket:[14299]" dev="sockfs" ino=14299 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 mmap: syz-executor3 (5512) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.txt. audit: type=1400 audit(1519224618.897:34): avc: denied { write } for pid=5506 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_netfilter_socket permissive=1 audit: type=1400 audit(1519224619.044:35): avc: denied { ipc_owner } for pid=5558 comm="syz-executor1" 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 atomic_op 000000004d19b065 conn xmit_atomic (null) openvswitch: netlink: Message has 4 unknown bytes. audit: type=1400 audit(1519224619.679:36): avc: denied { map } for pid=5622 comm="syz-executor4" path="/dev/binder0" dev="devtmpfs" ino=1146 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_alloc: binder_alloc_mmap_handler: 5622 20000000-20002000 already mapped failed -16 binder: 5622:5625 ioctl 4068aea3 20000080 returned -22 device syz7 entered promiscuous mode device syz7 left promiscuous mode binder_alloc: 5700: binder_alloc_buf, no vma binder: 5700:5703 transaction failed 29189/-3, size 0-0 line 2957 binder_alloc: 5700: binder_alloc_buf, no vma binder: 5700:5718 transaction failed 29189/-3, size 0-0 line 2957 binder: BINDER_SET_CONTEXT_MGR already set binder: 5700:5718 ioctl 40046207 0 returned -16 binder_alloc: 5700: binder_alloc_buf, no vma binder: 5700:5728 transaction failed 29189/-3, size 0-0 line 2957 binder_alloc: 5700: binder_alloc_buf, no vma binder: 5700:5742 transaction failed 29189/-3, size 0-0 line 2957 ipt_CLUSTERIP: Please specify destination IP binder: undelivered TRANSACTION_ERROR: 29189 ipt_CLUSTERIP: Please specify destination IP binder: undelivered TRANSACTION_ERROR: 29189 capability: warning: `syz-executor5' uses 32-bit capabilities (legacy support in use) IPVS: ftp: loaded support on port[0] = 21 xt_connbytes: Forcing CT accounting to be enabled TCP: request_sock_TCPv6: Possible SYN flooding on port 20014. Sending cookies. Check SNMP counters. QAT: Invalid ioctl QAT: Invalid ioctl device eql entered promiscuous mode kauditd_printk_skb: 3 callbacks suppressed audit: type=1400 audit(1519224622.539:40): avc: denied { setgid } for pid=6374 comm="syz-executor0" 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(1519224622.602:41): avc: denied { ipc_lock } for pid=6392 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 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=6435 comm=syz-executor6 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=6435 comm=syz-executor6 audit: type=1400 audit(1519224622.830:42): avc: denied { name_bind } for pid=6474 comm="syz-executor6" src=20027 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(1519224622.831:43): avc: denied { node_bind } for pid=6474 comm="syz-executor6" src=20027 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:node_t:s0 tclass=dccp_socket permissive=1 audit: type=1400 audit(1519224622.860:44): avc: denied { getopt } for pid=6478 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 device eql entered promiscuous mode mapping of prio or/and queue is allowed only from OUTPUT/FORWARD/POSTROUTING chains mapping of prio or/and queue is allowed only from OUTPUT/FORWARD/POSTROUTING chains QAT: Invalid ioctl QAT: Invalid ioctl audit: type=1400 audit(1519224623.380:45): avc: denied { ioctl } for pid=6626 comm="syz-executor2" path="socket:[18778]" dev="sockfs" ino=18778 ioctlcmd=0x8904 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 ipt_REJECT: TCP_RESET invalid for non-tcp device syz3 entered promiscuous mode audit: type=1400 audit(1519224624.034:46): avc: denied { create } for pid=6856 comm="syz-executor1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:init_var_run_t:s0 tclass=key permissive=1 audit: type=1400 audit(1519224624.060:47): avc: denied { write } for pid=6856 comm="syz-executor1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:init_var_run_t:s0 tclass=key permissive=1 xt_AUDIT: Audit type out of range (valid range: 0..2) RDS: rds_bind could not find a transport for 172.20.0.0, load rds_tcp or rds_rdma? RDS: rds_bind could not find a transport for 172.20.0.0, load rds_tcp or rds_rdma? QAT: Invalid ioctl QAT: Invalid ioctl atomic_op 00000000810dfdc9 conn xmit_atomic (null) kernel msg: ebtables bug: please report to author: bad policy atomic_op 0000000072d896f5 conn xmit_atomic (null) kernel msg: ebtables bug: please report to author: bad policy capability: warning: `syz-executor3' uses deprecated v2 capabilities in a way that may be insecure dccp_v6_rcv: dropped packet with invalid checksum dccp_v6_rcv: dropped packet with invalid checksum x_tables: ip_tables: osf match: used from hooks PREROUTING/OUTPUT, but only valid from PREROUTING/INPUT/FORWARD x_tables: ip_tables: osf match: used from hooks PREROUTING/OUTPUT, but only valid from PREROUTING/INPUT/FORWARD audit: type=1400 audit(1519224625.817:48): avc: denied { setpcap } for pid=7308 comm="syz-executor2" 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 binder: BINDER_SET_CONTEXT_MGR already set binder: 7312:7323 ioctl 40046207 0 returned -16 QAT: Invalid ioctl QAT: Invalid ioctl QAT: failed to copy from user cfg_data. --map-set only usable from mangle table QAT: Invalid ioctl --map-set only usable from mangle table QAT: Invalid ioctl audit: type=1400 audit(1519224626.063:49): avc: denied { getattr } for pid=7380 comm="syz-executor5" path="socket:[20262]" dev="sockfs" ino=20262 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: failed to copy from user cfg_data. QAT: Invalid ioctl QAT: Invalid ioctl 9pnet_virtio: no channels available for device ./file0 9pnet_virtio: no channels available for device ./file0 xt_connbytes: Forcing CT accounting to be enabled ip_tables: error: `{‹ÅÉMà>¿¨ÀƒzýQ°Â “ÿ|,lûL _ 3¸' ip_tables: error: `{‹ÅÉMà>¿¨ÀƒzýQ°Â “ÿ|,lûL _ 3¸' binder: 7571:7579 got reply transaction with no transaction stack binder: 7571:7579 transaction failed 29201/-71, size 0-0 line 2757 binder: undelivered TRANSACTION_ERROR: 29201 mmap: syz-executor2 (7588): VmData 4042752 exceed data ulimit 0. Update limits or use boot option ignore_rlimit_data. ieee80211 phy2: Selected rate control algorithm 'minstrel_ht' ieee80211 phy3: Selected rate control algorithm 'minstrel_ht' syz-executor7 (7660) used greatest stack depth: 13040 bytes left kernel msg: ebtables bug: please report to author: Valid hook without chain kernel msg: ebtables bug: please report to author: Valid hook without chain binder: 7737:7744 BC_INCREFS_DONE u0000000020ffa000 no match device eql entered promiscuous mode x_tables: ip6_tables: rpfilter match: used from hooks OUTPUT/POSTROUTING, but only valid from PREROUTING bridge0: port 1(gretap0) entered blocking state bridge0: port 1(gretap0) entered disabled state device gretap0 entered promiscuous mode bridge0: port 1(gretap0) entered blocking state bridge0: port 1(gretap0) entered forwarding state IPv6: ADDRCONF(NETDEV_CHANGE): bridge0: link becomes ready