WARNING: possible circular locking dependency detected 4.15.0+ #290 Not tainted ------------------------------------------------------ syz-executor7/20191 is trying to acquire lock: (rtnl_mutex){+.+.}, at: [<000000002ae2c745>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 but task is already holding lock: (sk_lock-AF_INET){+.+.}, at: [<0000000041b6c3d7>] lock_sock include/net/sock.h:1461 [inline] (sk_lock-AF_INET){+.+.}, at: [<0000000041b6c3d7>] 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 tcp_setsockopt+0x82/0xd0 net/ipv4/tcp.c:2905 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 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 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-executor7/20191: #0: (sk_lock-AF_INET){+.+.}, at: [<0000000041b6c3d7>] lock_sock include/net/sock.h:1461 [inline] #0: (sk_lock-AF_INET){+.+.}, at: [<0000000041b6c3d7>] ip_setsockopt+0x8c/0xb0 net/ipv4/ip_sockglue.c:1259 stack backtrace: CPU: 1 PID: 20191 Comm: syz-executor7 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 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 RIP: 0033:0x453299 RSP: 002b:00007f89b7669c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000453299 RDX: 0000000000000040 RSI: 0000000000000000 RDI: 0000000000000014 RBP: 00000000000001ad R08: 00000000000002e0 R09: 0000000000000000 R10: 000000002002ccf8 R11: 0000000000000212 R12: 00000000006f18d8 R13: 00000000ffffffff R14: 00007f89b766a6d4 R15: 0000000000000000 Empty option to dns_resolver key xt_CT: You must specify a L4 protocol, and not use inversions on it. xt_CT: You must specify a L4 protocol, and not use inversions on it. IPv6: ADDRCONF(NETDEV_CHANGE): vcan0: link becomes ready QAT: Invalid ioctl QAT: Invalid ioctl IPv6: ADDRCONF(NETDEV_CHANGE): vcan0: link becomes ready netlink: 'syz-executor7': attribute type 8 has an invalid length. netlink: 2 bytes leftover after parsing attributes in process `syz-executor0'. netlink: 2 bytes leftover after parsing attributes in process `syz-executor0'. netlink: 2 bytes leftover after parsing attributes in process `syz-executor0'. netlink: 2 bytes leftover after parsing attributes in process `syz-executor0'. tc_ctl_action: received NO action attribs tc_ctl_action: received NO action attribs binder: 20642:20646 transaction failed 29189/-22, size 0-0 line 2788 binder: 20642:20646 ioctl c0306201 204ecfd0 returned -14 binder: undelivered TRANSACTION_ERROR: 29189 kauditd_printk_skb: 27 callbacks suppressed audit: type=1400 audit(1517489502.057:1517): avc: denied { node_bind } for pid=20681 comm="syz-executor6" saddr=ff01::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(1517489502.191:1518): avc: denied { name_bind } for pid=20722 comm="syz-executor0" src=20003 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:port_t:s0 tclass=dccp_socket permissive=1 netlink: 84 bytes leftover after parsing attributes in process `syz-executor5'. audit: type=1326 audit(1517489502.232:1519): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=20722 comm="syz-executor0" exe="/root/syz-executor0" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 irq bypass consumer (token 00000000f4ed221e) registration fails: -16 audit: type=1326 audit(1517489502.233:1520): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=20722 comm="syz-executor0" exe="/root/syz-executor0" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517489502.234:1521): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=20722 comm="syz-executor0" exe="/root/syz-executor0" sig=0 arch=c000003e syscall=2 compat=0 ip=0x40d591 code=0x7ffc0000 audit: type=1326 audit(1517489502.235:1522): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=20722 comm="syz-executor0" exe="/root/syz-executor0" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517489502.235:1523): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=20722 comm="syz-executor0" exe="/root/syz-executor0" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517489502.237:1524): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=20722 comm="syz-executor0" exe="/root/syz-executor0" sig=0 arch=c000003e syscall=54 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517489502.237:1525): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=20722 comm="syz-executor0" exe="/root/syz-executor0" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517489502.238:1526): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=20722 comm="syz-executor0" exe="/root/syz-executor0" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 xt_CT: You must specify a L4 protocol, and not use inversions on it. xt_CT: You must specify a L4 protocol, and not use inversions on it. irq bypass consumer (token 000000005eab13b4) registration fails: -16 xt_l2tp: wrong L2TP version: 0 xt_l2tp: wrong L2TP version: 0 netlink: 180 bytes leftover after parsing attributes in process `syz-executor2'. FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 1 CPU: 0 PID: 21486 Comm: syz-executor0 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_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:00007fee2ab80c58 EFLAGS: 00000212 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fee2ab80aa0 RCX: 0000000000453299 RDX: 0000000000000000 RSI: 000000002000a000 RDI: 0000000000000013 RBP: 00007fee2ab80a90 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000004b8096 R13: 00007fee2ab80bc8 R14: 00000000004b8096 R15: 0000000000000000 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 netlink: 180 bytes leftover after parsing attributes in process `syz-executor2'. CPU: 0 PID: 21511 Comm: syz-executor0 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 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 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_trace+0x5a/0x750 mm/slab.c:3647 __do_kmalloc_node mm/slab.c:3667 [inline] __kmalloc_node_track_caller+0x33/0x70 mm/slab.c:3682 __kmalloc_reserve.isra.39+0x41/0xd0 net/core/skbuff.c:137 __alloc_skb+0x13b/0x780 net/core/skbuff.c:205 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:00007fee2ab80c58 EFLAGS: 00000212 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fee2ab80aa0 RCX: 0000000000453299 RDX: 0000000000000000 RSI: 000000002000a000 RDI: 0000000000000013 RBP: 00007fee2ab80a90 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000004b8096 R13: 00007fee2ab80bc8 R14: 00000000004b8096 R15: 0000000000000000 CPU: 1 PID: 21532 Comm: syz-executor1 Not tainted 4.15.0+ #290 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 kauditd_printk_skb: 80 callbacks suppressed audit: type=1400 audit(1517489507.992:1607): avc: denied { map } for pid=21523 comm="syz-executor2" path="/dev/usbmon0" dev="devtmpfs" ino=9130 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:usbmon_device_t:s0 tclass=chr_file permissive=1 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 sctp_bucket_create net/sctp/socket.c:7654 [inline] sctp_get_port_local+0x9cd/0x13b0 net/sctp/socket.c:7413 sctp_get_port+0x13f/0x1b0 net/sctp/socket.c:7462 inet_autobind+0xaa/0x180 net/ipv4/af_inet.c:182 inet_sendmsg+0x4de/0x5e0 net/ipv4/af_inet.c:761 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 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x453299 RSP: 002b:00007fcd75767c58 EFLAGS: 00000212 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007fcd75767aa0 RCX: 0000000000453299 RDX: 0000000000000001 RSI: 0000000020ab7000 RDI: 0000000000000013 RBP: 00007fcd75767a90 R08: 0000000020ab8000 R09: 000000000000001c R10: 0000000000000000 R11: 0000000000000212 R12: 00000000004b8096 R13: 00007fcd75767bc8 R14: 00000000004b8096 R15: 0000000000000000 audit: type=1400 audit(1517489508.572:1608): avc: denied { map } for pid=21604 comm="syz-executor2" path="/dev/binder0" dev="devtmpfs" ino=118 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:device_t:s0 tclass=chr_file permissive=1 binder: send failed reply for transaction 89 to 21604:21610 binder: 21604:21610 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 21604:21610 BC_INCREFS_DONE u00000000204edf8a node 90 cookie mismatch 0000000000000000 != 0000000000000001 audit: type=1400 audit(1517489508.600:1609): avc: denied { set_context_mgr } for pid=21604 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=binder permissive=1 binder: 21604:21621 transaction failed 29189/-22, size 40-8 line 2788 binder: 21604:21610 BC_INCREFS_DONE u0000000000000000 no match binder: 21604:21610 BC_DEAD_BINDER_DONE 0000000000000003 not found binder: 21604:21610 BC_INCREFS_DONE u0000000000000000 no match binder: undelivered TRANSACTION_ERROR: 29189 binder: undelivered TRANSACTION_COMPLETE binder: undelivered TRANSACTION_ERROR: 29189 audit: type=1400 audit(1517489508.604:1610): avc: denied { call } for pid=21604 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=binder permissive=1 audit: type=1400 audit(1517489508.604:1611): avc: denied { transfer } for pid=21604 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=binder permissive=1 audit: type=1400 audit(1517489508.812:1612): avc: denied { getopt } for pid=21664 comm="syz-executor6" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:unlabeled_t:s0 tclass=socket permissive=1 QAT: Invalid ioctl QAT: Invalid ioctl Cannot find del_set index 0 as target audit: type=1400 audit(1517489509.271:1613): avc: denied { setpcap } for pid=21769 comm="syz-executor3" capability=8 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 audit: type=1400 audit(1517489509.369:1614): avc: denied { create } for pid=21801 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_crypto_socket permissive=1 QAT: Invalid ioctl QAT: Invalid ioctl