On 01/12/2017 09:25 AM, Quentin Monnet wrote:
2017-01-12 (02:21 +0100) ~ Daniel Borkmann <dan...@iogearbox.net>
[...]
diff --git a/tools/testing/selftests/bpf/test_verifier.c 
b/tools/testing/selftests/bpf/test_verifier.c
index 9bb4534..f664bed 100644
--- a/tools/testing/selftests/bpf/test_verifier.c
+++ b/tools/testing/selftests/bpf/test_verifier.c
@@ -859,15 +859,451 @@ struct test_val {

[...]

+       {
+               "check cb access: doulbe, oob 5",
+               .insns = {
+                       BPF_MOV64_IMM(BPF_REG_0, 0),
+                       BPF_LDX_MEM(BPF_DW, BPF_REG_0, BPF_REG_1,
+                                   offsetof(struct __sk_buff, cb[4]) + 8),
+                       BPF_EXIT_INSN(),
+               },
+               .errstr = "invalid bpf_context access",
+               .result = REJECT,
+       },

Nitpicking: typo ("doulbe").

Thanks for spotting, I've sent out a v2.

Reply via email to