====================================================== WARNING: possible circular locking dependency detected 4.15.0+ #297 Not tainted ------------------------------------------------------ syz-executor0/4224 is trying to acquire lock: (rtnl_mutex){+.+.}, at: [<00000000d052dc88>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 but task is already holding lock: (&xt[i].mutex){+.+.}, at: [<00000000f336c2dc>] xt_find_table_lock+0x3e/0x3e0 net/netfilter/x_tables.c:1041 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_revision+0xc9/0x2b0 net/netfilter/x_tables.c:372 do_ip6t_get_ctl+0x963/0xaf0 net/ipv6/netfilter/ip6_tables.c:1737 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 SYSC_getsockopt net/socket.c:1880 [inline] SyS_getsockopt+0x178/0x340 net/socket.c:1862 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: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+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:1259 tcp_setsockopt+0x82/0xd0 net/ipv4/tcp.c:2905 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+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-executor0/4224: #0: (&xt[i].mutex){+.+.}, at: [<00000000f336c2dc>] xt_find_table_lock+0x3e/0x3e0 net/netfilter/x_tables.c:1041 stack backtrace: CPU: 1 PID: 4224 Comm: syz-executor0 Not tainted 4.15.0+ #297 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:1259 tcp_setsockopt+0x82/0xd0 net/ipv4/tcp.c:2905 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+0x282/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x26/0x9b RIP: 0033:0x455d8a RSP: 002b:0000000000a2f598 EFLAGS: 00000206 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00000000006f8a40 RCX: 0000000000455d8a RDX: 0000000000000040 RSI: 0000000000000000 RDI: 0000000000000013 RBP: 00000000006f8a40 R08: 00000000000002d8 R09: 0000000000000001 R10: 00000000006f8e68 R11: 0000000000000206 R12: 0000000000000013 R13: 00000000006fb9e8 R14: 000000000002bc85 R15: 0000000000000010 binder_alloc: binder_alloc_mmap_handler: 24233 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder_alloc: 24233: binder_alloc_buf, no vma binder: 24233:24251 transaction failed 29189/-3, size 24-8 line 2957 binder: 24233:24237 ioctl 40046207 0 returned -16 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 24233:24237 transaction 118 out, still active binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 118, target dead netlink: 8 bytes leftover after parsing attributes in process `syz-executor4'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor4'. *** Guest State *** kauditd_printk_skb: 74 callbacks suppressed audit: type=1400 audit(1517834655.290:625): avc: denied { setattr } for pid=24410 comm="syz-executor0" name="map_files" dev="proc" ino=58765 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 CR0: actual=0x000000001ffffff0, shadow=0x000000007ffffff0, gh_mask=fffffffffffffff7 CR4: actual=0x0000000000002050, shadow=0x0000000000000000, gh_mask=ffffffffffffe871 CR3 = 0x00000000fffbc000 RSP = 0x0000000000000000 RIP = 0x0000000000008000 RFLAGS=0x00000002 DR7 = 0x0000000000000400 Sysenter RSP=0000000000000000 CS:RIP=0000:0000000000000000 CS: sel=0x3000, attr=0x08093, limit=0xffffffff, base=0x0000000000030000 DS: sel=0x0000, attr=0x08093, limit=0xffffffff, base=0x0000000000000000 SS: sel=0x0000, attr=0x08093, limit=0xffffffff, base=0x0000000000000000 ES: sel=0x0000, attr=0x08093, limit=0xffffffff, base=0x0000000000000000 FS: sel=0x0000, attr=0x08093, limit=0xffffffff, base=0x0000000000000000 GS: sel=0x0000, attr=0x08093, limit=0xffffffff, base=0x0000000000000000 GDTR: limit=0x00000000, base=0x0000000000000000 LDTR: sel=0x0000, attr=0x10000, limit=0x00000000, base=0x0000000000000000 IDTR: limit=0x00000000, base=0x0000000000000000 TR: sel=0x0000, attr=0x10000, limit=0x00000000, base=0x0000000000000000 EFER = 0x0000000000000000 PAT = 0x0007040600070406 DebugCtl = 0x0000000000000000 DebugExceptions = 0x0000000000000000 Interruptibility = 00000008 ActivityState = 00000000 *** Host State *** RIP = 0xffffffff811c99dc RSP = 0xffff8801d254f3b8 CS=0010 SS=0018 DS=0000 ES=0000 FS=0000 GS=0000 TR=0040 FSBase=00007fb71a654700 GSBase=ffff8801db400000 TRBase=fffffe0000003000 GDTBase=fffffe0000001000 IDTBase=fffffe0000000000 CR0=0000000080050033 CR3=00000001cfbc4006 CR4=00000000001626f0 Sysenter RSP=fffffe0000002200 CS:RIP=0010:ffffffff85a019f0 EFER = 0x0000000000000d01 PAT = 0x0000000000000000 *** Control State *** PinBased=0000003f CPUBased=b699edfa SecondaryExec=000000c2 EntryControls=0000d1ff ExitControls=0023efff ExceptionBitmap=00060042 PFECmask=00000000 PFECmatch=00000000 VMEntry: intr_info=00000000 errcode=00000000 ilen=00000000 VMExit: intr_info=00000000 errcode=00000000 ilen=00000000 reason=80000021 qualification=0000000000000000 IDTVectoring: info=00000000 errcode=00000000 TSC Offset = 0xffffff9c797c49f5 EPT pointer = 0x00000001b62a701e snd_dummy snd_dummy.0: control 112:0:0:Î:0 is already present dccp_invalid_packet: pskb_may_pull failed QAT: Invalid ioctl snd_dummy snd_dummy.0: control 112:0:0:Î:0 is already present QAT: Invalid ioctl binder: BINDER_SET_CONTEXT_MGR already set binder: 24522:24554 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 24522:24540 ioctl 40046207 0 returned -16 Cannot find add_set index 4 as target Cannot find add_set index 4 as target QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl xprt_adjust_timeout: rq_timeout = 0! xprt_adjust_timeout: rq_timeout = 0! ipt_CLUSTERIP: Please specify destination IP ipt_CLUSTERIP: Please specify destination IP sock: sock_set_timeout: `syz-executor5' (pid 24998) tries to set negative timeout sock: sock_set_timeout: `syz-executor5' (pid 25006) tries to set negative timeout irq bypass consumer (token 0000000024da4576) registration fails: -16 can: request_module (can-proto-0) failed. FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 0 PID: 25088 Comm: syz-executor7 Not tainted 4.15.0+ #297 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 dst_alloc+0x11f/0x1a0 net/core/dst.c:104 rt_dst_alloc+0xe9/0x520 net/ipv4/route.c:1497 __mkroute_output net/ipv4/route.c:2239 [inline] ip_route_output_key_hash_rcu+0xa59/0x2f00 net/ipv4/route.c:2467 can: request_module (can-proto-0) failed. ip_route_output_key_hash+0x20b/0x370 net/ipv4/route.c:2296 __ip_route_output_key include/net/route.h:125 [inline] ip_route_output_flow+0x26/0xa0 net/ipv4/route.c:2550 udp_sendmsg+0x19bd/0x2f70 net/ipv4/udp.c:1012 udpv6_sendmsg+0x757/0x3400 net/ipv6/udp.c:1156 inet_sendmsg+0x11f/0x5e0 net/ipv4/af_inet.c:764 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg+0xca/0x110 net/socket.c:640 SYSC_sendto+0x361/0x5c0 net/socket.c:1747 SyS_sendto+0x40/0x50 net/socket.c:1715 do_syscall_64+0x282/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x26/0x9b RIP: 0033:0x453299 RSP: 002b:00007f477f25bc58 EFLAGS: 00000212 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000453299 RDX: 0000000000000000 RSI: 000000002072f000 RDI: 0000000000000013 RBP: 00000000000004b9 R08: 00000000207dc000 R09: 0000000000000010 R10: fffffffffffffffe R11: 0000000000000212 R12: 00000000006f61f8 R13: 0000000000000014 R14: 00007f477f25c6d4 R15: ffffffffffffffff x_tables: ip_tables: .0 target: invalid size 8 (kernel) != (user) 1 x_tables: ip_tables: .0 target: invalid size 8 (kernel) != (user) 1 netlink: 8 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor2'. IPv6: ADDRCONF(NETDEV_CHANGE): eql: link becomes ready audit: type=1400 audit(1517834659.369:626): avc: denied { setattr } for pid=25232 comm="syz-executor1" name="pagemap" dev="proc" ino=59778 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=file permissive=1 QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl futex_wake_op: syz-executor0 tries to shift op by -1; fix this program futex_wake_op: syz-executor0 tries to shift op by -1; fix this program binder_alloc: binder_alloc_mmap_handler: 25590 2026d000-2026e000 already mapped failed -16 binder: 25590:25600 got transaction with invalid offset (1, min 0 max 24) or object. binder: 25590:25600 transaction failed 29201/-22, size 24-16 line 3020 binder: BINDER_SET_CONTEXT_MGR already set binder: 25590:25617 ioctl 40046207 0 returned -16 binder_alloc: 25590: binder_alloc_buf, no vma binder: 25590:25617 transaction failed 29189/-3, size 24-16 line 2957 binder_alloc: binder_alloc_mmap_handler: 25590 2026d000-2026e000 already mapped failed -16 binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_ERROR: 29201 binder: 25627:25629 Acquire 1 refcount change on invalid ref 0 ret -22 binder: 25627:25629 ioctl 8904 20018ffc returned -22 binder: 25627:25629 Acquire 1 refcount change on invalid ref 0 ret -22 binder: 25627:25629 ioctl 8904 20018ffc returned -22 binder: 25729:25737 unknown command 0 binder: 25729:25737 ioctl c0306201 2000dfd0 returned -22 binder: 25729:25737 unknown command 0 binder: 25729:25737 ioctl c0306201 2000dfd0 returned -22 sg_write: data in/out 36090/65289 bytes for SCSI command 0x67-- guessing data in; program syz-executor4 not setting count and/or reply_len properly sg_write: data in/out 36090/65289 bytes for SCSI command 0x67-- guessing data in; program syz-executor4 not setting count and/or reply_len properly can: request_module (can-proto-3) failed. can: request_module (can-proto-3) failed. PPPIOCDETACH file->f_count=2 device eql entered promiscuous mode audit: type=1400 audit(1517834662.138:627): avc: denied { listen } for pid=26014 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 sock: sock_set_timeout: `syz-executor6' (pid 26025) tries to set negative timeout sock: sock_set_timeout: `syz-executor6' (pid 26042) tries to set negative timeout *** Guest State *** CR0: actual=0x0000000000000031, shadow=0x0000000060000011, gh_mask=fffffffffffffff7 CR4: actual=0x0000000000002050, shadow=0x0000000000000020, gh_mask=ffffffffffffe871 CR3 = 0x00000000fffbc000 RSP = 0x0000000000000f80 RIP = 0x0000000000000001 RFLAGS=0x00000046 DR7 = 0x0000000000000400 Sysenter RSP=0000000000000f80 CS:RIP=0050:0000000000002810 CS: sel=0x0030, attr=0x0409b, limit=0x000fffff, base=0x0000000000000000 DS: sel=0x0038, attr=0x04093, limit=0x000fffff, base=0x0000000000000000 SS: sel=0x0038, attr=0x04093, limit=0x000fffff, base=0x0000000000000000 ES: sel=0x0038, attr=0x04093, limit=0x000fffff, base=0x0000000000000000 FS: sel=0x0038, attr=0x04093, limit=0x000fffff, base=0x0000000000000000 GS: sel=0x0038, attr=0x04093, limit=0x000fffff, base=0x0000000000000000 GDTR: limit=0x000007ff, base=0x0000000000001000 LDTR: sel=0x0008, attr=0x04082, limit=0x000007ff, base=0x0000000000001800 IDTR: limit=0x000001ff, base=0x0000000000003800 TR: sel=0x0000, attr=0x0008b, limit=0x0000ffff, base=0x0000000000000000 EFER = 0x0000000000000001 PAT = 0x0007040600070406 DebugCtl = 0x0000000000000000 DebugExceptions = 0x0000000000000000 Interruptibility = 00000000 ActivityState = 00000000 *** Host State *** RIP = 0xffffffff811c99dc RSP = 0xffff8801ceb373b8 CS=0010 SS=0018 DS=0000 ES=0000 FS=0000 GS=0000 TR=0040 FSBase=00007fdec8d5e700 GSBase=ffff8801db400000 TRBase=fffffe0000003000 GDTBase=fffffe0000001000 IDTBase=fffffe0000000000 CR0=0000000080050033 CR3=00000001a07b7001 CR4=00000000001626f0 Sysenter RSP=fffffe0000002200 CS:RIP=0010:ffffffff85a019f0 EFER = 0x0000000000000d01 PAT = 0x0000000000000000 *** Control State *** PinBased=0000003f CPUBased=b699edfe SecondaryExec=000000ca EntryControls=0000d1ff ExitControls=0023efff ExceptionBitmap=00060042 PFECmask=00000000 PFECmatch=00000000 VMEntry: intr_info=80000202 errcode=00000000 ilen=00000000 VMExit: intr_info=00000000 errcode=00000000 ilen=00000003 reason=80000021 qualification=0000000000000000 IDTVectoring: info=00000000 errcode=00000000 TSC Offset = 0xffffff98ba43dc48 EPT pointer = 0x00000001aa5a501e