]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
bpf: check pending signals while verifying programs
authorAlexei Starovoitov <ast@kernel.org>
Tue, 4 Dec 2018 06:46:04 +0000 (22:46 -0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit1ec7c3bd0a44aeb42330b857849f1b95e2ccb588
treea385aa3674ff9a56ce704d64f3e082e25304c87d
parent580311e30ca34bdfe680983c3dae84b617b5c3bc
bpf: check pending signals while verifying programs

BugLink: https://bugs.launchpad.net/bugs/1837257
[ Upstream commit c3494801cd1785e2c25f1a5735fa19ddcf9665da ]

Malicious user space may try to force the verifier to use as much cpu
time and memory as possible. Hence check for pending signals
while verifying the program.
Note that suspend of sys_bpf(PROG_LOAD) syscall will lead to EAGAIN,
since the kernel has to release the resources used for program verification.

Reported-by: Anatoly Trosinenko <anatoly.trosinenko@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
kernel/bpf/verifier.c