====================================================== WARNING: possible circular locking dependency detected 4.17.0-rc2+ #25 Not tainted ------------------------------------------------------ syz-executor3/6684 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_getsockopt+0x537/0x7b4b net/sctp/socket.c:7205 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 bridge: RTM_NEWNEIGH with invalid state 0x0 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 bridge: RTM_NEWNEIGH with invalid state 0x0 -> #0 (&mm->mmap_sem){++++}: lock_acquire+0x1dc/0x520 kernel/locking/lockdep.c:3920 __might_fault+0x155/0x1e0 mm/memory.c:4555 _copy_from_user+0x30/0x150 lib/usercopy.c:10 copy_from_user include/linux/uaccess.h:147 [inline] sctp_getsockopt_rtoinfo net/sctp/socket.c:6024 [inline] sctp_getsockopt+0x1d30/0x7b4b net/sctp/socket.c:7264 sock_common_getsockopt+0x9a/0xe0 net/core/sock.c:3001 __sys_getsockopt+0x1a5/0x370 net/socket.c:1940 __do_sys_getsockopt net/socket.c:1951 [inline] __se_sys_getsockopt net/socket.c:1948 [inline] __x64_sys_getsockopt+0xbe/0x150 net/socket.c:1948 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe kernel msg: ebtables bug: please report to author: counter_offset != totalcnt other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sk_lock-AF_INET6); lock(&mm->mmap_sem); sctp: [Deprecated]: syz-executor4 (pid 6708) Use of int in maxseg socket option. Use struct sctp_assoc_value instead lock(sk_lock-AF_INET6); lock(&mm->mmap_sem); *** DEADLOCK *** 1 lock held by syz-executor3/6684: #0: (ptrval) (sk_lock-AF_INET6){+.+.}, at: lock_sock include/net/sock.h:1469 [inline] #0: (ptrval) (sk_lock-AF_INET6){+.+.}, at: sctp_getsockopt+0x537/0x7b4b net/sctp/socket.c:7205 kernel msg: ebtables bug: please report to author: counter_offset != totalcnt stack backtrace: CPU: 1 PID: 6684 Comm: syz-executor3 Not tainted 4.17.0-rc2+ #25 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 sctp: [Deprecated]: syz-executor4 (pid 6717) Use of int in maxseg socket option. Use struct sctp_assoc_value instead 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_user+0x30/0x150 lib/usercopy.c:10 copy_from_user include/linux/uaccess.h:147 [inline] sctp_getsockopt_rtoinfo net/sctp/socket.c:6024 [inline] sctp_getsockopt+0x1d30/0x7b4b net/sctp/socket.c:7264 sock_common_getsockopt+0x9a/0xe0 net/core/sock.c:3001 __sys_getsockopt+0x1a5/0x370 net/socket.c:1940 __do_sys_getsockopt net/socket.c:1951 [inline] __se_sys_getsockopt net/socket.c:1948 [inline] __x64_sys_getsockopt+0xbe/0x150 net/socket.c:1948 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x455979 RSP: 002b:00007f24c6932c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000037 RAX: ffffffffffffffda RBX: 00007f24c69336d4 RCX: 0000000000455979 RDX: 0000000000000000 RSI: 0000000000000084 RDI: 0000000000000013 RBP: 000000000072bea0 R08: 0000000020fecffc R09: 0000000000000000 R10: 0000000020000100 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000000cd R14: 00000000006f53d8 R15: 0000000000000000 kernel msg: ebtables bug: please report to author: Wrong len argument kernel msg: ebtables bug: please report to author: Wrong len argument TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. netlink: 'syz-executor3': attribute type 4 has an invalid length. netlink: 'syz-executor3': attribute type 4 has an invalid length. sctp: [Deprecated]: syz-executor0 (pid 6994) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead sctp: [Deprecated]: syz-executor0 (pid 7026) Use of struct sctp_assoc_value in delayed_ack socket option. Use struct sctp_sack_info instead syz-executor5 (7058) used greatest stack depth: 14552 bytes left kernel msg: ebtables bug: please report to author: Wrong len argument kernel msg: ebtables bug: please report to author: Entries_size never zero kernel msg: ebtables bug: please report to author: Entries_size never zero netlink: 3 bytes leftover after parsing attributes in process `syz-executor1'. device bridge0 entered promiscuous mode netlink: 3 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor1'. netlink: 3 bytes leftover after parsing attributes in process `syz-executor1'. device bridge0 left promiscuous mode IPVS: ftp: loaded support on port[0] = 21 netlink: 20 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 20 bytes leftover after parsing attributes in process `syz-executor3'. netlink: 'syz-executor3': attribute type 26 has an invalid length. netlink: 'syz-executor3': attribute type 26 has an invalid length. syz-executor4 uses obsolete (PF_INET,SOCK_PACKET) sctp: [Deprecated]: syz-executor1 (pid 7484) Use of int in maxseg socket option. Use struct sctp_assoc_value instead sctp: [Deprecated]: syz-executor1 (pid 7484) Use of int in maxseg socket option. Use struct sctp_assoc_value instead dccp_invalid_packet: invalid packet type dccp_invalid_packet: invalid packet type mip6: mip6_rthdr_init_state: spi is not 0: 15794175 mip6: mip6_rthdr_init_state: spi is not 0: 15794175