[PATCH] api: fix seccomp_export_bpf_mem out-of-bounds read
*len is the length of the destination buffer, but program->blks is
probably not anywhere near that long. It's already been checked above
that BPF_PGM_SIZE(program) is less than or equal to *len, so that's
the correct value to use here to avoid either reading or writing too
much.
I noticed this because tests/11-basic-basic_errors started failing on
musl after
e797591 ("all: add seccomp_precompute() functionality").
Signed-off-by: Alyssa Ross <hi@alyssa.is>
Acked-by: Tom Hromatka <tom.hromatka@oracle.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Gbp-Pq: Name api_fix_seccomp_export_bpf_mem_out-of-bounds_read.patch
[PATCH] tests: remove the fuzzer from test 62-sim-arch_transactions
We can't reliably run the bpf-sim-fuzz tests on tests which manipulate
the filters arch/ABIs unless the filter is safe to run on all arch/ABIs,
which is more or less impossible. Remove the bpf-sim-fuzz test section
in test #62 to work around this, just as we do with the other similar
tests.
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
(cherry picked from commit
7db46d72f13c172b290818f624c2966bd0db5677)
Gbp-Pq: Name tests_remove_the_fuzzer_from_test_62-sim-arch_transactions.patch