====================================================== WARNING: possible circular locking dependency detected 4.17.0-rc2+ #23 Not tainted ------------------------------------------------------ syz-executor6/6589 is trying to acquire lock: (ptrval) (&mm->mmap_sem){++++}, at: __might_fault+0xfb/0x1e0 mm/memory.c:4554 but task is already holding lock: (ptrval) (sk_lock-AF_INET6){+.+.}, at: lock_sock include/net/sock.h:1469 [inline] (ptrval) (sk_lock-AF_INET6){+.+.}, at: sctp_sendmsg+0x125e/0x1d70 net/sctp/socket.c:2064 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (sk_lock-AF_INET6){+.+.}: 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 -> #0 (&mm->mmap_sem){++++}: lock_acquire+0x1dc/0x520 kernel/locking/lockdep.c:3920 __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] sctp_user_addto_chunk+0x70/0x1f0 net/sctp/sm_make_chunk.c:1550 sctp_datamsg_from_user+0x7e2/0x12d0 net/sctp/chunk.c:280 sctp_sendmsg_to_asoc+0xd9d/0x2170 net/sctp/socket.c:1953 sctp_sendmsg+0x13a8/0x1d70 net/sctp/socket.c:2125 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 __sys_sendto+0x3d7/0x670 net/socket.c:1789 __do_sys_sendto net/socket.c:1801 [inline] __se_sys_sendto net/socket.c:1797 [inline] __x64_sys_sendto+0xe1/0x1a0 net/socket.c:1797 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(sk_lock-AF_INET6); lock(&mm->mmap_sem); lock(sk_lock-AF_INET6); lock(&mm->mmap_sem); *** DEADLOCK *** 1 lock held by syz-executor6/6589: #0: (ptrval) (sk_lock-AF_INET6){+.+.}, at: lock_sock include/net/sock.h:1469 [inline] #0: (ptrval) (sk_lock-AF_INET6){+.+.}, at: sctp_sendmsg+0x125e/0x1d70 net/sctp/socket.c:2064 stack backtrace: CPU: 1 PID: 6589 Comm: syz-executor6 Not tainted 4.17.0-rc2+ #23 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 __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] sctp_user_addto_chunk+0x70/0x1f0 net/sctp/sm_make_chunk.c:1550 sctp_datamsg_from_user+0x7e2/0x12d0 net/sctp/chunk.c:280 sctp_sendmsg_to_asoc+0xd9d/0x2170 net/sctp/socket.c:1953 sctp_sendmsg+0x13a8/0x1d70 net/sctp/socket.c:2125 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 __sys_sendto+0x3d7/0x670 net/socket.c:1789 __do_sys_sendto net/socket.c:1801 [inline] __se_sys_sendto net/socket.c:1797 [inline] __x64_sys_sendto+0xe1/0x1a0 net/socket.c:1797 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x455979 RSP: 002b:00007f455ee10c68 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007f455ee116d4 RCX: 0000000000455979 RDX: 0000000000000001 RSI: 0000000020bc2000 RDI: 0000000000000013 RBP: 000000000072bea0 R08: 0000000020606fe4 R09: 000000000000001c R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000505 R14: 00000000006fa918 R15: 0000000000000000 netlink: 5 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 5 bytes leftover after parsing attributes in process `syz-executor2'. netlink: 'syz-executor5': attribute type 29 has an invalid length. netlink: 8 bytes leftover after parsing attributes in process `syz-executor5'. IPVS: set_ctl: invalid protocol: 159 127.0.0.1:20000 fo netlink: 'syz-executor5': attribute type 29 has an invalid length. netlink: 8 bytes leftover after parsing attributes in process `syz-executor5'. sctp: [Deprecated]: syz-executor7 (pid 6855) Use of int in max_burst socket option. Use struct sctp_assoc_value instead kernel msg: ebtables bug: please report to author: Chains don't start at beginning netlink: 'syz-executor5': attribute type 29 has an invalid length. netlink: 8 bytes leftover after parsing attributes in process `syz-executor5'. IPVS: set_ctl: invalid protocol: 159 127.0.0.1:20000 fo netlink: 'syz-executor5': attribute type 29 has an invalid length. netlink: 8 bytes leftover after parsing attributes in process `syz-executor5'. sctp: [Deprecated]: syz-executor7 (pid 6866) Use of int in max_burst socket option. Use struct sctp_assoc_value instead netlink: 'syz-executor5': attribute type 29 has an invalid length. netlink: 8 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 'syz-executor5': attribute type 29 has an invalid length. netlink: 8 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 'syz-executor5': attribute type 29 has an invalid length. netlink: 8 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 'syz-executor5': attribute type 29 has an invalid length. netlink: 8 bytes leftover after parsing attributes in process `syz-executor5'. syz-executor5 uses obsolete (PF_INET,SOCK_PACKET) IPVS: ftp: loaded support on port[0] = 21 TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. IPVS: ftp: loaded support on port[0] = 21 netlink: 'syz-executor2': attribute type 1 has an invalid length. netlink: 'syz-executor2': attribute type 1 has an invalid length. TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. netlink: 'syz-executor2': attribute type 21 has an invalid length. netlink: 'syz-executor1': attribute type 18 has an invalid length. netlink: 'syz-executor2': attribute type 21 has an invalid length. ip6_tunnel: non-ECT from fe80:0000:0000:0000:0000:0000:0000:00bb with DS=0x5 ip6_tunnel: non-ECT from fe80:0000:0000:0000:0000:0000:0000:00bb with DS=0x5 IPVS: set_ctl: invalid protocol: 255 172.20.20.170:20001 lblcr IPVS: set_ctl: invalid protocol: 255 172.20.20.170:20001 lblcr netlink: 'syz-executor7': attribute type 2 has an invalid length. netlink: 'syz-executor7': attribute type 2 has an invalid length. kernel msg: ebtables bug: please report to author: EBT_ENTRY_OR_ENTRIES shouldn't be set in distinguisher kernel msg: ebtables bug: please report to author: EBT_ENTRY_OR_ENTRIES shouldn't be set in distinguisher sctp: [Deprecated]: syz-executor1 (pid 7669) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead sctp: [Deprecated]: syz-executor1 (pid 7704) 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-executor6'. netlink: 20 bytes leftover after parsing attributes in process `syz-executor6'. netlink: 40 bytes leftover after parsing attributes in process `syz-executor5'. netlink: 'syz-executor2': attribute type 10 has an invalid length. netlink: 40 bytes leftover after parsing attributes in process `syz-executor5'.