====================================================== WARNING: possible circular locking dependency detected 4.15.0+ #290 Not tainted ------------------------------------------------------ syz-executor6/14302 is trying to acquire lock: (rtnl_mutex){+.+.}, at: [<000000002a13a12d>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 but task is already holding lock: (sk_lock-AF_INET){+.+.}, at: [<0000000073782e8a>] lock_sock include/net/sock.h:1461 [inline] (sk_lock-AF_INET){+.+.}, at: [<0000000073782e8a>] ip_setsockopt+0x8c/0xb0 net/ipv4/ip_sockglue.c:1259 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (sk_lock-AF_INET){+.+.}: 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 udp_setsockopt+0x45/0x80 net/ipv4/udp.c:2401 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 (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 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 raw_setsockopt+0xb7/0xd0 net/ipv4/raw.c:870 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(sk_lock-AF_INET); lock(rtnl_mutex); lock(sk_lock-AF_INET); lock(rtnl_mutex); *** DEADLOCK *** 1 lock held by syz-executor6/14302: #0: (sk_lock-AF_INET){+.+.}, at: [<0000000073782e8a>] lock_sock include/net/sock.h:1461 [inline] #0: (sk_lock-AF_INET){+.+.}, at: [<0000000073782e8a>] ip_setsockopt+0x8c/0xb0 net/ipv4/ip_sockglue.c:1259 stack backtrace: CPU: 1 PID: 14302 Comm: syz-executor6 Not tainted 4.15.0+ #290 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 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 raw_setsockopt+0xb7/0xd0 net/ipv4/raw.c:870 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:00007fef325c2c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007fef325c3700 RCX: 0000000000453299 RDX: 0000000000000040 RSI: 0000000000000000 RDI: 0000000000000013 RBP: 0000000000000000 R08: 0000000000000320 R09: 0000000000000000 R10: 0000000020854ce0 R11: 0000000000000212 R12: 0000000000000000 R13: 0000000000a2f33f R14: 00007fef325c39c0 R15: 0000000000000000 audit: type=1400 audit(1517485544.504:608): avc: denied { map } for pid=14318 comm="syz-executor5" path="socket:[47717]" dev="sockfs" ino=47717 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=packet_socket permissive=1 SELinux: unknown mount option device syz4 entered promiscuous mode device syz4 left promiscuous mode device syz4 entered promiscuous mode device syz4 left promiscuous mode SELinux: unknown mount option audit: type=1326 audit(1517485544.843:609): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=14421 comm="syz-executor6" exe="/root/syz-executor6" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517485544.843:610): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=14421 comm="syz-executor6" exe="/root/syz-executor6" sig=0 arch=c000003e syscall=41 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517485544.843:611): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=14421 comm="syz-executor6" exe="/root/syz-executor6" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517485544.843:612): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=14421 comm="syz-executor6" exe="/root/syz-executor6" sig=0 arch=c000003e syscall=16 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517485544.843:613): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=14421 comm="syz-executor6" exe="/root/syz-executor6" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517485544.843:614): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=14421 comm="syz-executor6" exe="/root/syz-executor6" sig=0 arch=c000003e syscall=2 compat=0 ip=0x40d591 code=0x7ffc0000 audit: type=1326 audit(1517485544.843:615): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=14421 comm="syz-executor6" exe="/root/syz-executor6" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517485544.843:616): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=14421 comm="syz-executor6" exe="/root/syz-executor6" sig=0 arch=c000003e syscall=91 compat=0 ip=0x453299 code=0x7ffc0000 QAT: Invalid ioctl TCP: request_sock_TCPv6: Possible SYN flooding on port 20026. Sending cookies. Check SNMP counters. QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl device syz6 entered promiscuous mode device syz6 left promiscuous mode TCP: request_sock_TCP: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. binder: 14763:14768 ERROR: BC_REGISTER_LOOPER called without request binder: 14768 RLIMIT_NICE not set binder: 14768 RLIMIT_NICE not set binder: 14768 RLIMIT_NICE not set binder_alloc: 14763: binder_alloc_buf, no vma QAT: Invalid ioctl QAT: Invalid ioctl binder: 14763:14768 transaction failed 29189/-3, size 0-0 line 2903 binder: send failed reply for transaction 75 to 14763:14775 binder: undelivered TRANSACTION_ERROR: 29190 binder: undelivered TRANSACTION_COMPLETE binder: 14763:14768 ERROR: BC_REGISTER_LOOPER called without request binder: 14768 RLIMIT_NICE not set binder: 14768 RLIMIT_NICE not set QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl binder: undelivered TRANSACTION_ERROR: 29189 binder: release 14763:14775 transaction 78 out, still active binder: undelivered TRANSACTION_COMPLETE binder: release 14763:14768 transaction 78 in, still active binder: send failed reply for transaction 78, target dead FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 1 PID: 14956 Comm: syz-executor1 Not tainted 4.15.0+ #290 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:418 [inline] slab_alloc mm/slab.c:3364 [inline] kmem_cache_alloc+0x47/0x760 mm/slab.c:3538 ptlock_alloc+0x24/0x70 mm/memory.c:4718 ptlock_init include/linux/mm.h:1796 [inline] pgtable_page_ctor include/linux/mm.h:1830 [inline] pte_alloc_one+0x59/0x100 arch/x86/mm/pgtable.c:32 __do_huge_pmd_anonymous_page mm/huge_memory.c:564 [inline] do_huge_pmd_anonymous_page+0x551/0x1b00 mm/huge_memory.c:728 create_huge_pmd mm/memory.c:3860 [inline] __handle_mm_fault+0x1a0c/0x3ce0 mm/memory.c:4064 handle_mm_fault+0x38f/0x930 mm/memory.c:4130 __do_page_fault+0x5c9/0xc90 arch/x86/mm/fault.c:1426 do_page_fault+0xee/0x720 arch/x86/mm/fault.c:1501 page_fault+0x2c/0x60 arch/x86/entry/entry_64.S:1261 RIP: 0010:copy_user_enhanced_fast_string+0xe/0x20 arch/x86/lib/copy_user_64.S:180 RSP: 0018:ffff8801d6f6fcd0 EFLAGS: 00010206 RAX: ffffed003adedfb9 RBX: 0000000000000090 RCX: 0000000000000090 RDX: 0000000000000090 RSI: ffff8801d6f6fd38 RDI: 0000000020c82fbc RBP: ffff8801d6f6fd00 R08: ffffed003adedfb9 R09: ffffed003adedfb9 R10: 0000000000000000 R11: ffffed003adedfb8 R12: 0000000020c82fbc R13: ffff8801d6f6fd38 R14: 00007ffffffff000 R15: 0000000020c8304c copy_to_user include/linux/uaccess.h:155 [inline] cp_new_stat+0x730/0xa40 fs/stat.c:330 SYSC_newfstat+0x99/0xe0 fs/stat.c:377 SyS_newfstat+0x1c/0x30 fs/stat.c:371 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x453299 RSP: 002b:00007f2fd3057c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000005 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000453299 RDX: 0000000000000000 RSI: 0000000020c82fbc RDI: 0000000000000013 RBP: 0000000000000631 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006f8538 R13: 00000000ffffffff R14: 00007f2fd30586d4 R15: 0000000000000000 binder_alloc: 15138: binder_alloc_buf, no vma binder: 15138:15148 transaction failed 29189/-3, size 40-0 line 2903 binder_alloc: binder_alloc_mmap_handler: 15138 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 15138:15161 ioctl 40046207 0 returned -16 binder_alloc: 15138: binder_alloc_buf, no vma binder: 15138:15168 transaction failed 29189/-3, size 40-8 line 2903 binder_alloc: 15138: binder_alloc_buf, no vma binder: 15138:15161 transaction failed 29189/-3, size 40-0 line 2903 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 15138:15148 transaction 80 out, still active binder: send failed reply for transaction 80, target dead sock: process `syz-executor7' is using obsolete getsockopt SO_BSDCOMPAT kauditd_printk_skb: 19 callbacks suppressed audit: type=1400 audit(1517485548.485:636): avc: denied { write } for pid=15306 comm="syz-executor7" name="net" dev="proc" ino=49897 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 sctp: [Deprecated]: syz-executor0 (pid 15314) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor0 (pid 15321) Use of int in maxseg socket option. Use struct sctp_assoc_value instead audit: type=1400 audit(1517485548.487:637): avc: denied { add_name } for pid=15306 comm="syz-executor7" 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(1517485548.488:638): avc: denied { create } for pid=15306 comm="syz-executor7" 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 audit: type=1400 audit(1517485549.034:639): avc: denied { fsetid } for pid=15478 comm="syz-executor2" capability=4 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 SELinux: failed to load policy SELinux: failed to load policy device lo entered promiscuous mode IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready binder: 15682:15684 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 15682:15694 BC_CLEAR_DEATH_NOTIFICATION death notification not active binder: 15694 RLIMIT_NICE not set binder: BINDER_SET_CONTEXT_MGR already set binder: 15682:15716 ioctl 40046207 0 returned -16 binder: 15682:15700 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 15682:15721 BC_CLEAR_DEATH_NOTIFICATION invalid ref 0 binder: 15721 RLIMIT_NICE not set dccp_v6_rcv: dropped packet with invalid checksum dccp_v6_rcv: dropped packet with invalid checksum TCP: request_sock_TCP: Possible SYN flooding on port 20030. Sending cookies. Check SNMP counters. audit: type=1326 audit(1517485550.292:640): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=15810 comm="syz-executor5" exe="/root/syz-executor5" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517485550.293:641): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=15820 comm="syz-executor0" exe="/root/syz-executor0" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517485550.293:642): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=15810 comm="syz-executor5" exe="/root/syz-executor5" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517485550.293:643): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=15820 comm="syz-executor0" exe="/root/syz-executor0" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517485550.295:644): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=15810 comm="syz-executor5" exe="/root/syz-executor5" sig=0 arch=c000003e syscall=332 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517485550.295:645): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=15810 comm="syz-executor5" exe="/root/syz-executor5" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 netlink: 'syz-executor2': attribute type 2 has an invalid length. netlink: 'syz-executor2': attribute type 2 has an invalid length. binder: 16493:16498 transaction failed 29189/-22, size 0-8 line 2788 binder: 16493:16510 transaction failed 29189/-22, size 0-8 line 2788