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-03-25 11:50:48 +01:00
2021-08-08 09:05:24 +02:00
2021-11-18 14:04:13 +01:00
2019-07-03 11:14:28 +02:00
2021-08-08 09:05:24 +02:00
2020-10-06 20:16:57 -07:00
2021-08-08 09:05:24 +02:00
2021-08-08 09:05:24 +02:00
2021-08-08 09:05:24 +02:00
2020-03-30 15:00:30 -07:00
2021-08-08 09:05:24 +02:00
2019-06-19 02:22:52 +02:00
2019-01-27 21:37:45 -08:00
2021-08-08 09:05:24 +02:00
2020-07-17 20:18:17 -07:00
2019-02-05 16:56:10 +01:00
2020-03-03 16:23:59 -08:00
2020-03-27 19:40:39 -07:00
2020-08-25 15:41:15 -07:00
2021-08-08 09:05:24 +02:00
2020-10-09 22:03:06 +02:00
2020-06-01 14:38:22 -07:00
2019-06-13 23:07:00 +02:00
2020-07-11 01:32:15 +02:00
2021-08-08 09:05:24 +02:00
2020-06-02 21:04:04 +02:00
2021-08-08 09:05:24 +02:00
2019-05-01 23:32:16 +02:00
2021-08-08 09:05:24 +02:00
2021-08-08 09:05:24 +02:00
2019-05-13 01:08:55 +02:00
2019-01-27 21:37:45 -08:00
2019-04-04 01:27:38 +02:00
2020-10-06 20:16:57 -07:00
2019-10-04 12:27:36 -07:00
2020-06-22 22:22:58 +02:00
2021-08-08 09:05:24 +02:00
2019-01-27 21:37:45 -08:00
2019-01-27 21:37:45 -08:00
2020-06-02 21:04:04 +02:00
2020-04-29 23:30:59 +02:00
2021-08-08 09:05:24 +02:00
2019-04-26 19:04:19 -07:00
2020-09-25 13:58:02 -07:00
2020-10-15 16:05:31 +02:00
2019-12-19 13:39:22 -08:00
2019-04-16 10:18:15 +02:00
2019-01-27 21:37:45 -08:00
2020-10-19 15:57:42 -07:00
2019-02-05 16:56:10 +01:00
2019-02-05 16:56:10 +01:00
2021-08-08 09:05:24 +02:00
2019-05-29 13:31:05 +02:00
2021-08-08 09:05:24 +02:00
2020-04-20 18:41:34 -07:00
2020-05-21 17:44:25 -07:00
2021-12-22 09:30:51 +01:00
2021-08-08 09:05:24 +02:00
2019-07-15 23:15:53 +02:00
2019-01-27 21:37:45 -08:00
2021-12-14 11:32:46 +01:00
2019-01-27 21:37:45 -08:00