====================================================== WARNING: possible circular locking dependency detected 4.16.0-rc2+ #323 Not tainted ------------------------------------------------------ syz-executor7/5384 is trying to acquire lock: (sk_lock-AF_INET){+.+.}, at: [<0000000069e975b5>] lock_sock include/net/sock.h:1463 [inline] (sk_lock-AF_INET){+.+.}, at: [<0000000069e975b5>] do_ip_getsockopt+0x1b3/0x2170 net/ipv4/ip_sockglue.c:1329 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<00000000f73cc66d>] 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 udpv6_setsockopt+0x45/0x80 net/ipv6/udp.c:1422 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-executor7/5384: #0: (rtnl_mutex){+.+.}, at: [<00000000f73cc66d>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 stack backtrace: CPU: 0 PID: 5384 Comm: syz-executor7 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:00007fb01955ec68 EFLAGS: 00000246 ORIG_RAX: 0000000000000037 RAX: ffffffffffffffda RBX: 00007fb01955f6d4 RCX: 0000000000453da9 RDX: 0000000000000030 RSI: 0000000000000000 RDI: 0000000000000013 RBP: 000000000072bea0 R08: 0000000020004000 R09: 0000000000000000 R10: 0000000020000100 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000000f2 R14: 00000000006f1750 R15: 0000000000000000 kauditd_printk_skb: 6 callbacks suppressed audit: type=1400 audit(1519273528.684:26): avc: denied { create } for pid=5394 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=netlink_generic_socket permissive=1 audit: type=1400 audit(1519273528.718:27): avc: denied { write } for pid=5394 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=netlink_generic_socket permissive=1 audit: type=1400 audit(1519273528.721:28): avc: denied { net_raw } for pid=5398 comm="syz-executor7" capability=13 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(1519273528.848:29): avc: denied { create } for pid=5419 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_netfilter_socket permissive=1 netlink: 8 bytes leftover after parsing attributes in process `syz-executor7'. audit: type=1400 audit(1519273528.849:30): avc: denied { write } for pid=5419 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_netfilter_socket permissive=1 netlink: 8 bytes leftover after parsing attributes in process `syz-executor7'. audit: type=1400 audit(1519273528.918:31): avc: denied { map } for pid=5420 comm="syz-executor6" path=2F6D656D66643A202864656C6574656429 dev="tmpfs" ino=14577 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(1519273529.028:32): avc: denied { map_create } for pid=5469 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=bpf permissive=1 audit: type=1400 audit(1519273529.029:33): avc: denied { map_read map_write } for pid=5469 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=bpf permissive=1 kernel msg: ebtables bug: please report to author: Valid hook without chain kernel msg: ebtables bug: please report to author: Valid hook without chain audit: type=1400 audit(1519273529.358:34): avc: denied { ipc_owner } for pid=5552 comm="syz-executor5" 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 audit: type=1400 audit(1519273529.916:35): avc: denied { ipc_lock } for pid=5568 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 binder: 5568:5591 BC_ACQUIRE_DONE u0000000000000000 no match binder: 5568:5580 BC_ACQUIRE_DONE u0000000000000000 no match capability: warning: `syz-executor6' uses 32-bit capabilities (legacy support in use) ipt_REJECT: ECHOREPLY no longer supported. kernel msg: ebtables bug: please report to author: EBT_ENTRY_OR_ENTRIES shouldn't be set in distinguisher ipt_CLUSTERIP: Please specify destination IP ipt_REJECT: ECHOREPLY no longer supported. ipt_CLUSTERIP: Please specify destination IP kernel msg: ebtables bug: please report to author: EBT_ENTRY_OR_ENTRIES shouldn't be set in distinguisher xt_AUDIT: Audit type out of range (valid range: 0..2) xt_AUDIT: Audit type out of range (valid range: 0..2) binder: 5903 RLIMIT_NICE not set x86/PAT: syz-executor6:5918 map pfn RAM range req write-combining for [mem 0x1b26d0000-0x1b26d3fff], got write-back binder: 5898:5920 BC_DEAD_BINDER_DONE 0000000000000001 not found binder: 5898:5920 unknown command 1667326767 binder: 5898:5920 ioctl c0306201 20007000 returned -22 x86/PAT: syz-executor6:5934 map pfn RAM range req write-combining for [mem 0x1b26d0000-0x1b26d3fff], got write-back binder: BINDER_SET_CONTEXT_MGR already set binder: 5898:5941 BC_DEAD_BINDER_DONE 0000000000000001 not found binder: 5898:5941 unknown command 1667326767 binder: 5898:5920 ioctl 40046207 0 returned -16 binder: 5898:5941 ioctl c0306201 20007000 returned -22 SELinux: policydb magic number 0xeb19f9af does not match expected magic number 0xf97cff8c capability: warning: `syz-executor6' uses deprecated v2 capabilities in a way that may be insecure SELinux: failed to load policy SELinux: policydb magic number 0xeb19f9af does not match expected magic number 0xf97cff8c tty_warn_deprecated_flags: 'syz-executor2' is using deprecated serial flags (with no effect): 00000600 SELinux: failed to load policy xt_connbytes: Forcing CT accounting to be enabled kauditd_printk_skb: 9 callbacks suppressed audit: type=1400 audit(1519273533.733:44): avc: denied { getopt } for pid=6176 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(1519273533.814:45): avc: denied { ioctl } for pid=6196 comm="syz-executor2" path="socket:[16697]" dev="sockfs" ino=16697 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_generic_socket permissive=1 audit: type=1400 audit(1519273534.093:46): avc: denied { create } for pid=6256 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_connector_socket permissive=1 xt_connbytes: Forcing CT accounting to be enabled xt_CT: netfilter: NOTRACK target is deprecated, use CT instead or upgrade iptables audit: type=1400 audit(1519273534.144:47): avc: denied { read } for pid=6256 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_connector_socket permissive=1 netlink: 'syz-executor0': attribute type 1 has an invalid length. audit: type=1400 audit(1519273534.190:48): avc: denied { write } for pid=6256 comm="syz-executor1" path="socket:[17700]" dev="sockfs" ino=17700 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(1519273534.798:49): avc: denied { read } for pid=6347 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 mmap: syz-executor7 (6479) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.txt. netlink: 180 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 180 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 11 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 11 bytes leftover after parsing attributes in process `syz-executor5'. binder: undelivered death notification, 0000000000000000 binder: BINDER_SET_CONTEXT_MGR already set binder: 6629:6644 ioctl 40046207 0 returned -16 binder: undelivered death notification, 0000000000000000 QAT: Invalid ioctl QAT: Invalid ioctl audit: type=1400 audit(1519273536.690:50): avc: denied { map } for pid=6706 comm="syz-executor2" path="/dev/rfkill" dev="devtmpfs" ino=23 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:wireless_device_t:s0 tclass=chr_file permissive=1 QAT: Invalid ioctl QAT: Invalid ioctl xt_l2tp: wrong L2TP version: 0 xt_l2tp: wrong L2TP version: 0 audit: type=1400 audit(1519273537.146:51): avc: denied { create } for pid=6867 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_crypto_socket permissive=1 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 1 CPU: 0 PID: 6887 Comm: syz-executor3 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 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 mm/slab.c:3365 [inline] kmem_cache_alloc+0x47/0x760 mm/slab.c:3539 ptlock_alloc+0x24/0x70 mm/memory.c:4728 ptlock_init include/linux/mm.h:1796 [inline] pgtable_page_ctor include/linux/mm.h:1830 [inline] pte_alloc_one+0x59/0x100 arch/x86/mm/pgtable.c:32 do_fault_around mm/memory.c:3602 [inline] do_read_fault mm/memory.c:3643 [inline] do_fault mm/memory.c:3748 [inline] handle_pte_fault mm/memory.c:3979 [inline] __handle_mm_fault+0x3b12/0x3ce0 mm/memory.c:4103 syz-executor7 uses obsolete (PF_INET,SOCK_PACKET) handle_mm_fault+0x35c/0x970 mm/memory.c:4140 __do_page_fault+0x5c9/0xc90 arch/x86/mm/fault.c:1426 do_page_fault+0xee/0x730 arch/x86/mm/fault.c:1501 page_fault+0x62/0x90 arch/x86/entry/entry_64.S:1122 RIP: 0010:__get_user_4+0x21/0x30 arch/x86/lib/getuser.S:76 RSP: 0018:ffff8801c96cf7f0 EFLAGS: 00010206 RAX: 000000002060bfd4 RBX: 000000002060bfd1 RCX: ffffffff819beb68 RDX: ffffffffffffffff RSI: ffffc90001e1b000 RDI: 0000000000000282 RBP: ffff8801c96cf830 R08: 0000000000000000 R09: 1ffff100392d9edb R10: ffff8801c96cf6a0 R11: ffff8801d9297a08 R12: 0000000000000000 R13: 00000000204b1000 R14: ffff8801c96cf9d0 R15: ffff8801cd87ba80 ___sys_recvmsg+0x325/0x640 net/socket.c:2211 __sys_recvmmsg+0x2a9/0xaf0 net/socket.c:2313 SYSC_recvmmsg net/socket.c:2394 [inline] SyS_recvmmsg+0xc4/0x160 net/socket.c:2378 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x453da9 RSP: 002b:00007fab9dbccc68 EFLAGS: 00000246 ORIG_RAX: 000000000000012b RAX: ffffffffffffffda RBX: 00007fab9dbcd6d4 RCX: 0000000000453da9 RDX: 0000000000000001 RSI: 000000002060bfc9 RDI: 0000000000000013 RBP: 000000000072bea0 R08: 00000000206ff000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000014 R13: 000000000000046f R14: 00000000006f6b08 R15: 0000000000000000 ipt_CLUSTERIP: bad num_local_nodes 140 FAULT_FLAG_ALLOW_RETRY missing 30 CPU: 0 PID: 6987 Comm: syz-executor7 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 handle_userfault+0xbd9/0x2500 fs/userfaultfd.c:430