====================================================== WARNING: possible circular locking dependency detected 4.15.0+ #290 Not tainted ------------------------------------------------------ syz-executor7/18167 is trying to acquire lock: (rtnl_mutex){+.+.}, at: [<00000000718245b9>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 but task is already holding lock: (sk_lock-AF_INET){+.+.}, at: [<00000000bef7c957>] lock_sock include/net/sock.h:1461 [inline] (sk_lock-AF_INET){+.+.}, at: [<00000000bef7c957>] 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 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 (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/18167: #0: (sk_lock-AF_INET){+.+.}, at: [<00000000bef7c957>] lock_sock include/net/sock.h:1461 [inline] #0: (sk_lock-AF_INET){+.+.}, at: [<00000000bef7c957>] ip_setsockopt+0x8c/0xb0 net/ipv4/ip_sockglue.c:1259 stack backtrace: CPU: 1 PID: 18167 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:00007ff354a22c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000453299 RDX: 0000000000000040 RSI: 0000000000000000 RDI: 0000000000000013 RBP: 00000000000005c4 R08: 00000000000002e0 R09: 0000000000000000 R10: 000000002002ccf8 R11: 0000000000000212 R12: 00000000006f7b00 R13: 00000000ffffffff R14: 00007ff354a236d4 R15: 0000000000000000 sctp: [Deprecated]: syz-executor7 (pid 18579) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead sctp: [Deprecated]: syz-executor7 (pid 18587) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead netlink: 16 bytes leftover after parsing attributes in process `syz-executor3'. can: request_module (can-proto-4) failed. netlink: 16 bytes leftover after parsing attributes in process `syz-executor3'. can: request_module (can-proto-4) failed. device eql entered promiscuous mode QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl l2tp_ppp: tunl 59: set debug=f55d40e binder: 19022:19028 BC_FREE_BUFFER u0000000020007f72 no match binder_alloc: binder_alloc_mmap_handler: 19022 20000000-20002000 already mapped failed -16 binder: BINDER_SET_CONTEXT_MGR already set kauditd_printk_skb: 84 callbacks suppressed audit: type=1400 audit(1517489916.163:1234): avc: denied { setfcap } for pid=19037 comm="syz-executor2" capability=31 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 binder_alloc: 19022: binder_alloc_buf, no vma binder: 19022:19038 transaction failed 29189/-3, size 40-8 line 2903 binder: 19022:19060 BC_FREE_BUFFER u0000000020007f72 no match binder: 19022:19028 ioctl 40046207 0 returned -16 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 19022:19028 transaction 65 out, still active binder: unexpected work type, 4, not freed binder: undelivered TRANSACTION_COMPLETE binder: send failed reply for transaction 65, target dead FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 1 CPU: 0 PID: 19108 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] nlmsg_new include/net/netlink.h:511 [inline] rtmsg_ifinfo_build_skb+0x73/0x1a0 net/core/rtnetlink.c:3189 rtmsg_ifinfo_event.part.26+0x45/0xe0 net/core/rtnetlink.c:3225 rtmsg_ifinfo_event net/core/rtnetlink.c:3222 [inline] rtnetlink_event+0x106/0x130 net/core/rtnetlink.c:4641 notifier_call_chain+0x136/0x2c0 kernel/notifier.c:93 __raw_notifier_call_chain kernel/notifier.c:394 [inline] raw_notifier_call_chain+0x2d/0x40 kernel/notifier.c:401 call_netdevice_notifiers_info+0x32/0x70 net/core/dev.c:1707 call_netdevice_notifiers net/core/dev.c:1725 [inline] dev_set_mac_address+0x22e/0x340 net/core/dev.c:7112 __tun_chr_ioctl+0x232e/0x40d0 drivers/net/tun.c:2953 tun_chr_ioctl+0x2a/0x40 drivers/net/tun.c:3074 vfs_ioctl fs/ioctl.c:46 [inline] do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x453299 RSP: 002b:00007f5181d43c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f5181d43aa0 RCX: 0000000000453299 RDX: 0000000020000ffc RSI: 0000000000008924 RDI: 0000000000000012 RBP: 00007f5181d43a90 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000004b8096 R13: 00007f5181d43bc8 R14: 00000000004b8096 R15: 0000000000000000 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 0 PID: 19142 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_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] nlmsg_new include/net/netlink.h:511 [inline] rtmsg_ifinfo_build_skb+0x73/0x1a0 net/core/rtnetlink.c:3189 rtmsg_ifinfo_event.part.26+0x45/0xe0 net/core/rtnetlink.c:3225 rtmsg_ifinfo_event net/core/rtnetlink.c:3222 [inline] rtnetlink_event+0x106/0x130 net/core/rtnetlink.c:4641 notifier_call_chain+0x136/0x2c0 kernel/notifier.c:93 __raw_notifier_call_chain kernel/notifier.c:394 [inline] raw_notifier_call_chain+0x2d/0x40 kernel/notifier.c:401 call_netdevice_notifiers_info+0x32/0x70 net/core/dev.c:1707 call_netdevice_notifiers net/core/dev.c:1725 [inline] dev_set_mac_address+0x22e/0x340 net/core/dev.c:7112 __tun_chr_ioctl+0x232e/0x40d0 drivers/net/tun.c:2953 tun_chr_ioctl+0x2a/0x40 drivers/net/tun.c:3074 vfs_ioctl fs/ioctl.c:46 [inline] do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x453299 RSP: 002b:00007f5181d43c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f5181d43aa0 RCX: 0000000000453299 RDX: 0000000020000ffc RSI: 0000000000008924 RDI: 0000000000000012 RBP: 00007f5181d43a90 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000004b8096 R13: 00007f5181d43bc8 R14: 00000000004b8096 R15: 0000000000000000 kvm: apic: phys broadcast and lowest prio QAT: Invalid ioctl QAT: Invalid ioctl IPv6: ADDRCONF(NETDEV_CHANGE): vcan0: link becomes ready device eql entered promiscuous mode audit: type=1326 audit(1517489919.617:1235): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=19736 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517489919.643:1236): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=19736 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=53 compat=0 ip=0x453299 code=0x7ffc0000 Cannot find add_set index 0 as target Cannot find add_set index 0 as target audit: type=1326 audit(1517489919.646:1237): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=19736 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517489919.648:1238): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=19736 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517489919.667:1239): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=19736 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=53 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517489919.708:1240): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=19736 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517489919.709:1242): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=19736 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517489919.709:1241): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=19736 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517489919.709:1243): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=19736 comm="syz-executor3" exe="/root/syz-executor3" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 1 PID: 19899 Comm: syz-executor2 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 SYSC_getcwd fs/dcache.c:3450 [inline] SyS_getcwd+0xc9/0xa40 fs/dcache.c:3446 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x453299 RSP: 002b:00007f6c64b5cc58 EFLAGS: 00000212 ORIG_RAX: 000000000000004f RAX: ffffffffffffffda RBX: 00007f6c64b5caa0 RCX: 0000000000453299 RDX: 0000000000000000 RSI: ffffffffffffff85 RDI: 0000000020a35000 RBP: 00007f6c64b5ca90 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000212 R12: 00000000004b8096 R13: 00007f6c64b5cbc8 R14: 00000000004b8096 R15: 0000000000000000 FAULT_INJECTION: forcing a failure. name fail_page_alloc, interval 1, probability 0, space 0, times 1 CPU: 0 PID: 19940 Comm: syz-executor2 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_fail_alloc_page mm/page_alloc.c:2955 [inline] prepare_alloc_pages mm/page_alloc.c:4194 [inline] __alloc_pages_nodemask+0x338/0xd80 mm/page_alloc.c:4233 __alloc_pages include/linux/gfp.h:456 [inline] __alloc_pages_node include/linux/gfp.h:469 [inline] kmem_getpages mm/slab.c:1409 [inline] cache_grow_begin+0x72/0x570 mm/slab.c:2664 cache_alloc_refill mm/slab.c:3031 [inline] ____cache_alloc mm/slab.c:3113 [inline] __do_cache_alloc mm/slab.c:3335 [inline] slab_alloc mm/slab.c:3370 [inline] kmem_cache_alloc+0x400/0x760 mm/slab.c:3538 SYSC_getcwd fs/dcache.c:3450 [inline] SyS_getcwd+0xc9/0xa40 fs/dcache.c:3446