audit: type=1400 audit(1517497576.279:21): avc: denied { accept } for pid=5308 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_netfilter_socket permissive=1 ====================================================== WARNING: possible circular locking dependency detected 4.15.0+ #219 Not tainted ------------------------------------------------------ syz-executor3/5321 is trying to acquire lock: (sk_lock-AF_INET){+.+.}, at: [<0000000054b40f60>] lock_sock include/net/sock.h:1461 [inline] (sk_lock-AF_INET){+.+.}, at: [<0000000054b40f60>] do_ip_getsockopt+0x1b3/0x2170 net/ipv4/ip_sockglue.c:1335 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<00000000af0c4d7f>] 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: -> #1 (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 register_netdevice_notifier+0xad/0x860 net/core/dev.c:1607 tee_tg_check+0x1a0/0x280 net/netfilter/xt_TEE.c:106 xt_check_target+0x22c/0x7d0 net/netfilter/x_tables.c:845 check_target net/ipv4/netfilter/ip_tables.c:513 [inline] find_check_entry.isra.8+0x8c8/0xcb0 net/ipv4/netfilter/ip_tables.c:554 translate_table+0xed1/0x1610 net/ipv4/netfilter/ip_tables.c:725 do_replace net/ipv4/netfilter/ip_tables.c:1141 [inline] do_ipt_set_ctl+0x370/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+0xa1/0xb0 net/ipv4/ip_sockglue.c:1260 sctp_setsockopt+0x2b6/0x61d0 net/sctp/socket.c:4104 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2978 SYSC_setsockopt net/socket.c:1849 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1828 entry_SYSCALL_64_fastpath+0x29/0xa0 -> #0 (sk_lock-AF_INET){+.+.}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3920 lock_sock_nested+0xc2/0x110 net/core/sock.c:2780 lock_sock include/net/sock.h:1461 [inline] do_ip_getsockopt+0x1b3/0x2170 net/ipv4/ip_sockglue.c:1335 ip_getsockopt+0x90/0x220 net/ipv4/ip_sockglue.c:1566 tcp_getsockopt+0x82/0xd0 net/ipv4/tcp.c:3359 sock_common_getsockopt+0x95/0xd0 net/core/sock.c:2937 SYSC_getsockopt net/socket.c:1880 [inline] SyS_getsockopt+0x178/0x340 net/socket.c:1862 entry_SYSCALL_64_fastpath+0x29/0xa0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(rtnl_mutex); lock(sk_lock-AF_INET); lock(rtnl_mutex); lock(sk_lock-AF_INET); *** DEADLOCK *** 1 lock held by syz-executor3/5321: #0: (rtnl_mutex){+.+.}, at: [<00000000af0c4d7f>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 stack backtrace: CPU: 0 PID: 5321 Comm: syz-executor3 Not tainted 4.15.0+ #219 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:2780 lock_sock include/net/sock.h:1461 [inline] do_ip_getsockopt+0x1b3/0x2170 net/ipv4/ip_sockglue.c:1335 ip_getsockopt+0x90/0x220 net/ipv4/ip_sockglue.c:1566 tcp_getsockopt+0x82/0xd0 net/ipv4/tcp.c:3359 sock_common_getsockopt+0x95/0xd0 net/core/sock.c:2937 SYSC_getsockopt net/socket.c:1880 [inline] SyS_getsockopt+0x178/0x340 net/socket.c:1862 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x453299 RSP: 002b:00007fe7c369ac58 EFLAGS: 00000212 ORIG_RAX: 0000000000000037 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000453299 RDX: 0000000000000029 RSI: 0000000000000000 RDI: 0000000000000013 RBP: 0000000000000512 R08: 0000000020fae000 R09: 0000000000000000 R10: 0000000020000000 R11: 0000000000000212 R12: 00000000006f6a50 R13: 00000000ffffffff R14: 00007fe7c369b6d4 R15: 0000000000000000 syz-executor3 uses obsolete (PF_INET,SOCK_PACKET) SELinux: unrecognized netlink message: protocol=4 nlmsg_type=24 sclass=netlink_tcpdiag_socket pig=5358 comm=syz-executor6 device syz3 entered promiscuous mode device syz3 left promiscuous mode device syz3 entered promiscuous mode SELinux: unrecognized netlink message: protocol=4 nlmsg_type=24 sclass=netlink_tcpdiag_socket pig=5372 comm=syz-executor6 netlink: 3 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor4'. xt_limit: Overflow, try lower: 1844162046/129 netlink: 'syz-executor6': attribute type 16 has an invalid length. netlink: 'syz-executor6': attribute type 29 has an invalid length. netlink: 'syz-executor6': attribute type 16 has an invalid length. IPv4: Oversized IP packet from 127.0.0.1 netlink: 'syz-executor6': attribute type 29 has an invalid length. IPv4: Oversized IP packet from 127.0.0.1 sctp: [Deprecated]: syz-executor0 (pid 5990) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor0 (pid 5990) Use of int in maxseg socket option. Use struct sctp_assoc_value instead netlink: 8 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor4'. xt_hashlimit: overflow, try lower: 0/0 xt_hashlimit: overflow, try lower: 0/0 ipt_CLUSTERIP: ipt_CLUSTERIP is deprecated and it will removed soon, use xt_cluster instead netlink: 68 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 68 bytes leftover after parsing attributes in process `syz-executor1'. IPv4: Oversized IP packet from 127.0.0.1 IPv4: Oversized IP packet from 127.0.0.1 IPv4: Oversized IP packet from 127.0.0.1 IPv4: Oversized IP packet from 127.0.0.1 netlink: 'syz-executor0': attribute type 8 has an invalid length. netlink: 'syz-executor5': attribute type 16 has an invalid length. netlink: 'syz-executor5': attribute type 16 has an invalid length. xt_CONNSECMARK: target only valid in the 'mangle' or 'security' tables, not 'filter'. xt_CONNSECMARK: target only valid in the 'mangle' or 'security' tables, not 'filter'. netlink: 'syz-executor3': attribute type 1 has an invalid length. IPv6: RTM_NEWROUTE with no NLM_F_CREATE or NLM_F_REPLACE IPv6: NLM_F_CREATE should be set when creating new route IPv6: NLM_F_CREATE should be set when creating new route IPv6: NLM_F_CREATE should be set when creating new route IPv6: RTM_NEWROUTE with no NLM_F_CREATE or NLM_F_REPLACE kauditd_printk_skb: 16 callbacks suppressed audit: type=1400 audit(1517497580.710:38): avc: denied { connect } for pid=6807 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(1517497580.710:39): avc: denied { ioctl } for pid=6807 comm="syz-executor3" path="socket:[17468]" dev="sockfs" ino=17468 ioctlcmd=0x89a0 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 netlink: 'syz-executor3': attribute type 21 has an invalid length. netlink: 'syz-executor3': attribute type 21 has an invalid length. ipt_CLUSTERIP: ipt_CLUSTERIP is deprecated and it will removed soon, use xt_cluster instead audit: type=1400 audit(1517497581.032:40): avc: denied { map } for pid=6924 comm="syz-executor4" path="socket:[17564]" dev="sockfs" ino=17564 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=rawip_socket permissive=1 sctp: [Deprecated]: syz-executor2 (pid 7026) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor2 (pid 7078) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor0 (pid 7183) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor0 (pid 7191) Use of int in maxseg socket option. Use struct sctp_assoc_value instead xt_DSCP: dscp fc out of range xt_DSCP: dscp fc out of range do_dccp_getsockopt: sockopt(PACKET_SIZE) is deprecated: fix your app xt_connbytes: Forcing CT accounting to be enabled do_dccp_getsockopt: sockopt(PACKET_SIZE) is deprecated: fix your app audit: type=1400 audit(1517497582.123:41): avc: denied { getattr } for pid=7312 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_netfilter_socket permissive=1 syz-executor6 (7357) used greatest stack depth: 15504 bytes left audit: type=1400 audit(1517497582.383:42): avc: denied { getattr } for pid=7422 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 sock: sock_set_timeout: `syz-executor3' (pid 7492) tries to set negative timeout can: request_module (can-proto-3) failed. can: request_module (can-proto-3) failed. nla_parse: 6 callbacks suppressed netlink: 5 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 5 bytes leftover after parsing attributes in process `syz-executor4'. ieee80211 phy2: Selected rate control algorithm 'minstrel_ht' SELinux: unrecognized netlink message: protocol=0 nlmsg_type=260 sclass=netlink_route_socket pig=7715 comm=syz-executor3 sctp: [Deprecated]: syz-executor1 (pid 7717) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead sctp: [Deprecated]: syz-executor1 (pid 7717) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead sctp: [Deprecated]: syz-executor5 (pid 7751) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead sctp: [Deprecated]: syz-executor7 (pid 7781) Use of int in maxseg socket option. Use struct sctp_assoc_value instead xt_cluster: this node mask cannot be higher than the total number of nodes IPv4: Oversized IP packet from 127.0.0.1 xt_cgroup: invalid path, errno=-2 sctp: [Deprecated]: syz-executor4 (pid 8147) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead sctp: [Deprecated]: syz-executor4 (pid 8147) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead audit: type=1400 audit(1517497584.260:43): avc: denied { map } for pid=8159 comm="syz-executor1" path="socket:[18582]" dev="sockfs" ino=18582 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_route_socket permissive=1 xt_cgroup: invalid path, errno=-2 audit: type=1400 audit(1517497584.338:44): avc: denied { ioctl } for pid=8173 comm="syz-executor7" path="socket:[19553]" dev="sockfs" ino=19553 ioctlcmd=0x8946 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(1517497584.370:45): avc: denied { shutdown } for pid=8173 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 audit: type=1400 audit(1517497584.574:46): avc: denied { getopt } for pid=8230 comm="syz-executor1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:unlabeled_t:s0 tclass=socket permissive=1 validate_nla: 7 callbacks suppressed netlink: 'syz-executor5': attribute type 1 has an invalid length. SELinux: unrecognized netlink message: protocol=0 nlmsg_type=17482 sclass=netlink_route_socket pig=8437 comm=syz-executor0 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=17482 sclass=netlink_route_socket pig=8437 comm=syz-executor0 sctp: [Deprecated]: syz-executor7 (pid 8460) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead sctp: [Deprecated]: syz-executor7 (pid 8476) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead do_dccp_setsockopt: sockopt(CHANGE_L/R) is deprecated: fix your app do_dccp_setsockopt: sockopt(CHANGE_L/R) is deprecated: fix your app audit: type=1400 audit(1517497585.461:47): avc: denied { write } for pid=8549 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 netlink: 'syz-executor6': attribute type 2 has an invalid length. netlink: 'syz-executor6': attribute type 2 has an invalid length. IPv4: Oversized IP packet from 172.20.1.11 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=31 sclass=netlink_route_socket pig=8855 comm=syz-executor0 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=31 sclass=netlink_route_socket pig=8866 comm=syz-executor0