diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2024-03-08 06:38:07 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-07-05 09:37:56 +0200 |
commit | 05412471beba313ecded95aa17b25fe84bb2551a (patch) | |
tree | 4e46243fe7b26a2edb0080732ce492afd02b346a /arch/mips/net/bpf_jit_comp.c | |
parent | ed45c0a0b662079d4c0e518014cc148c753979b4 (diff) |
bpf: Take return from set_memory_ro() into account with bpf_prog_lock_ro()
[ Upstream commit 7d2cc63eca0c993c99d18893214abf8f85d566d8 ]
set_memory_ro() can fail, leaving memory unprotected.
Check its return and take it into account as an error.
Link: https://github.com/KSPP/linux/issues/7
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: linux-hardening@vger.kernel.org <linux-hardening@vger.kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Message-ID: <286def78955e04382b227cb3e4b6ba272a7442e3.1709850515.git.christophe.leroy@csgroup.eu>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/mips/net/bpf_jit_comp.c')
0 files changed, 0 insertions, 0 deletions