====================================================== WARNING: possible circular locking dependency detected 4.15.0+ #293 Not tainted ------------------------------------------------------ syz-executor3/6071 is trying to acquire lock: (sk_lock-AF_INET6){+.+.}, at: [<000000003957fd2e>] lock_sock include/net/sock.h:1461 [inline] (sk_lock-AF_INET6){+.+.}, at: [<000000003957fd2e>] do_ipv6_setsockopt.isra.8+0x3c5/0x39d0 net/ipv6/ipv6_sockglue.c:167 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<00000000543e0dfe>] 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/ipv6/netfilter/ip6_tables.c:533 [inline] find_check_entry.isra.7+0x935/0xcf0 net/ipv6/netfilter/ip6_tables.c:575 translate_table+0xf52/0x1690 net/ipv6/netfilter/ip6_tables.c:744 do_replace net/ipv6/netfilter/ip6_tables.c:1160 [inline] do_ip6t_set_ctl+0x370/0x5f0 net/ipv6/netfilter/ip6_tables.c:1686 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x67/0xc0 net/netfilter/nf_sockopt.c:115 ipv6_setsockopt+0x115/0x150 net/ipv6/ipv6_sockglue.c:928 rawv6_setsockopt+0x4a/0xf0 net/ipv6/raw.c:1060 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_INET6){+.+.}: 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_ipv6_setsockopt.isra.8+0x3c5/0x39d0 net/ipv6/ipv6_sockglue.c:167 ipv6_setsockopt+0xd7/0x150 net/ipv6/ipv6_sockglue.c:922 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 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(rtnl_mutex); lock(sk_lock-AF_INET6); lock(rtnl_mutex); lock(sk_lock-AF_INET6); *** DEADLOCK *** 1 lock held by syz-executor3/6071: #0: (rtnl_mutex){+.+.}, at: [<00000000543e0dfe>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 stack backtrace: CPU: 0 PID: 6071 Comm: syz-executor3 Not tainted 4.15.0+ #293 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_ipv6_setsockopt.isra.8+0x3c5/0x39d0 net/ipv6/ipv6_sockglue.c:167 ipv6_setsockopt+0xd7/0x150 net/ipv6/ipv6_sockglue.c:922 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 RIP: 0033:0x453299 RSP: 002b:00007fb36aa19c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000453299 RDX: 000000000000002a RSI: 0000000000000029 RDI: 0000000000000013 RBP: 00000000000005ce R08: 0000000000000088 R09: 0000000000000000 R10: 0000000020058000 R11: 0000000000000212 R12: 00000000006f7bf0 R13: 00000000ffffffff R14: 00007fb36aa1a6d4 R15: 0000000000000000 mmap: syz-executor3 (6086) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.txt. QAT: Invalid ioctl QAT: Invalid ioctl netlink: 8 bytes leftover after parsing attributes in process `syz-executor0'. netlink: 8 bytes leftover after parsing attributes in process `syz-executor0'. kauditd_printk_skb: 36 callbacks suppressed audit: type=1400 audit(1517619580.580:80): avc: denied { setgid } for pid=6282 comm="syz-executor5" capability=6 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: unrecognized netlink message: protocol=0 nlmsg_type=33685 sclass=netlink_route_socket pig=6289 comm=syz-executor2 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=33685 sclass=netlink_route_socket pig=6296 comm=syz-executor2 device syz7 entered promiscuous mode device syz7 left promiscuous mode netlink: 'syz-executor0': attribute type 2 has an invalid length. QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl netlink: 'syz-executor0': attribute type 2 has an invalid length. audit: type=1326 audit(1517619580.981:81): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6388 comm="syz-executor4" exe="/root/syz-executor4" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517619581.008:82): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6388 comm="syz-executor4" exe="/root/syz-executor4" sig=0 arch=c000003e syscall=288 compat=0 ip=0x453299 code=0x7ffc0000 binder: 6419:6421 ioctl 40045542 20019ffc returned -22 audit: type=1326 audit(1517619581.008:83): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6388 comm="syz-executor4" exe="/root/syz-executor4" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517619581.008:84): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6388 comm="syz-executor4" exe="/root/syz-executor4" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 binder: 6419:6421 BC_REQUEST_DEATH_NOTIFICATION death notification already set audit: type=1326 audit(1517619581.012:85): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6388 comm="syz-executor4" exe="/root/syz-executor4" sig=0 arch=c000003e syscall=284 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517619581.012:86): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6388 comm="syz-executor4" exe="/root/syz-executor4" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 binder: 6419:6421 ioctl 40045542 20019ffc returned -22 audit: type=1326 audit(1517619581.013:87): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6388 comm="syz-executor4" exe="/root/syz-executor4" sig=0 arch=c000003e syscall=54 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517619581.013:88): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6388 comm="syz-executor4" exe="/root/syz-executor4" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517619581.013:89): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6388 comm="syz-executor4" exe="/root/syz-executor4" sig=0 arch=c000003e syscall=277 compat=0 ip=0x453299 code=0x7ffc0000 binder: 6431:6438 ERROR: BC_REGISTER_LOOPER called without request binder: 6438 RLIMIT_NICE not set binder: 6431:6468 ERROR: BC_REGISTER_LOOPER called without request binder: 6468 RLIMIT_NICE not set ipt_CLUSTERIP: Please specify destination IP ipt_CLUSTERIP: Please specify destination IP binder: 6561:6568 Acquire 1 refcount change on invalid ref 0 ret -22 binder: 6561:6568 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 binder: 6561:6575 Acquire 1 refcount change on invalid ref 0 ret -22 binder: 6561:6568 BC_REQUEST_DEATH_NOTIFICATION invalid ref 0 do_dccp_getsockopt: sockopt(PACKET_SIZE) is deprecated: fix your app binder_alloc: binder_alloc_mmap_handler: 6664 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set binder: 6664:6693 ioctl 40046207 0 returned -16 binder_alloc: 6664: binder_alloc_buf, no vma binder: 6664:6687 transaction failed 29189/-3, size 40-8 line 2957 dccp_close: ABORT with 4294967275 bytes unread binder: release 6664:6670 transaction 8 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29189 binder: send failed reply for transaction 8, target dead netlink: 3 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor6'. FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 1 CPU: 0 PID: 6835 Comm: syz-executor3 Not tainted 4.15.0+ #293 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 getname_flags+0xcb/0x580 fs/namei.c:138 getname fs/namei.c:209 [inline] SYSC_unlink fs/namei.c:4087 [inline] SyS_unlink+0x19/0x30 fs/namei.c:4085 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x453299 RSP: 002b:00007fb36aa19c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000057 RAX: ffffffffffffffda RBX: 00007fb36aa19aa0 RCX: 0000000000453299 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020b38000 RBP: 00007fb36aa19a90 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000004b8096 R13: 00007fb36aa19bc8 R14: 00000000004b8096 R15: 0000000000000000 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 0 PID: 7005 Comm: syz-executor7 Not tainted 4.15.0+ #293 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_node mm/slab.c:3285 [inline] kmem_cache_alloc_node+0x56/0x760 mm/slab.c:3628 __alloc_skb+0xf1/0x780 net/core/skbuff.c:193 alloc_skb include/linux/skbuff.h:983 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1180 [inline] netlink_sendmsg+0xa86/0xe60 net/netlink/af_netlink.c:1872 sock_sendmsg_nosec net/socket.c:630 [inline] sock_sendmsg+0xca/0x110 net/socket.c:640 ___sys_sendmsg+0x767/0x8b0 net/socket.c:2046 __sys_sendmsg+0xe5/0x210 net/socket.c:2080 SYSC_sendmsg net/socket.c:2091 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2087 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x453299 RSP: 002b:00007f3ac3acfc58 EFLAGS: 00000212 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f3ac3acfaa0 RCX: 0000000000453299 RDX: 0000000000000000 RSI: 0000000020008000 RDI: 0000000000000013 RBP: 00007f3ac3acfa90 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000004b8096 R13: 00007f3ac3acfbc8 R14: 00000000004b8096 R15: 0000000000000000 openvswitch: netlink: Flow get message rejected, Key attribute missing. openvswitch: netlink: Flow get message rejected, Key attribute missing. netlink: 4656 bytes leftover after parsing attributes in process `syz-executor7'. netlink: 4656 bytes leftover after parsing attributes in process `syz-executor7'. netlink: 4656 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 4656 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 4656 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 4656 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 4656 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 4656 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 4656 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 4656 bytes leftover after parsing attributes in process `syz-executor5'. FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 0 PID: 7878 Comm: syz-executor5 Not tainted 4.15.0+ #293 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:__put_user_8+0x1c/0x25 arch/x86/lib/putuser.S:81 RSP: 0018:ffff8801ad487c68 EFLAGS: 00010293 RAX: 0000000000000001 RBX: 00007fffffffeff9 RCX: 00000000207d4000 RDX: 1ffff10038d33842 RSI: ffffc9000466b000 RDI: ffff8801c699c210 RBP: ffff8801ad487c90 R08: ffff8801db427fc0 R09: 1ffff10035a90f6a R10: ffff8801ad487810 R11: 1ffff1003b684ffc R12: 0000000000000224 R13: ffff8801c699c200 R14: 00000000207d4000 R15: 0000000000000001 do_msgrcv+0x6bd/0x14e0 ipc/msg.c:1124 SYSC_msgrcv ipc/msg.c:1133 [inline] SyS_msgrcv+0x3b/0x50 ipc/msg.c:1130 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x453299 RSP: 002b:00007fdbd1f02c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000046 RAX: ffffffffffffffda RBX: 00007fdbd1f02aa0 RCX: 0000000000453299 RDX: 0000000000000224 RSI: 00000000207d4000 RDI: 0000000000000000 RBP: 00007fdbd1f02a90 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000004b8096 R13: 00007fdbd1f02bc8 R14: 00000000004b8096 R15: 0000000000000000 capability: warning: `syz-executor1' uses deprecated v2 capabilities in a way that may be insecure kauditd_printk_skb: 79 callbacks suppressed audit: type=1400 audit(1517619587.922:169): avc: denied { read } for pid=8247 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_generic_socket permissive=1 irq bypass consumer (token 000000006f7aedac) registration fails: -16 irq bypass consumer (token 0000000088ae81b7) registration fails: -16 audit: type=1400 audit(1517619588.212:170): avc: denied { map } for pid=8335 comm="syz-executor3" path="/dev/input/mice" dev="devtmpfs" ino=9151 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:mouse_device_t:s0 tclass=chr_file permissive=1 audit: type=1400 audit(1517619588.347:171): avc: denied { write } for pid=8355 comm="syz-executor4" name="net" dev="proc" ino=23392 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(1517619588.347:172): avc: denied { add_name } for pid=8355 comm="syz-executor4" 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