Alexei Starovoitov
687f07156b
bpf: fix out of bounds access in verifier log
...
when the verifier log is enabled the print_bpf_insn() is doing
bpf_alu_string[BPF_OP(insn->code) >> 4]
and
bpf_jmp_string[BPF_OP(insn->code) >> 4]
where BPF_OP is a 4-bit instruction opcode.
Malformed insns can cause out of bounds access.
Fix it by sizing arrays appropriately.
The bug was found by clang address sanitizer with libfuzzer.
Reported-by: Yonghong Song <yhs@plumgrid.com>
Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-09-09 14:11:55 -07:00
..
2015-09-09 14:11:55 -07:00
2015-06-16 11:04:29 +01:00
2015-02-19 12:39:03 -06:00
2015-09-03 08:08:17 -07:00
2015-06-30 19:44:57 -07:00
2015-09-01 14:33:35 -07:00
2015-07-14 22:48:06 +02:00
2015-07-21 10:18:07 +02:00
2015-09-02 13:10:25 -07:00
2015-06-30 19:44:59 -07:00
2015-08-04 08:49:21 -07:00
2015-09-02 08:04:23 -07:00
2015-09-01 14:04:50 -07:00
2015-09-03 08:08:17 -07:00
2015-04-11 22:27:55 -04:00
2015-04-26 17:22:07 -07:00
2015-04-15 15:06:55 -04:00
2015-06-27 13:53:16 -07:00
2015-04-22 14:49:23 -07:00
2015-02-11 20:07:47 -08:00
2015-07-08 09:33:38 -07:00
2015-04-15 16:35:22 -07:00
2015-07-14 17:29:23 -04:00
2015-08-25 14:19:25 -04:00
2015-09-02 08:04:23 -07:00
2015-06-04 23:57:18 +02:00
2015-05-07 12:02:51 +02:00
2015-08-31 20:26:22 -07:00
2015-08-10 11:18:41 -04:00
2015-04-15 16:35:22 -07:00
2015-04-12 21:03:31 +02:00
2015-08-07 13:59:49 +02:00
2015-09-02 08:04:23 -07:00
2015-06-24 14:46:01 -07:00
2015-04-15 16:35:22 -07:00
2015-04-15 16:35:22 -07:00
2015-05-27 11:09:50 +09:30
2015-05-12 09:46:00 +02:00
2015-06-30 19:44:57 -07:00
2015-08-04 10:16:54 +02:00
2015-08-31 20:26:22 -07:00
2015-07-14 17:29:23 -04:00
2015-07-29 06:13:22 +09:30
2015-09-01 08:40:25 -07:00
2015-02-13 21:21:38 -08:00
2015-06-30 19:44:57 -07:00
2015-07-01 10:49:25 -07:00
2015-07-22 15:27:32 -07:00
2015-02-13 21:21:38 -08:00
2015-04-17 09:04:06 -04:00
2015-04-15 16:35:23 -07:00
2015-06-30 19:44:59 -07:00
2015-07-22 17:20:34 +02:00
2015-05-09 17:35:05 -04:00
2015-08-07 04:39:40 +03:00
2015-04-19 13:19:23 -07:00
2015-06-24 17:49:40 -07:00
2015-02-09 15:24:03 -08:00
2015-08-03 12:21:28 +02:00
2015-07-31 13:30:45 +02:00
2015-07-10 10:39:25 -05:00
2015-07-03 15:20:57 -07:00
2015-05-27 12:56:15 -07:00
2015-08-12 14:55:28 -05:00
2015-06-24 17:49:40 -07:00
2015-09-02 08:02:20 -07:00