====================================================== WARNING: possible circular locking dependency detected 4.16.0-rc1+ #314 Not tainted ------------------------------------------------------ syz-executor0/5360 is trying to acquire lock: (sk_lock-AF_INET){+.+.}, at: [<000000002aa28488>] lock_sock include/net/sock.h:1463 [inline] (sk_lock-AF_INET){+.+.}, at: [<000000002aa28488>] do_ip_setsockopt.isra.12+0x1d9/0x3210 net/ipv4/ip_sockglue.c:646 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<00000000d751de55>] 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+0x218/0x350 net/ipv4/netfilter/ip_tables.c:654 __do_replace+0x79d/0xa50 net/ipv4/netfilter/ip_tables.c:1089 do_replace net/ipv4/netfilter/ip_tables.c:1145 [inline] do_ipt_set_ctl+0x40f/0x5f0 net/ipv4/netfilter/ip_tables.c:1675 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x67/0xc0 net/netfilter/nf_sockopt.c:115 ip_setsockopt+0x97/0xa0 net/ipv4/ip_sockglue.c:1259 udp_setsockopt+0x45/0x80 net/ipv4/udp.c:2401 ipv6_setsockopt+0xa0/0x130 net/ipv6/ipv6_sockglue.c:917 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_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_setsockopt.isra.12+0x1d9/0x3210 net/ipv4/ip_sockglue.c:646 ip_setsockopt+0x3a/0xa0 net/ipv4/ip_sockglue.c:1252 dccp_setsockopt+0x85/0xd0 net/dccp/proto.c:576 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_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-executor0/5360: #0: (rtnl_mutex){+.+.}, at: [<00000000d751de55>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 stack backtrace: CPU: 0 PID: 5360 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 dccp_setsockopt+0x85/0xd0 net/dccp/proto.c:576 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:00007fa671a22c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007fa671a236d4 RCX: 0000000000453a59 RDX: 000000000000002e RSI: 0000000000000000 RDI: 0000000000000013 RBP: 000000000071bea0 R08: 0000000000000108 R09: 0000000000000000 R10: 0000000020000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 000000000000051e R14: 00000000006f7b70 R15: 0000000000000000 capability: warning: `syz-executor5' uses 32-bit capabilities (legacy support in use) audit: type=1400 audit(1518788682.668:17): avc: denied { create } for pid=5497 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_netfilter_socket permissive=1 audit: type=1400 audit(1518788682.700:18): avc: denied { create } for pid=5499 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_generic_socket permissive=1 audit: type=1400 audit(1518788682.702:19): avc: denied { write } for pid=5499 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_generic_socket permissive=1 audit: type=1400 audit(1518788682.703:20): avc: denied { ioctl } for pid=5497 comm="syz-executor3" path="socket:[14725]" dev="sockfs" ino=14725 ioctlcmd=0x8933 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(1518788682.709:21): avc: denied { write } for pid=5497 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_netfilter_socket permissive=1 audit: type=1400 audit(1518788682.915:22): avc: denied { prog_load } for pid=5556 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=bpf permissive=1 audit: type=1400 audit(1518788683.006:23): avc: denied { prog_run } for pid=5556 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=bpf permissive=1 hrtimer: interrupt took 16781 ns audit: type=1400 audit(1518788683.454:24): avc: denied { dac_read_search } for pid=4235 comm="syz-executor3" capability=2 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(1518788683.594:25): avc: denied { map } for pid=5747 comm="syz-executor7" path="/dev/autofs" dev="devtmpfs" ino=1110 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:autofs_device_t:s0 tclass=chr_file permissive=1 Bearer <> rejected, not supported in standalone mode audit: type=1400 audit(1518788683.844:26): avc: denied { map } for pid=5822 comm="syz-executor7" path="socket:[15907]" dev="sockfs" ino=15907 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 Bearer <> rejected, not supported in standalone mode TCP: request_sock_TCP: Possible SYN flooding on port 20026. Sending cookies. Check SNMP counters. xt_hashlimit: max count of 1 reached device eql entered promiscuous mode binder: 6287:6290 ERROR: BC_REGISTER_LOOPER called after BC_ENTER_LOOPER binder: 6287:6290 BC_REQUEST_DEATH_NOTIFICATION invalid ref 4 binder: 6287:6290 Release 1 refcount change on invalid ref 0 ret -22 binder: 6287:6290 BC_FREE_BUFFER u0000000000000000 no match binder: 6287:6290 BC_CLEAR_DEATH_NOTIFICATION invalid ref 0 binder: 6287:6290 ERROR: BC_REGISTER_LOOPER called after BC_ENTER_LOOPER binder: 6287:6290 BC_REQUEST_DEATH_NOTIFICATION invalid ref 4 binder: 6287:6290 Release 1 refcount change on invalid ref 0 ret -22 binder: 6287:6290 BC_FREE_BUFFER u0000000000000000 no match binder: 6287:6290 BC_CLEAR_DEATH_NOTIFICATION invalid ref 0 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 1 CPU: 0 PID: 6424 Comm: syz-executor1 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 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_trace+0x4b/0x740 mm/slab.c:3605 kmalloc include/linux/slab.h:512 [inline] kzalloc include/linux/slab.h:701 [inline] sctp_association_new+0x114/0x2130 net/sctp/associola.c:308 sctp_sendmsg+0x1d71/0x35e0 net/sctp/socket.c:1847 inet_sendmsg+0x11f/0x5e0 net/ipv4/af_inet.c:764 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg+0xca/0x110 net/socket.c:640 SYSC_sendto+0x361/0x5c0 net/socket.c:1747 SyS_sendto+0x40/0x50 net/socket.c:1715 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x453a59 RSP: 002b:00007fbdca652c68 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007fbdca6536d4 RCX: 0000000000453a59 RDX: 0000000000000001 RSI: 0000000020218000 RDI: 0000000000000014 RBP: 000000000071bea0 R08: 0000000020af3ff0 R09: 0000000000000010 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000015 R13: 00000000000004b9 R14: 00000000006f71f8 R15: 0000000000000000 FAULT_INJECTION: forcing a failure. name fail_page_alloc, interval 1, probability 0, space 0, times 1 CPU: 1 PID: 6480 Comm: syz-executor1 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 fail_dump lib/fault-inject.c:51 [inline] should_fail+0x8c0/0xa40 lib/fault-inject.c:149 should_fail_alloc_page mm/page_alloc.c:2955 [inline] prepare_alloc_pages mm/page_alloc.c:4194 [inline] __alloc_pages_nodemask+0x327/0xdd0 mm/page_alloc.c:4233 __alloc_pages include/linux/gfp.h:456 [inline] __alloc_pages_node include/linux/gfp.h:469 [inline] kmem_getpages mm/slab.c:1410 [inline] cache_grow_begin+0x72/0x570 mm/slab.c:2665 cache_alloc_refill mm/slab.c:3032 [inline] ____cache_alloc mm/slab.c:3114 [inline] __do_cache_alloc mm/slab.c:3336 [inline] slab_alloc mm/slab.c:3371 [inline] kmem_cache_alloc_trace+0x3f1/0x740 mm/slab.c:3605 kmalloc include/linux/slab.h:512 [inline] kzalloc include/linux/slab.h:701 [inline] sctp_association_new+0x114/0x2130 net/sctp/associola.c:308 sctp_sendmsg+0x1d71/0x35e0 net/sctp/socket.c:1847 inet_sendmsg+0x11f/0x5e0 net/ipv4/af_inet.c:764 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg+0xca/0x110 net/socket.c:640 SYSC_sendto+0x361/0x5c0 net/socket.c:1747 SyS_sendto+0x40/0x50 net/socket.c:1715 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x453a59 RSP: 002b:00007fbdca652c68 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007fbdca6536d4 RCX: 0000000000453a59 RDX: 0000000000000001 RSI: 0000000020218000 RDI: 0000000000000014 RBP: 000000000071bea0 R08: 0000000020af3ff0 R09: 0000000000000010 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000015 R13: 00000000000004b9 R14: 00000000006f71f8 R15: 0000000000000001 xt_l2tp: invalid flags combination: 8 xt_l2tp: invalid flags combination: 8 sctp: [Deprecated]: syz-executor5 (pid 6659) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor5 (pid 6665) Use of int in maxseg socket option. Use struct sctp_assoc_value instead kauditd_printk_skb: 10 callbacks suppressed audit: type=1400 audit(1518788687.807:37): avc: denied { map } for pid=6705 comm="syz-executor4" path="/dev/ashmem" dev="devtmpfs" ino=9134 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=1326 audit(1518788687.946:38): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6740 comm="syz-executor0" exe="/root/syz-executor0" sig=31 arch=c000003e syscall=202 compat=0 ip=0x453a59 code=0x0 audit: type=1326 audit(1518788687.970:39): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6740 comm="syz-executor0" exe="/root/syz-executor0" sig=31 arch=c000003e syscall=202 compat=0 ip=0x453a59 code=0x0 audit: type=1400 audit(1518788688.004:40): avc: denied { map } for pid=6761 comm="syz-executor6" path=2F6D656D66643A066F477671202864656C6574656429 dev="tmpfs" ino=18818 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:tmpfs_t:s0 tclass=file permissive=1 xt_AUDIT: Audit type out of range (valid range: 0..2) audit: type=1400 audit(1518788688.819:41): avc: denied { setattr } for pid=7005 comm="syz-executor0" name="NETLINK" dev="sockfs" ino=19692 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 binder: 7014:7024 BC_ACQUIRE_DONE u0000000000000000 no match binder: 7014:7024 BC_ACQUIRE_DONE u0000000000000000 no match netlink: 4 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 4 bytes leftover after parsing attributes in process `syz-executor3'. audit: type=1400 audit(1518788689.078:42): avc: denied { create } for pid=7079 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_scsitransport_socket permissive=1 rpcbind: RPC call returned error 22 rpcbind: RPC call returned error 22 audit: type=1400 audit(1518788689.632:43): avc: denied { setuid } for pid=7246 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 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. sctp: [Deprecated]: syz-executor7 (pid 7305) Use of int in max_burst socket option deprecated. Use struct sctp_assoc_value instead audit: type=1400 audit(1518788689.881:44): avc: denied { map } for pid=7327 comm="syz-executor7" path="/proc/375/net/pfkey" dev="proc" ino=4026532933 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:proc_net_t:s0 tclass=file permissive=1 --map-set only usable from mangle table --map-set only usable from mangle table QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl audit: type=1400 audit(1518788690.472:45): avc: denied { create } for pid=7522 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_crypto_socket permissive=1 xt_connbytes: Forcing CT accounting to be enabled ptrace attach of "/root/syz-executor2"[4236] was attempted by "/root/syz-executor2"[7738]