Alexei Starovoitov
19de99f70b
bpf: fix matching of data/data_end in verifier
...
The ctx structure passed into bpf programs is different depending on bpf
program type. The verifier incorrectly marked ctx->data and ctx->data_end
access based on ctx offset only. That caused loads in tracing programs
int bpf_prog(struct pt_regs *ctx) { .. ctx->ax .. }
to be incorrectly marked as PTR_TO_PACKET which later caused verifier
to reject the program that was actually valid in tracing context.
Fix this by doing program type specific matching of ctx offsets.
Fixes: 969bf05eb3 ("bpf: direct packet access")
Reported-by: Sasha Goldshtein <goldshtn@gmail.com >
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
Acked-by: Daniel Borkmann <daniel@iogearbox.net >
Signed-off-by: David S. Miller <davem@davemloft.net >
2016-06-15 23:37:54 -07:00
..
2016-05-24 11:00:20 -07:00
2016-05-30 23:00:22 +02:00
2016-05-17 10:15:34 +05:30
2016-06-02 17:59:44 +01:00
2016-05-28 12:32:01 -07:00
2016-06-10 08:32:24 -07:00
2016-05-26 09:36:10 -07:00
2016-05-26 20:52:15 +02:00
2016-05-17 12:29:34 -04:00
2016-05-17 18:06:18 +01:00
2016-05-18 13:14:02 -07:00
2016-05-28 16:15:25 -07:00
2016-05-16 16:45:48 +02:00
2016-05-23 17:53:39 -07:00
2016-05-18 18:46:55 -07:00
2016-06-07 22:07:09 -04:00
2016-05-26 19:34:26 -07:00
2016-05-19 19:12:14 -07:00
2016-06-15 23:37:54 -07:00
2016-06-01 14:56:57 -07:00
2016-05-20 17:58:30 -07:00
2016-05-19 19:12:14 -07:00
2016-05-19 19:12:14 -07:00
2016-05-23 11:48:48 -07:00
2016-06-02 23:05:27 +02:00
2016-05-19 19:12:14 -07:00
2016-05-26 20:00:28 -07:00
2016-05-28 16:15:25 -07:00
2016-05-19 19:12:14 -07:00
2016-05-20 21:26:15 -07:00
2016-06-05 10:36:01 -07:00
2016-05-31 22:12:43 +05:30
2016-05-20 17:58:30 -07:00
2016-05-27 16:03:22 -07:00
2016-05-17 15:48:12 -04:00
2016-05-31 22:17:05 +05:30
2016-05-16 13:49:32 -04:00
2016-05-27 17:14:05 -07:00
2016-06-01 10:29:39 +02:00
2016-05-19 19:12:14 -07:00
2016-05-17 17:11:27 -07:00
2016-05-20 17:58:30 -07:00
2016-05-20 17:58:30 -07:00
2016-05-28 15:48:31 -04:00
2016-05-19 19:12:14 -07:00
2016-05-20 17:58:30 -07:00
2016-05-19 19:12:14 -07:00
2016-05-20 17:58:30 -07:00
2016-06-10 23:22:55 -07:00
2016-05-16 15:12:02 -05:00
2016-05-16 11:14:29 -04:00
2016-05-20 17:58:30 -07:00
2016-05-20 17:58:30 -07:00
2016-05-20 22:20:48 -07:00
2016-05-20 21:26:15 -07:00
2016-05-23 17:04:14 -07:00
2016-05-25 16:12:05 +02:00
2016-05-17 12:06:35 +02:00
2016-05-16 14:47:16 -07:00
2016-05-19 09:21:36 -07:00
2016-05-20 17:58:30 -07:00
2016-05-27 15:23:32 -07:00
2016-05-19 19:12:14 -07:00
2016-05-19 19:12:14 -07:00
2016-05-19 19:12:14 -07:00
2016-05-26 15:35:44 -07:00
2016-05-27 15:57:31 -07:00
2016-05-20 17:58:30 -07:00
2016-06-05 10:36:01 -07:00
2016-06-15 22:07:57 -07:00
2016-05-20 18:03:15 -04:00
2016-05-20 18:03:15 -04:00
2016-05-17 15:48:12 -04:00
2016-05-17 15:47:55 -04:00
2016-05-17 15:05:23 -07:00
2016-05-26 10:33:33 -07:00
2016-05-23 17:04:14 -07:00
2016-05-19 19:12:14 -07:00
2016-05-16 07:22:35 -05:00
2016-05-20 14:51:34 -07:00
2016-05-23 17:04:14 -07:00
2016-05-19 19:12:14 -07:00
2016-06-03 15:06:22 -07:00
2016-05-19 19:12:14 -07:00
2016-05-20 17:58:30 -07:00
2016-05-20 17:58:30 -07:00
2016-05-19 13:10:54 -07:00
2016-05-20 17:58:30 -07:00
2016-05-25 17:05:40 -07:00
2016-05-19 19:12:14 -07:00
2016-05-20 17:58:30 -07:00
2016-05-17 14:48:03 +02:00
2016-05-20 17:58:30 -07:00
2016-05-20 17:58:30 -07:00
2016-05-31 22:12:43 +05:30
2016-05-26 00:04:58 -04:00
2016-05-26 15:35:44 -07:00
2016-05-31 11:59:06 -07:00
2016-05-17 14:41:03 -07:00
2016-05-26 15:35:44 -07:00
2016-05-23 17:04:14 -07:00
2016-05-20 19:58:32 -04:00
2016-05-19 19:12:14 -07:00
2016-05-19 19:12:14 -07:00
2016-05-26 15:35:44 -07:00
2016-05-19 19:12:14 -07:00
2016-05-28 15:42:50 -04:00
2016-05-20 17:58:30 -07:00
2016-05-20 17:58:30 -07:00
2016-05-17 07:28:28 -07:00
2016-05-19 19:12:14 -07:00
2016-06-01 21:13:43 +02:00
2016-05-18 18:55:19 -07:00
2016-05-20 20:57:27 -07:00
2016-05-23 17:04:14 -07:00
2016-05-20 17:58:30 -07:00
2016-05-23 11:48:48 -07:00
2016-05-19 19:12:14 -07:00
2016-05-27 20:09:16 -04:00
2016-05-20 17:58:30 -07:00