====================================================== WARNING: possible circular locking dependency detected 4.16.0-rc1+ #315 Not tainted ------------------------------------------------------ syz-executor7/5638 is trying to acquire lock: (sk_lock-AF_INET6){+.+.}, at: [<000000003874d9b4>] lock_sock include/net/sock.h:1463 [inline] (sk_lock-AF_INET6){+.+.}, at: [<000000003874d9b4>] do_ipv6_setsockopt.isra.8+0x3c5/0x39d0 net/ipv6/ipv6_sockglue.c:167 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<00000000c1dad2a1>] 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 QAT: Invalid ioctl 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 raw_setsockopt+0xb7/0xd0 net/ipv4/raw.c:870 QAT: Invalid ioctl 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 QAT: Invalid ioctl 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 QAT: Invalid ioctl do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 QAT: Invalid ioctl 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-executor7/5638: #0: (rtnl_mutex){+.+.}, at: [<00000000c1dad2a1>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 stack backtrace: CPU: 0 PID: 5638 Comm: syz-executor7 Not tainted 4.16.0-rc1+ #315 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 QAT: Invalid ioctl 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:00007f90e7d71c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007f90e7d726d4 RCX: 0000000000453a59 RDX: 000000000000002a RSI: 0000000000000029 RDI: 0000000000000013 RBP: 000000000071bea0 R08: 0000000000000088 R09: 0000000000000000 R10: 0000000020625000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000004fb R14: 00000000006f7828 R15: 0000000000000000 ptrace attach of "/root/syz-executor0"[4211] was attempted by "/root/syz-executor0"[5686] ptrace attach of "/root/syz-executor0"[4211] was attempted by "/root/syz-executor0"[5686] audit: type=1400 audit(1518822118.444:29): avc: denied { prog_load } for pid=5712 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=bpf permissive=1 mmap: syz-executor7 (5753) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.txt. QAT: Invalid ioctl audit: type=1400 audit(1518822118.600:30): avc: denied { name_bind } for pid=5749 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 QAT: Invalid ioctl TCP: request_sock_TCP: Possible SYN flooding on port 20026. Sending cookies. Check SNMP counters. QAT: Invalid ioctl QAT: Invalid ioctl binder: 5958:5960 not enough space to store 0 fds in buffer QAT: Invalid ioctl binder: 5958:5960 transaction failed 29201/-22, size 72-16 line 3099 binder_alloc: binder_alloc_mmap_handler: 5958 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 5958:5960 ioctl 40046207 0 returned -16 binder_alloc: 5958: binder_alloc_buf, no vma binder: 5958:5967 transaction failed 29189/-3, size 72-16 line 2957 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29201 openvswitch: netlink: Flow get message rejected, Key attribute missing. openvswitch: netlink: Flow get message rejected, Key attribute missing. ip6t_srh: unknown srh invflags FFFE ip6t_srh: unknown srh invflags FFFE xt_connbytes: Forcing CT accounting to be enabled netlink: 4192 bytes leftover after parsing attributes in process `syz-executor1'. xprt_adjust_timeout: rq_timeout = 0! netlink: 4192 bytes leftover after parsing attributes in process `syz-executor1'. xprt_adjust_timeout: rq_timeout = 0! netlink: 4192 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 4192 bytes leftover after parsing attributes in process `syz-executor1'. QAT: Invalid ioctl netlink: 4192 bytes leftover after parsing attributes in process `syz-executor1'. QAT: Invalid ioctl netlink: 4192 bytes leftover after parsing attributes in process `syz-executor1'. Cannot find del_set index 0 as target netlink: 4192 bytes leftover after parsing attributes in process `syz-executor1'. Cannot find del_set index 0 as target netlink: 4192 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 4192 bytes leftover after parsing attributes in process `syz-executor1'. tmpfs: No value for mount option ',4' tmpfs: No value for mount option ',4' kauditd_printk_skb: 13 callbacks suppressed audit: type=1400 audit(1518822121.709:44): avc: denied { prog_run } for pid=6385 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=bpf permissive=1 netlink: 'syz-executor6': attribute type 1 has an invalid length. ip6t_srh: unknown srh invflags FFFE ip6t_srh: unknown srh invflags FFFE netlink: 'syz-executor6': attribute type 1 has an invalid length. nla_parse: 4 callbacks suppressed netlink: 4192 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 4192 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 4192 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 4192 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 4192 bytes leftover after parsing attributes in process `syz-executor1'. x_tables: ip_tables: TCPMSS target: only valid for protocol 6 netlink: 4192 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 4192 bytes leftover after parsing attributes in process `syz-executor6'. irq bypass consumer (token 00000000489640d9) registration fails: -16 netlink: 4192 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 4192 bytes leftover after parsing attributes in process `syz-executor1'. audit: type=1400 audit(1518822122.490:45): avc: denied { setuid } for pid=6602 comm="syz-executor6" 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 netlink: 'syz-executor4': attribute type 1 has an invalid length. netlink: 4192 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 'syz-executor4': attribute type 1 has an invalid length. x86/PAT: syz-executor2:6660 map pfn RAM range req write-combining for [mem 0x1adab0000-0x1adab3fff], got write-back audit: type=1400 audit(1518822122.694:46): avc: denied { getopt } for pid=6673 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_generic_socket permissive=1 x86/PAT: syz-executor2:6669 map pfn RAM range req write-combining for [mem 0x1adab0000-0x1adab3fff], got write-back binder_alloc: binder_alloc_mmap_handler: 6705 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder_alloc: 6705: binder_alloc_buf, no vma binder: 6705:6714 ioctl 40046207 0 returned -16 binder: 6705:6721 transaction failed 29189/-3, size 80-16 line 2957 QAT: Invalid ioctl QAT: Invalid ioctl binder: undelivered TRANSACTION_ERROR: 29189 binder: release 6705:6714 transaction 14 out, still active binder: unexpected work type, 4, not freed binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 14, target dead xt_connbytes: Forcing CT accounting to be enabled ip_tunnel: non-ECT from 0.0.0.0 with TOS=0x3 audit: type=1400 audit(1518822123.297:47): avc: denied { setopt } for pid=6817 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 ip_tunnel: non-ECT from 0.0.0.0 with TOS=0x3 netlink: 'syz-executor0': attribute type 1 has an invalid length. audit: type=1400 audit(1518822123.680:48): avc: denied { create } for pid=6950 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_rdma_socket permissive=1 QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl xt_connbytes: Forcing CT accounting to be enabled nf_conntrack: default automatic helper assignment has been turned off for security reasons and CT-based firewall rule not found. Use the iptables CT target to attach helpers instead. audit: type=1400 audit(1518822124.216:49): avc: denied { create } for pid=7117 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 audit: type=1400 audit(1518822124.216:50): avc: denied { write } for pid=7117 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 audit: type=1400 audit(1518822124.216:51): avc: denied { net_admin } for pid=7117 comm="syz-executor1" capability=12 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(1518822124.293:52): avc: denied { net_raw } for pid=7118 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(1518822124.299:53): avc: denied { map } for pid=7134 comm="modprobe" path="/bin/kmod" dev="sda1" ino=1440 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 sctp: [Deprecated]: syz-executor3 (pid 7173) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor3 (pid 7187) Use of int in maxseg socket option. Use struct sctp_assoc_value instead ip6t_REJECT: TCP_RESET illegal for non-tcp ip6t_REJECT: TCP_RESET illegal for non-tcp Unknown options in mask fffc bpf: check failed: parse error syz-executor0 (7408) used greatest stack depth: 14064 bytes left syz-executor6 uses obsolete (PF_INET,SOCK_PACKET) SELinux: unrecognized netlink message: protocol=9 nlmsg_type=22 sclass=netlink_audit_socket pig=7633 comm=syz-executor6 TCP: request_sock_TCP: Possible SYN flooding on port 20018. Sending cookies. Check SNMP counters. FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 1 CPU: 0 PID: 7704 Comm: syz-executor5 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 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 sock_alloc_inode+0x70/0x300 net/socket.c:244 alloc_inode+0x65/0x180 fs/inode.c:209 new_inode_pseudo+0x69/0x190 fs/inode.c:890 sock_alloc+0x41/0x270 net/socket.c:565 SYSC_accept4+0x121/0x870 net/socket.c:1541 SyS_accept4+0x2c/0x40 net/socket.c:1522 do_syscall_64+0x280/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x453a59 RSP: 002b:00007ff80ea5ac68 EFLAGS: 00000246 ORIG_RAX: 0000000000000120 RAX: ffffffffffffffda RBX: 00007ff80ea5b6d4 RCX: 0000000000453a59 RDX: 0000000020c42000 RSI: 0000000020361fe4 RDI: 0000000000000013 RBP: 000000000071bea0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000015 R13: 000000000000000f R14: 00000000006f0208 R15: 0000000000000000