Daniel Borkmann
a17536742b
bpf: reject stores into ctx via st and xadd
...
[ upstream commit f37a8cb84c ]
Alexei found that verifier does not reject stores into context
via BPF_ST instead of BPF_STX. And while looking at it, we
also should not allow XADD variant of BPF_STX.
The context rewriter is only assuming either BPF_LDX_MEM- or
BPF_STX_MEM-type operations, thus reject anything other than
that so that assumptions in the rewriter properly hold. Add
test cases as well for BPF selftests.
Fixes: d691f9e8d4 ("bpf: allow programs to write to certain skb fields")
Reported-by: Alexei Starovoitov <ast@kernel.org >
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net >
Signed-off-by: Alexei Starovoitov <ast@kernel.org >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-01-31 14:03:50 +01:00
..
2018-01-31 14:03:50 +01:00
2018-01-17 09:45:18 +01:00
2017-08-22 18:43:23 -07:00
2017-12-14 09:52:58 +01:00
2017-12-25 14:26:21 +01:00
2017-11-02 11:10:55 +01:00
2017-11-30 08:40:52 +00:00
2017-11-02 11:10:55 +01:00
2018-01-23 19:58:11 +01:00
2017-12-20 10:10:23 +01:00
2017-11-02 11:10:55 +01:00
2017-11-24 08:37:04 +01:00
2018-01-23 19:58:13 +01:00
2018-01-31 14:03:49 +01:00
2018-01-23 19:58:16 +01:00
2018-01-10 09:31:17 +01:00
2017-05-23 10:01:37 +02:00
2017-05-03 11:05:15 -07:00
2017-11-02 11:10:55 +01:00
2017-08-16 16:48:34 -07:00
2017-12-17 15:08:00 +01:00
2017-09-03 20:21:24 -04:00
2017-05-02 10:16:05 -04:00
2017-09-14 17:37:26 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-07-15 20:46:47 -04:00
2017-07-31 13:09:49 +02:00
2018-01-02 20:31:15 +01:00
2018-01-17 09:45:27 +01:00
2017-05-18 10:30:19 -06:00
2018-01-23 19:58:13 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-10-20 15:32:54 -04:00
2017-09-23 16:50:20 -04:00
2017-12-29 17:53:43 +01:00
2017-11-02 11:10:55 +01:00
2018-01-23 19:58:11 +01:00
2017-12-20 10:10:18 +01:00
2017-05-08 17:15:10 -07:00
2017-12-14 09:53:13 +01:00
2017-07-10 16:32:34 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-07-18 11:38:04 +02:00
2017-07-12 16:26:02 -07:00
2017-11-02 11:10:55 +01:00
2017-07-12 16:26:00 -07:00
2017-09-08 18:26:51 -07:00
2017-12-10 13:40:40 +01:00
2017-07-12 16:25:59 -07:00
2017-08-31 16:33:15 -07:00
2017-11-02 11:10:55 +01:00
2017-10-03 17:54:25 -07:00
2017-07-25 15:08:32 +02:00
2017-05-26 10:10:37 +02:00
2017-08-17 10:40:26 +02:00
2017-10-03 17:54:26 -07:00
2017-07-20 07:43:58 -05:00
2017-08-21 12:47:31 -07:00
2017-07-24 14:30:28 -05:00
2017-11-02 11:10:55 +01:00
2017-05-02 11:38:06 -07:00
2017-12-25 14:26:21 +01:00
2018-01-10 09:31:20 +01:00
2017-09-08 18:26:48 -07:00
2017-10-04 10:53:54 +02:00
2017-11-02 11:10:55 +01:00
2017-04-11 09:06:32 +02:00
2017-05-26 10:10:36 +02:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-12-14 09:53:08 +01:00
2017-12-25 14:26:21 +01:00
2017-05-08 17:15:12 -07:00
2017-07-25 13:04:45 -07:00
2017-12-20 10:10:18 +01:00
2017-09-08 18:26:50 -07:00
2017-08-29 15:14:38 +02:00
2017-07-20 07:43:58 -05:00
2017-11-04 08:53:04 +01:00
2017-11-02 11:10:55 +01:00
2017-11-06 12:26:49 -08:00
2018-01-23 19:58:18 +01:00