Daniel Borkmann
0612679e48
bpf, selftests: Add test case trying to taint map value pointer
commit b1a7288dedc6caf9023f2676b4f5ed34cf0d4029 upstream.
Add a test case which tries to taint map value pointer arithmetic into a
unknown scalar with subsequent export through the map.
Before fix:
# ./test_verifier 1186
#1186/u map access: trying to leak tained dst reg FAIL
Unexpected success to load!
verification time 24 usec
stack depth 8
processed 15 insns (limit 1000000) max_states_per_insn 0 total_states 1 peak_states 1 mark_read 1
#1186/p map access: trying to leak tained dst reg FAIL
Unexpected success to load!
verification time 8 usec
stack depth 8
processed 15 insns (limit 1000000) max_states_per_insn 0 total_states 1 peak_states 1 mark_read 1
Summary: 0 PASSED, 0 SKIPPED, 2 FAILED
After fix:
# ./test_verifier 1186
#1186/u map access: trying to leak tained dst reg OK
#1186/p map access: trying to leak tained dst reg OK
Summary: 2 PASSED, 0 SKIPPED, 0 FAILED
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-12-22 09:30:51 +01:00
..
2020-04-03 13:12:26 -07:00
2021-04-28 13:40:02 +02:00
2021-09-26 14:08:59 +02:00
2021-11-18 14:04:10 +01:00
2021-12-14 11:32:42 +01:00
2021-05-07 11:04:31 +02:00
2021-01-27 11:55:20 +01:00
2020-07-06 10:46:23 +00:00
2020-08-22 10:53:12 +01:00
2021-09-26 14:08:57 +02:00
2020-09-21 07:50:58 -06:00
2021-04-16 11:43:20 +02:00
2020-04-10 15:36:22 -07:00
2020-03-25 11:50:48 +01:00
2021-11-18 14:04:11 +01:00
2020-09-04 11:58:15 -07:00
2021-11-18 14:04:02 +01:00
2020-04-02 17:57:10 +01:00
2020-03-25 11:50:48 +01:00
2021-12-17 10:14:42 +01:00
2021-05-22 11:40:55 +02:00
2021-07-31 08:16:10 +02:00
2020-06-11 16:27:24 +01:00
2021-12-22 09:30:51 +01:00
2021-09-18 13:40:07 +02:00
2021-10-09 14:40:56 +02:00
2021-09-03 10:09:27 +02:00
2021-10-09 14:40:57 +02:00
2020-07-13 10:42:02 -07:00