diff options
author | Björn Töpel <[email protected]> | 2021-10-28 14:51:15 +0200 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2021-10-28 08:14:30 -0700 |
commit | 27de809a3d83a6199664479ebb19712533d6fd9b (patch) | |
tree | 2d56959a9820f52d44b59e5410c44d8de01f2879 /lib/test_overflow.c | |
parent | 20af8864a3029fde67fd00999f58bc1ada632374 (diff) |
riscv, bpf: Fix potential NULL dereference
The bpf_jit_binary_free() function requires a non-NULL argument. When
the RISC-V BPF JIT fails to converge in NR_JIT_ITERATIONS steps,
jit_data->header will be NULL, which triggers a NULL
dereference. Avoid this by checking the argument, prior calling the
function.
Fixes: ca6cb5447cec ("riscv, bpf: Factor common RISC-V JIT code")
Signed-off-by: Björn Töpel <[email protected]>
Acked-by: Daniel Borkmann <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions