Commit e5ce09f2 authored by Jann Horn's avatar Jann Horn Committed by Zheng Zengkai
Browse files

Take mmap lock in cacheflush syscall



stable inclusion
from stable-5.10.20
commit 9dfb367a23827e4b85872d09f6c57e79b33fa2fd
bugzilla: 50608

--------------------------------

[ Upstream commit c26958cb ]

We need to take the mmap lock around find_vma() and subsequent use of the
VMA. Otherwise, we can race with concurrent operations like munmap(), which
can lead to use-after-free accesses to freed VMAs.

Fixes: 1000197d ("nios2: System calls handling")
Signed-off-by: default avatarJann Horn <jannh@google.com>
Signed-off-by: default avatarLey Foon Tan <ley.foon.tan@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent f85969a6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment