device team_slave_0 entered promiscuous mode ====================================================== WARNING: possible circular locking dependency detected 4.17.0-rc2+ #22 Not tainted ------------------------------------------------------ syz-executor6/8740 is trying to acquire lock: (ptrval) (sk_lock-AF_INET){+.+.}, at: lock_sock include/net/sock.h:1469 [inline] (ptrval) (sk_lock-AF_INET){+.+.}, at: tcp_mmap+0x1c7/0x14f0 net/ipv4/tcp.c:1759 but task is already holding lock: (ptrval) (&mm->mmap_sem){++++}, at: vm_mmap_pgoff+0x1a1/0x2a0 mm/util.c:355 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&mm->mmap_sem){++++}: __might_fault+0x155/0x1e0 mm/memory.c:4555 _copy_from_iter_full+0x2fd/0xd10 lib/iov_iter.c:607 copy_from_iter_full include/linux/uio.h:124 [inline] skb_do_copy_data_nocache include/net/sock.h:1883 [inline] skb_add_data_nocache include/net/sock.h:1894 [inline] tcp_sendmsg_locked+0x2f98/0x3e10 net/ipv4/tcp.c:1316 tcp_sendmsg+0x2f/0x50 net/ipv4/tcp.c:1446 inet_sendmsg+0x19f/0x690 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:629 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:639 sock_write_iter+0x35a/0x5a0 net/socket.c:908 call_write_iter include/linux/fs.h:1784 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x64d/0x960 fs/read_write.c:487 vfs_write+0x1f8/0x560 fs/read_write.c:549 ksys_write+0xf9/0x250 fs/read_write.c:598 __do_sys_write fs/read_write.c:610 [inline] __se_sys_write fs/read_write.c:607 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:607 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (sk_lock-AF_INET){+.+.}: lock_acquire+0x1dc/0x520 kernel/locking/lockdep.c:3920 lock_sock_nested+0xd0/0x120 net/core/sock.c:2844 lock_sock include/net/sock.h:1469 [inline] tcp_mmap+0x1c7/0x14f0 net/ipv4/tcp.c:1759 sock_mmap+0x8e/0xc0 net/socket.c:1144 call_mmap include/linux/fs.h:1789 [inline] mmap_region+0xd13/0x1820 mm/mmap.c:1723 do_mmap+0xc79/0x11d0 mm/mmap.c:1494 do_mmap_pgoff include/linux/mm.h:2237 [inline] vm_mmap_pgoff+0x1fb/0x2a0 mm/util.c:357 ksys_mmap_pgoff+0x4c9/0x640 mm/mmap.c:1544 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:100 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:91 [inline] __x64_sys_mmap+0xe9/0x1b0 arch/x86/kernel/sys_x86_64.c:91 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&mm->mmap_sem); lock(sk_lock-AF_INET); lock(&mm->mmap_sem); lock(sk_lock-AF_INET); *** DEADLOCK *** 1 lock held by syz-executor6/8740: #0: (ptrval) (&mm->mmap_sem){++++}, at: vm_mmap_pgoff+0x1a1/0x2a0 mm/util.c:355 stack backtrace: CPU: 0 PID: 8740 Comm: syz-executor6 Not tainted 4.17.0-rc2+ #22 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1b9/0x294 lib/dump_stack.c:113 print_circular_bug.isra.36.cold.54+0x1bd/0x27d 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+0x343e/0x5140 kernel/locking/lockdep.c:3431 lock_acquire+0x1dc/0x520 kernel/locking/lockdep.c:3920 lock_sock_nested+0xd0/0x120 net/core/sock.c:2844 lock_sock include/net/sock.h:1469 [inline] tcp_mmap+0x1c7/0x14f0 net/ipv4/tcp.c:1759 sock_mmap+0x8e/0xc0 net/socket.c:1144 call_mmap include/linux/fs.h:1789 [inline] mmap_region+0xd13/0x1820 mm/mmap.c:1723 do_mmap+0xc79/0x11d0 mm/mmap.c:1494 do_mmap_pgoff include/linux/mm.h:2237 [inline] vm_mmap_pgoff+0x1fb/0x2a0 mm/util.c:357 ksys_mmap_pgoff+0x4c9/0x640 mm/mmap.c:1544 __do_sys_mmap arch/x86/kernel/sys_x86_64.c:100 [inline] __se_sys_mmap arch/x86/kernel/sys_x86_64.c:91 [inline] __x64_sys_mmap+0xe9/0x1b0 arch/x86/kernel/sys_x86_64.c:91 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x455979 RSP: 002b:00007fd8b1485c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 00007fd8b14866d4 RCX: 0000000000455979 RDX: 0000000000000010 RSI: 0000000000004000 RDI: 0000000020ff9000 RBP: 000000000072bea0 R08: 0000000000000013 R09: 0000000000000000 R10: 0000000000000013 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000003fe R14: 00000000006f9070 R15: 0000000000000000 BUG: sleeping function called from invalid context at mm/slab.h:421 in_atomic(): 1, irqs_disabled(): 1, pid: 4482, name: sshd INFO: lockdep is turned off. irq event stamp: 84312 hardirqs last enabled at (84311): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] hardirqs last enabled at (84311): [] _raw_spin_unlock_irqrestore+0x74/0xc0 kernel/locking/spinlock.c:184 hardirqs last disabled at (84312): [] __schedule+0x22d/0x1e30 kernel/sched/core.c:3417 softirqs last enabled at (84288): [] spin_unlock_bh include/linux/spinlock.h:355 [inline] softirqs last enabled at (84288): [] release_sock+0x1e2/0x2b0 net/core/sock.c:2864 softirqs last disabled at (84286): [] spin_lock_bh include/linux/spinlock.h:315 [inline] softirqs last disabled at (84286): [] release_sock+0x74/0x2b0 net/core/sock.c:2851 CPU: 1 PID: 4482 Comm: sshd Not tainted 4.17.0-rc2+ #22 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1b9/0x294 lib/dump_stack.c:113 ___might_sleep.cold.87+0x11f/0x13a kernel/sched/core.c:6188 __might_sleep+0x95/0x190 kernel/sched/core.c:6141 slab_pre_alloc_hook mm/slab.h:421 [inline] slab_alloc mm/slab.c:3378 [inline] __do_kmalloc mm/slab.c:3716 [inline] __kmalloc+0x2b9/0x760 mm/slab.c:3727 kmalloc_array include/linux/slab.h:631 [inline] kcalloc include/linux/slab.h:642 [inline] numa_crng_init drivers/char/random.c:798 [inline] crng_reseed+0x427/0x920 drivers/char/random.c:923 credit_entropy_bits+0x98d/0xa30 drivers/char/random.c:708 add_interrupt_randomness+0x494/0x860 drivers/char/random.c:1254 handle_irq_event_percpu+0xf9/0x1c0 kernel/irq/handle.c:191 handle_irq_event+0xa7/0x135 kernel/irq/handle.c:206 handle_edge_irq+0x20f/0x870 kernel/irq/chip.c:791 generic_handle_irq_desc include/linux/irqdesc.h:159 [inline] handle_irq+0x18c/0x2e7 arch/x86/kernel/irq_64.c:77 do_IRQ+0x78/0x190 arch/x86/kernel/irq.c:245 common_interrupt+0xf/0xf arch/x86/entry/entry_64.S:642 RIP: 0010:debug_lockdep_rcu_enabled+0x57/0x90 kernel/rcu/update.c:300 RSP: 0018:ffff8801cee8eac8 EFLAGS: 00000a02 ORIG_RAX: ffffffffffffffd8 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff8184c089 RDX: 0000000000000004 RSI: ffffffff8184c096 RDI: ffffffff8909eee0 RBP: ffff8801cee8eac8 R08: ffff8801ad730500 R09: 0000000000000000 R10: ffffed003b5e46c2 R11: ffff8801ad730500 R12: 0000000000000000 R13: 0000000000000000 R14: ffff8801ad730500 R15: ffff8801af30347f rcu_read_unlock include/linux/rcupdate.h:684 [inline] is_bpf_text_address+0x86/0x170 kernel/bpf/core.c:480 kernel_text_address+0x79/0xf0 kernel/extable.c:152 __kernel_text_address+0xd/0x40 kernel/extable.c:107 unwind_get_return_address+0x61/0xa0 arch/x86/kernel/unwind_frame.c:18 __save_stack_trace+0x7e/0xd0 arch/x86/kernel/stacktrace.c:45 save_stack_trace+0x1a/0x20 arch/x86/kernel/stacktrace.c:60 save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc4/0xe0 mm/kasan/kasan.c:553 kmem_cache_alloc_node_trace+0x150/0x770 mm/slab.c:3663 __do_kmalloc_node mm/slab.c:3681 [inline] __kmalloc_node_track_caller+0x33/0x70 mm/slab.c:3696 __kmalloc_reserve.isra.38+0x3a/0xe0 net/core/skbuff.c:137 __alloc_skb+0x14d/0x780 net/core/skbuff.c:205 alloc_skb_fclone include/linux/skbuff.h:1031 [inline] sk_stream_alloc_skb+0x139/0x960 net/ipv4/tcp.c:875 tso_fragment net/ipv4/tcp_output.c:1872 [inline] tcp_write_xmit+0x1808/0x5bf0 net/ipv4/tcp_output.c:2366 __tcp_push_pending_frames+0xb2/0x290 net/ipv4/tcp_output.c:2548 tcp_push+0x5f1/0x860 net/ipv4/tcp.c:735 tcp_sendmsg_locked+0x318b/0x3e10 net/ipv4/tcp.c:1409 tcp_sendmsg+0x2f/0x50 net/ipv4/tcp.c:1446 inet_sendmsg+0x19f/0x690 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:629 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:639 sock_write_iter+0x35a/0x5a0 net/socket.c:908 call_write_iter include/linux/fs.h:1784 [inline] new_sync_write fs/read_write.c:474 [inline] __vfs_write+0x64d/0x960 fs/read_write.c:487 vfs_write+0x1f8/0x560 fs/read_write.c:549 ksys_write+0xf9/0x250 fs/read_write.c:598 __do_sys_write fs/read_write.c:610 [inline] __se_sys_write fs/read_write.c:607 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:607 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f4ec97aa370 RSP: 002b:00007ffdcb5bdac8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000004028 RCX: 00007f4ec97aa370 RDX: 0000000000004028 RSI: 00005566a58a51f0 RDI: 0000000000000003 RBP: 00005566a58a51f0 R08: 0000000000000001 R09: 3835383032373065 R10: 3665633266363266 R11: 0000000000000246 R12: 00007ffdcb5bdb2c R13: 00005566a4916fb4 R14: 0000000000000028 R15: 00005566a4918ca0 random: crng init done netlink: 8 bytes leftover after parsing attributes in process `syz-executor4'. atomic_op 000000004dcb1794 conn xmit_atomic (null) netlink: 8 bytes leftover after parsing attributes in process `syz-executor4'. atomic_op 00000000cba18121 conn xmit_atomic (null) netlink: 25 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 25 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 'syz-executor4': attribute type 21 has an invalid length. IPVS: set_ctl: invalid protocol: 47 172.20.20.23:20003 fo netlink: 'syz-executor4': attribute type 21 has an invalid length. IPVS: set_ctl: invalid protocol: 47 172.20.20.23:20003 fo netlink: 24 bytes leftover after parsing attributes in process `syz-executor5'. dccp_close: ABORT with 40 bytes unread