syz-executor5 (6314) used greatest stack depth: 15712 bytes left x_tables: ip6_tables: TCPMSS target: only valid for protocol 6 ====================================================== WARNING: possible circular locking dependency detected x_tables: ip6_tables: TCPMSS target: only valid for protocol 6 4.16.0-rc2+ #324 Not tainted ------------------------------------------------------ syz-executor0/6332 is trying to acquire lock: (sk_lock-AF_INET){+.+.}, at: [<0000000059d453d1>] lock_sock include/net/sock.h:1463 [inline] (sk_lock-AF_INET){+.+.}, at: [<0000000059d453d1>] do_ip_getsockopt+0x1b3/0x2170 net/ipv4/ip_sockglue.c:1329 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<00000000b7e8977d>] 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){+.+.}: audit: type=1400 audit(1519376494.207:40): avc: denied { map } for pid=6347 comm="syz-executor6" path="socket:[17223]" dev="sockfs" ino=17223 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=socket permissive=1 __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-executor0/6332: #0: (rtnl_mutex){+.+.}, at: [<00000000b7e8977d>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 stack backtrace: CPU: 0 PID: 6332 Comm: syz-executor0 Not tainted 4.16.0-rc2+ #324 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/0x24d 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:0x453de9 RSP: 002b:00007f916f4b6c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000037 RAX: ffffffffffffffda RBX: 00007f916f4b76d4 RCX: 0000000000453de9 RDX: 0000000000000029 RSI: 0000000000000000 RDI: 0000000000000014 RBP: 000000000072bea0 R08: 0000000020000080 R09: 0000000000000000 R10: 0000000020000040 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000000f2 R14: 00000000006f1750 R15: 0000000000000000 device eql entered promiscuous mode ip_tables: error: `J·8)ò­ÍЙÛajtNó5‰1+«oè XcÈŠ' audit: type=1400 audit(1519376494.978:41): avc: denied { relabelto } for pid=6403 comm="syz-executor1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:udev_var_run_t:s0 tclass=packet permissive=1 Cannot find add_set index 0 as target Cannot find add_set index 0 as target audit: type=1400 audit(1519376495.019:42): avc: denied { send } for pid=6403 comm="syz-executor1" saddr=::1 src=20006 daddr=::1 dest=20006 netif=lo scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:udev_var_run_t:s0 tclass=packet permissive=1 audit: type=1400 audit(1519376495.024:43): avc: denied { recv } for pid=6403 comm="syz-executor1" saddr=::1 src=20006 daddr=::1 dest=20006 netif=lo scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:udev_var_run_t:s0 tclass=packet permissive=1 xt_connbytes: Forcing CT accounting to be enabled PPPIOCDETACH file->f_count=2 PPPIOCDETACH file->f_count=2 xt_connbytes: Forcing CT accounting to be enabled device eql entered promiscuous mode sctp: [Deprecated]: syz-executor7 (pid 6733) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor7 (pid 6733) Use of int in maxseg socket option. Use struct sctp_assoc_value instead atomic_op 000000009b3a615b conn xmit_atomic (null) atomic_op 00000000dd6f2b12 conn xmit_atomic (null) futex_wake_op: syz-executor2 tries to shift op by 64; fix this program futex_wake_op: syz-executor2 tries to shift op by 64; fix this program xt_cluster: you have exceeded the maximum number of cluster nodes (4095 > 32) xt_cluster: you have exceeded the maximum number of cluster nodes (4095 > 32) device eql entered promiscuous mode device eql entered promiscuous mode QAT: Invalid ioctl QAT: Invalid ioctl kauditd_printk_skb: 12 callbacks suppressed audit: type=1400 audit(1519376497.865:56): avc: denied { bind } for pid=7417 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 audit: type=1400 audit(1519376497.868:57): avc: denied { getattr } for pid=7417 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 audit: type=1400 audit(1519376497.869:58): avc: denied { getopt } for pid=7417 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 binder: 7466:7470 transaction failed 29189/-22, size 0-0 line 2842 binder: 7466:7470 ioctl c0306201 2001bfd0 returned -14 binder: 7466:7470 transaction failed 29189/-22, size 0-0 line 2842 binder: 7466:7470 ioctl c0306201 2001bfd0 returned -14 SELinux: unknown mount option SELinux: unknown mount option SELinux: unknown mount option syz-executor2 (7581) used greatest stack depth: 15168 bytes left PPPIOCDETACH file->f_count=2 netlink: 5 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 5 bytes leftover after parsing attributes in process `syz-executor2'. PPPIOCDETACH file->f_count=3 netlink: 'syz-executor2': attribute type 1 has an invalid length. netlink: 'syz-executor2': attribute type 1 has an invalid length. QAT: Invalid ioctl TCP: request_sock_TCPv6: Possible SYN flooding on port 20006. Sending cookies. Check SNMP counters. QAT: Invalid ioctl QAT: Invalid ioctl dccp_xmit_packet: Payload too large (65423) for featneg. QAT: Invalid ioctl netlink: 'syz-executor6': attribute type 10 has an invalid length. audit: type=1400 audit(1519376499.321:59): avc: denied { getopt } for pid=7888 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(1519376499.330:60): avc: denied { setopt } for pid=7888 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(1519376499.566:61): avc: denied { map } for pid=7953 comm="syz-executor4" path="/dev/kvm" dev="devtmpfs" ino=9324 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 QAT: Invalid ioctl audit: type=1400 audit(1519376499.617:62): avc: denied { accept } for pid=7953 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 pit: kvm: requested 5866 ns i8254 timer period limited to 500000 ns QAT: Invalid ioctl Disabled LAPIC found during irq injection Disabled LAPIC found during irq injection semctl(GETNCNT/GETZCNT) is since 3.16 Single Unix Specification compliant. The task syz-executor6 (8298) triggered the difference, watch for misbehavior. binder: binder_mmap: 8297 20000000-20002000 bad vm_flags failed -1 audit: type=1400 audit(1519376501.002:63): avc: denied { setfcap } for pid=8301 comm="syz-executor3" 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 binder: binder_mmap: 8297 20000000-20002000 bad vm_flags failed -1 audit: type=1400 audit(1519376501.195:64): avc: denied { create } for pid=8374 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_rdma_socket permissive=1 audit: type=1400 audit(1519376501.195:65): avc: denied { write } for pid=8374 comm="syz-executor4" path="socket:[25094]" dev="sockfs" ino=25094 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 xt_CT: netfilter: NOTRACK target is deprecated, use CT instead or upgrade iptables xt_CT: netfilter: NOTRACK target is deprecated, use CT instead or upgrade iptables capability: warning: `syz-executor2' uses deprecated v2 capabilities in a way that may be insecure binder: 8679:8680 ioctl 40405514 20000000 returned -22 binder: 8679:8680 ioctl 40405514 20000000 returned -22 audit: type=1400 audit(1519376502.883:66): avc: denied { setopt } for pid=8887 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 openvswitch: netlink: Message has 8 unknown bytes. openvswitch: netlink: Message has 8 unknown bytes. x_tables: ip_tables: ah match: only valid for protocol 51 x_tables: ip_tables: ah match: only valid for protocol 51 QAT: Invalid ioctl QAT: Invalid ioctl QAT: failed to copy from user cfg_data. rfkill: input handler disabled QAT: failed to copy from user cfg_data. rfkill: input handler enabled xt_connbytes: Forcing CT accounting to be enabled 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 binder: 9288:9299 IncRefs 0 refcount change on invalid ref 0 ret -22 binder: 9288:9310 unknown command 0 binder: 9288:9310 ioctl c0306201 20a20000 returned -22