BUG: please report to dccp@vger.kernel.org => prev = 0, last = 0 at net/dccp/ccids/lib/packet_history.c:425/tfrc_rx_hist_sample_rtt() CPU: 1 PID: 5428 Comm: syz-executor3 Not tainted 4.16.0-rc1+ #231 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 tfrc_rx_hist_sample_rtt+0x407/0x4d0 net/dccp/ccids/lib/packet_history.c:422 ccid3_hc_rx_packet_recv+0x696/0xeb3 net/dccp/ccids/ccid3.c:765 ccid_hc_rx_packet_recv net/dccp/ccid.h:185 [inline] dccp_deliver_input_to_ccids+0xd9/0x250 net/dccp/input.c:180 dccp_rcv_established+0x88/0xb0 net/dccp/input.c:378 dccp_v4_do_rcv+0x135/0x160 net/dccp/ipv4.c:653 sk_backlog_rcv include/net/sock.h:908 [inline] __sk_receive_skb+0x33e/0xc10 net/core/sock.c:513 dccp_v4_rcv+0xf5f/0x1c80 net/dccp/ipv4.c:874 ip_local_deliver_finish+0x2f1/0xc50 net/ipv4/ip_input.c:216 NF_HOOK include/linux/netfilter.h:288 [inline] ip_local_deliver+0x1ce/0x6e0 net/ipv4/ip_input.c:257 dst_input include/net/dst.h:449 [inline] ip_rcv_finish+0xa36/0x2040 net/ipv4/ip_input.c:397 NF_HOOK include/linux/netfilter.h:288 [inline] ip_rcv+0xc5a/0x1840 net/ipv4/ip_input.c:493 __netif_receive_skb_core+0x1a41/0x3460 net/core/dev.c:4547 __netif_receive_skb+0x2c/0x1b0 net/core/dev.c:4612 process_backlog+0x203/0x740 net/core/dev.c:5292 napi_poll net/core/dev.c:5690 [inline] net_rx_action+0x792/0x1910 net/core/dev.c:5756 __do_softirq+0x2d7/0xb85 kernel/softirq.c:285 do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:1042 do_softirq.part.19+0x14d/0x190 kernel/softirq.c:329 do_softirq kernel/softirq.c:177 [inline] __local_bh_enable_ip+0x1ee/0x230 kernel/softirq.c:182 local_bh_enable include/linux/bottom_half.h:32 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:726 [inline] ip_finish_output2+0x962/0x1550 net/ipv4/ip_output.c:231 ip_finish_output+0x864/0xd10 net/ipv4/ip_output.c:317 NF_HOOK_COND include/linux/netfilter.h:277 [inline] ip_output+0x1d2/0x860 net/ipv4/ip_output.c:405 dst_output include/net/dst.h:443 [inline] ip_local_out+0x95/0x160 net/ipv4/ip_output.c:124 ip_queue_xmit+0x8c0/0x18e0 net/ipv4/ip_output.c:504 dccp_transmit_skb+0x9ac/0x10f0 net/dccp/output.c:142 dccp_xmit_packet+0x215/0x740 net/dccp/output.c:281 dccp_write_xmit+0x17d/0x1d0 net/dccp/output.c:363 dccp_sendmsg+0x95f/0xdc0 net/dccp/proto.c:813 inet_sendmsg+0x11f/0x5e0 net/ipv4/af_inet.c:763 sock_sendmsg_nosec net/socket.c:629 [inline] sock_sendmsg+0xca/0x110 net/socket.c:639 SYSC_sendto+0x361/0x5c0 net/socket.c:1748 SyS_sendto+0x40/0x50 net/socket.c:1716 do_syscall_64+0x282/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x26/0x9b RIP: 0033:0x453d69 RSP: 002b:00007fe52ee20c68 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007fe52ee216d4 RCX: 0000000000453d69 RDX: 0000000000001000 RSI: 00000000207b1000 RDI: 0000000000000015 RBP: 000000000072c010 R08: 0000000020000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000004ba R14: 00000000006f7210 R15: 0000000000000002 dccp_close: ABORT with 8218 bytes unread audit: type=1400 audit(1518952942.489:22): avc: denied { create } for pid=5433 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_netfilter_socket permissive=1 netlink: 'syz-executor6': attribute type 1 has an invalid length. audit: type=1400 audit(1518952942.521:23): avc: denied { getopt } for pid=5442 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 audit: type=1400 audit(1518952942.525:24): avc: denied { read } for pid=5442 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 audit: type=1400 audit(1518952942.528:25): avc: denied { getopt } for pid=5440 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 audit: type=1400 audit(1518952942.542:26): avc: denied { write } for pid=5433 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_netfilter_socket permissive=1 audit: type=1400 audit(1518952942.575:27): avc: denied { write } for pid=5442 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 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=5495 comm=syz-executor4 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=5495 comm=syz-executor4 audit: type=1400 audit(1518952942.819:28): avc: denied { map_create } 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=bpf permissive=1 netlink: 16 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 16 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 'syz-executor5': attribute type 3 has an invalid length. sctp: [Deprecated]: syz-executor3 (pid 5967) Use of int in max_burst socket option deprecated. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor5 (pid 5988) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead sctp: [Deprecated]: syz-executor3 (pid 5967) Use of int in max_burst socket option deprecated. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor5 (pid 6004) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead xt_connbytes: Forcing CT accounting to be enabled x_tables: ip_tables: ah match: only valid for protocol 51 netlink: 'syz-executor1': attribute type 2 has an invalid length. x_tables: ip_tables: ah match: only valid for protocol 51 netlink: 4 bytes leftover after parsing attributes in process `syz-executor2'. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=6327 comm=syz-executor4 ipt_CLUSTERIP: Please specify destination IP xt_CT: You must specify a L4 protocol, and not use inversions on it. ipt_CLUSTERIP: Please specify destination IP netlink: 4 bytes leftover after parsing attributes in process `syz-executor2'. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=0 sclass=netlink_route_socket pig=6334 comm=syz-executor4 IPv4: Oversized IP packet from 127.0.0.1 xt_CT: You must specify a L4 protocol, and not use inversions on it. x_tables: ip_tables: socket match: used from hooks FORWARD/OUTPUT/POSTROUTING, but only valid from PREROUTING/INPUT x_tables: ip_tables: socket match: used from hooks FORWARD/OUTPUT/POSTROUTING, but only valid from PREROUTING/INPUT syz-executor7 (6477) used greatest stack depth: 15312 bytes left xt_connbytes: Forcing CT accounting to be enabled SELinux: unrecognized netlink message: protocol=4 nlmsg_type=25 sclass=netlink_tcpdiag_socket pig=6502 comm=syz-executor7 SELinux: unrecognized netlink message: protocol=4 nlmsg_type=25 sclass=netlink_tcpdiag_socket pig=6502 comm=syz-executor7 dst_release: dst:00000000754408ce refcnt:-1 dccp_invalid_packet: invalid packet type sock: sock_set_timeout: `syz-executor0' (pid 6710) tries to set negative timeout ip6t_srh: unknown srh match flags C84 sock: sock_set_timeout: `syz-executor0' (pid 6710) tries to set negative timeout dccp_invalid_packet: invalid packet type ip6t_srh: unknown srh match flags C84 kauditd_printk_skb: 15 callbacks suppressed audit: type=1400 audit(1518952947.515:44): avc: denied { net_broadcast } for pid=6776 comm="syz-executor1" capability=11 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 xt_connbytes: Forcing CT accounting to be enabled x_tables: ip_tables: SYNPROXY target: used from hooks INPUT/FORWARD/OUTPUT, but only usable from INPUT/FORWARD x_tables: ip_tables: SYNPROXY target: used from hooks INPUT/FORWARD/OUTPUT, but only usable from INPUT/FORWARD xt_HL: increment/decrement does not make sense with value 0 xt_CT: No such timeout policy "syz1" xt_CT: No such timeout policy "syz1" ip6t_REJECT: TCP_RESET illegal for non-tcp xt_TCPMSS: Only works on TCP SYN packets xt_TCPMSS: Only works on TCP SYN packets ====================================================== WARNING: possible circular locking dependency detected 4.16.0-rc1+ #231 Not tainted ------------------------------------------------------ syz-executor2/7056 is trying to acquire lock: (rtnl_mutex){+.+.}, at: [<000000009fc8f964>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 but task is already holding lock: (&xt[i].mutex){+.+.}, at: [<0000000070369410>] xt_find_table_lock+0x3e/0x3e0 net/netfilter/x_tables.c:1046 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&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:2938 SYSC_getsockopt net/socket.c:1881 [inline] SyS_getsockopt+0x178/0x340 net/socket.c:1863 do_syscall_64+0x282/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x26/0x9b -> #1 (sk_lock-AF_INET6){+.+.}: lock_sock_nested+0xc2/0x110 net/core/sock.c:2781 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 tcp_setsockopt+0x82/0xd0 net/ipv4/tcp.c:2905 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2979 SYSC_setsockopt net/socket.c:1850 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1829 do_syscall_64+0x282/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x26/0x9b -> #0 (rtnl_mutex){+.+.}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3920 __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:1261 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:2979 SYSC_setsockopt net/socket.c:1850 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1829 do_syscall_64+0x282/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x26/0x9b other info that might help us debug this: Chain exists of: rtnl_mutex --> sk_lock-AF_INET6 --> &xt[i].mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&xt[i].mutex); lock(sk_lock-AF_INET6); lock(&xt[i].mutex); lock(rtnl_mutex); *** DEADLOCK *** 1 lock held by syz-executor2/7056: #0: (&xt[i].mutex){+.+.}, at: [<0000000070369410>] xt_find_table_lock+0x3e/0x3e0 net/netfilter/x_tables.c:1046 stack backtrace: CPU: 0 PID: 7056 Comm: syz-executor2 Not tainted 4.16.0-rc1+ #231 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 __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:1261 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:2979 SYSC_setsockopt net/socket.c:1850 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1829 do_syscall_64+0x282/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x26/0x9b RIP: 0033:0x453d69 RSP: 002b:00007f2250fe3c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007f2250fe46d4 RCX: 0000000000453d69 RDX: 0000000000000040 RSI: 0000000000000000 RDI: 0000000000000013 RBP: 000000000072bf58 R08: 0000000000000338 R09: 0000000000000000 R10: 0000000020000ca0 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000004d6 R14: 00000000006f74b0 R15: 0000000000000001 netlink: 'syz-executor4': attribute type 1 has an invalid length. netlink: 'syz-executor4': attribute type 1 has an invalid length. netlink: 'syz-executor4': attribute type 1 has an invalid length. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=58791 sclass=netlink_route_socket pig=7109 comm=syz-executor5 netlink: 'syz-executor4': attribute type 1 has an invalid length. RDS: rds_bind could not find a transport for 172.20.0.187, load rds_tcp or rds_rdma? RDS: rds_bind could not find a transport for 172.20.0.187, load rds_tcp or rds_rdma? kernel msg: ebtables bug: please report to author: Couldn't copy entries from userspace kernel msg: ebtables bug: please report to author: Couldn't copy entries from userspace audit: type=1400 audit(1518952950.200:45): avc: denied { getattr } for pid=7365 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_crypto_socket permissive=1 ipt_CLUSTERIP: bad local_nodes[0] 0 ipt_CLUSTERIP: bad local_nodes[0] 0 TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. x_tables: ip6_tables: TCPMSS target: only valid for protocol 6 xt_hashlimit: Unknown mode mask 15E6E750, kernel too old? xt_hashlimit: Unknown mode mask 15E6E750, kernel too old? can: request_module (can-proto-0) failed. can: request_module (can-proto-0) failed. xt_CT: netfilter: NOTRACK target is deprecated, use CT instead or upgrade iptables netlink: 8 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor1'. Protocol error: SET target dimension is over the limit! sock: sock_set_timeout: `syz-executor2' (pid 7783) tries to set negative timeout sock: sock_set_timeout: `syz-executor2' (pid 7783) tries to set negative timeout kernel msg: ebtables bug: please report to author: Valid hook without chain IPVS: length: 24 != 8 kernel msg: ebtables bug: please report to author: Valid hook without chain IPVS: length: 24 != 8 netlink: 11 bytes leftover after parsing attributes in process `syz-executor6'. xt_CT: No such helper "netbios-ns"