Commit ddfb9d8f authored by Al Viro's avatar Al Viro Committed by sanglipeng
Browse files

sh: sanitize the flags on sigreturn

stable inclusion
from stable-v5.10.177
commit 8beb18c25beff12f27ffeb78f4e1de31a0e7cad0
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I88YNP

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8beb18c25beff12f27ffeb78f4e1de31a0e7cad0



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

[ Upstream commit 573b22cc ]

We fetch %SR value from sigframe; it might have been modified by signal
handler, so we can't trust it with any bits that are not modifiable in
user mode.

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Cc: Rich Felker <dalias@libc.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 1000f744
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment