|
18 | 18 | .prog_type = BPF_PROG_TYPE_LWT_IN, |
19 | 19 | }, |
20 | 20 | { |
21 | | - "variable-offset stack access", |
| 21 | + "variable-offset stack read, priv vs unpriv", |
22 | 22 | .insns = { |
23 | 23 | /* Fill the top 8 bytes of the stack */ |
24 | 24 | BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0), |
|
63 | 63 | BPF_MOV64_IMM(BPF_REG_0, 0), |
64 | 64 | BPF_EXIT_INSN(), |
65 | 65 | }, |
66 | | - .errstr = "R4 unbounded indirect variable offset stack access", |
| 66 | + .errstr = "invalid unbounded variable-offset indirect access to stack R4", |
67 | 67 | .result = REJECT, |
68 | 68 | .prog_type = BPF_PROG_TYPE_SOCK_OPS, |
69 | 69 | }, |
|
88 | 88 | BPF_EXIT_INSN(), |
89 | 89 | }, |
90 | 90 | .fixup_map_hash_8b = { 5 }, |
91 | | - .errstr = "R2 max value is outside of stack bound", |
| 91 | + .errstr = "invalid variable-offset indirect access to stack R2", |
92 | 92 | .result = REJECT, |
93 | 93 | .prog_type = BPF_PROG_TYPE_LWT_IN, |
94 | 94 | }, |
|
113 | 113 | BPF_EXIT_INSN(), |
114 | 114 | }, |
115 | 115 | .fixup_map_hash_8b = { 5 }, |
116 | | - .errstr = "R2 min value is outside of stack bound", |
| 116 | + .errstr = "invalid variable-offset indirect access to stack R2", |
117 | 117 | .result = REJECT, |
118 | 118 | .prog_type = BPF_PROG_TYPE_LWT_IN, |
119 | 119 | }, |
|
138 | 138 | BPF_EXIT_INSN(), |
139 | 139 | }, |
140 | 140 | .fixup_map_hash_8b = { 5 }, |
141 | | - .errstr = "invalid indirect read from stack var_off", |
| 141 | + .errstr = "invalid indirect read from stack R2 var_off", |
142 | 142 | .result = REJECT, |
143 | 143 | .prog_type = BPF_PROG_TYPE_LWT_IN, |
144 | 144 | }, |
|
163 | 163 | BPF_EXIT_INSN(), |
164 | 164 | }, |
165 | 165 | .fixup_map_hash_8b = { 5 }, |
166 | | - .errstr = "invalid indirect read from stack var_off", |
| 166 | + .errstr = "invalid indirect read from stack R2 var_off", |
167 | 167 | .result = REJECT, |
168 | 168 | .prog_type = BPF_PROG_TYPE_LWT_IN, |
169 | 169 | }, |
|
189 | 189 | BPF_EXIT_INSN(), |
190 | 190 | }, |
191 | 191 | .fixup_map_hash_8b = { 6 }, |
192 | | - .errstr_unpriv = "R2 stack pointer arithmetic goes out of range, prohibited for !root", |
| 192 | + .errstr_unpriv = "R2 variable stack access prohibited for !root", |
193 | 193 | .result_unpriv = REJECT, |
194 | 194 | .result = ACCEPT, |
195 | 195 | .prog_type = BPF_PROG_TYPE_CGROUP_SKB, |
|
217 | 217 | BPF_MOV64_IMM(BPF_REG_0, 0), |
218 | 218 | BPF_EXIT_INSN(), |
219 | 219 | }, |
220 | | - .errstr = "invalid indirect read from stack var_off", |
| 220 | + .errstr = "invalid indirect read from stack R4 var_off", |
221 | 221 | .result = REJECT, |
222 | 222 | .prog_type = BPF_PROG_TYPE_SOCK_OPS, |
223 | 223 | }, |
|
0 commit comments