====================================================== WARNING: possible circular locking dependency detected netlink: 'syz-executor2': attribute type 7 has an invalid length. 4.15.0+ #292 Not tainted ------------------------------------------------------ syz-executor3/5442 is trying to acquire lock: (sk_lock-AF_INET){+.+.}, at: [<0000000046034569>] lock_sock include/net/sock.h:1461 [inline] (sk_lock-AF_INET){+.+.}, at: [<0000000046034569>] do_ip_setsockopt.isra.12+0x1d9/0x3210 net/ipv4/ip_sockglue.c:646 but task is already holding lock: netlink: 'syz-executor2': attribute type 7 has an invalid length. (rtnl_mutex){+.+.}, at: [<00000000a2e00c4f>] 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: audit: type=1400 audit(1517581468.389:19): avc: denied { create } for pid=5439 comm="syz-executor2" 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 -> #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 audit: type=1400 audit(1517581468.389:20): avc: denied { write } for pid=5439 comm="syz-executor2" 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 clusterip_config_init net/ipv4/netfilter/ipt_CLUSTERIP.c:261 [inline] clusterip_tg_check+0xeb9/0x1570 net/ipv4/netfilter/ipt_CLUSTERIP.c:478 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_setsockopt.isra.12+0x1d9/0x3210 net/ipv4/ip_sockglue.c:646 ip_setsockopt+0x3a/0xb0 net/ipv4/ip_sockglue.c:1252 dccp_setsockopt+0x85/0xd0 net/dccp/proto.c:576 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 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/5442: #0: (rtnl_mutex){+.+.}, at: [<00000000a2e00c4f>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 stack backtrace: CPU: 0 PID: 5442 Comm: syz-executor3 Not tainted 4.15.0+ #292 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_setsockopt.isra.12+0x1d9/0x3210 net/ipv4/ip_sockglue.c:646 ip_setsockopt+0x3a/0xb0 net/ipv4/ip_sockglue.c:1252 dccp_setsockopt+0x85/0xd0 net/dccp/proto.c:576 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 RIP: 0033:0x453299 RSP: 002b:00007f19ac843c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000453299 RDX: 0000000000000029 RSI: 0000000000000000 RDI: 0000000000000013 RBP: 00000000000005c9 R08: 0000000000000010 R09: 0000000000000000 R10: 0000000020537000 R11: 0000000000000212 R12: 00000000006f7b78 R13: 00000000ffffffff R14: 00007f19ac8446d4 R15: 0000000000000000 audit: type=1400 audit(1517581469.063:21): avc: denied { map_read map_write } for pid=5464 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=bpf permissive=1 audit: type=1400 audit(1517581469.125:22): avc: denied { map } for pid=5486 comm="syz-executor0" path=2F6D656D66643A202864656C6574656429 dev="tmpfs" ino=14741 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:tmpfs_t:s0 tclass=file permissive=1 audit: type=1400 audit(1517581469.214:23): avc: denied { node_bind } for pid=5505 comm="syz-executor3" saddr=::1 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:node_t:s0 tclass=dccp_socket permissive=1 audit: type=1400 audit(1517581469.266:24): avc: denied { prog_load } for pid=5521 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 audit: type=1400 audit(1517581469.294:25): avc: denied { prog_run } for pid=5521 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 audit: type=1400 audit(1517581469.863:26): avc: denied { create } for pid=5543 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_generic_socket permissive=1 audit: type=1400 audit(1517581469.878:27): avc: denied { write } for pid=5543 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_generic_socket permissive=1 IPv6: Can't replace route, no match found binder_alloc: binder_alloc_mmap_handler: 5613 2011a000-2051a000 already mapped failed -16 IPv6: Can't replace route, no match found syz-executor0 uses obsolete (PF_INET,SOCK_PACKET) capability: warning: `syz-executor3' uses 32-bit capabilities (legacy support in use) sock: sock_set_timeout: `syz-executor4' (pid 6050) tries to set negative timeout sock: sock_set_timeout: `syz-executor4' (pid 6050) tries to set negative timeout mmap: syz-executor5 (6161) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.txt. sock: process `syz-executor6' is using obsolete getsockopt SO_BSDCOMPAT binder: 6240:6245 DecRefs 0 refcount change on invalid ref 0 ret -22 binder_alloc: binder_alloc_mmap_handler: 6240 20000000-20002000 already mapped failed -16 9pnet_virtio: no channels available for device ./file0 binder: BINDER_SET_CONTEXT_MGR already set binder: 6240:6252 ioctl 40046207 0 returned -16 binder_alloc: 6240: binder_alloc_buf, no vma 9pnet_virtio: no channels available for device ./file0 binder: 6240:6245 transaction failed 29189/-3, size 40-8 line 2957 binder: 6240:6249 DecRefs 0 refcount change on invalid ref 0 ret -22 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 6240:6245 transaction 2 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 2, target dead QAT: Invalid ioctl kauditd_printk_skb: 11 callbacks suppressed audit: type=1401 audit(1517581473.448:39): op=fscreate invalid_context=2FC11E11990DB5073B32CBDB68A403B924133FEDF3F54733AF52909D318D1AFD498C2942B45B476A61E0E44BE43638DEA68E417CE7518997C649645653228EEFFF86D0C5EFC302844A5DBE4362B1DBCF0E4B08606811AD74A0C1DE294315B22DAB2DCE10A0C5AAA3D4028C576780AA72EAFB313CC7C2F2CF22074343D5EB6FFC8FE0310B54D38198F4D09CB3CEF4D2DF71E3033B92997D7CD34B99F89E6FB534D278CB3B7EADAEBBA24EE9698659076BF677DAB1AF3484DC278E4538395C556936FC2E9EA9B916EBD1C29BB842FFC5C07BFF852C346B6D0FCF6B4415FC5801C0553AF26B8D1041A623FE954561EA3B0423919CF936F7A797725B5CE81AF44C7328320BE8488C61CDC58EBA10F25A335B0121DC5F350C219E134EF31C82C51AD5A9C97A88C94120B59318D6F4A0B7F09F96B4846613B5E444AA5ED56DE62CCEBD2E528ED92030890D657648A354FE5C484A27E90EB0BCE9B0003900B7B5474A58FADA5F8CD6CF72312C4698EB0A9A25BC1D963EB069102E279F4CBF1A3C19E3E7C206A5B403AD3D3DC134C13CE496D7F8BF3C3CCAEEDE049DE79CB68F60AC9BE7B6056A0FF4E1E92D3B7584906D9F61531AB1EBE8CEE47DECB61D27E4B84D831929565C2CBF717DFC1E2E40 QAT: Invalid ioctl binder: BINDER_SET_CONTEXT_MGR already set binder: 6439:6474 ioctl 40046207 0 returned -16 audit: type=1400 audit(1517581473.770:40): avc: denied { setopt } for pid=6485 comm="syz-executor2" 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 xt_TCPMSS: Only works on TCP SYN packets xt_TCPMSS: Only works on TCP SYN packets binder: 6845:6846 sending u0000000000000000 node 7, cookie mismatch 0000000000000040 != 0000000000000000 binder: 6845:6846 transaction failed 29201/-22, size 24-8 line 3036 binder_alloc: binder_alloc_mmap_handler: 6845 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 6845:6857 ioctl 40046207 0 returned -16 binder_alloc: 6845: binder_alloc_buf, no vma binder: 6845:6846 transaction failed 29189/-3, size 24-8 line 2957 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29201 audit: type=1400 audit(1517581474.903:41): avc: denied { create } for pid=6898 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_fib_lookup_socket permissive=1 audit: type=1400 audit(1517581474.907:42): avc: denied { write } for pid=6898 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_fib_lookup_socket permissive=1 QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl syz-executor1 (7023) used greatest stack depth: 15568 bytes left QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl audit: type=1400 audit(1517581475.818:43): avc: denied { write } for pid=7130 comm="syz-executor2" name="net" dev="proc" ino=19107 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=dir permissive=1 audit: type=1400 audit(1517581475.844:44): avc: denied { add_name } for pid=7130 comm="syz-executor2" name="pfkey" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=dir permissive=1 audit: type=1400 audit(1517581475.846:45): avc: denied { create } for pid=7130 comm="syz-executor2" name="pfkey" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:insmod_t:s0 tclass=file permissive=1 capability: warning: `syz-executor6' uses deprecated v2 capabilities in a way that may be insecure netlink: 'syz-executor3': attribute type 3 has an invalid length. device eql entered promiscuous mode audit: type=1400 audit(1517581476.380:46): avc: denied { ioctl } for pid=7252 comm="syz-executor3" path="socket:[19182]" dev="sockfs" ino=19182 ioctlcmd=0x89a1 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 3 has an invalid length. audit: type=1326 audit(1517581476.614:47): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=7333 comm="syz-executor0" exe="/root/syz-executor0" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1400 audit(1517581476.615:48): avc: denied { create } for pid=7336 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_crypto_socket permissive=1 netlink: 'syz-executor2': attribute type 20 has an invalid length. device syz7 entered promiscuous mode device syz7 left promiscuous mode device syz7 entered promiscuous mode tmpfs: No value for mount option 'ądev/loop-control'