mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
bpf: Handle multiple variable additions into packet pointers in verifier.
We must accumulate into reg->aux_off rather than use a plain assignment. Add a test for this situation to test_align. Reported-by: Alexei Starovoitov <ast@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
844cf763fb
commit
6832a333ed
2 changed files with 38 additions and 1 deletions
|
|
@ -1531,7 +1531,7 @@ add_imm:
|
|||
dst_reg->id = ++env->id_gen;
|
||||
|
||||
/* something was added to pkt_ptr, set range to zero */
|
||||
dst_reg->aux_off = dst_reg->off;
|
||||
dst_reg->aux_off += dst_reg->off;
|
||||
dst_reg->off = 0;
|
||||
dst_reg->range = 0;
|
||||
if (had_id)
|
||||
|
|
|
|||
Loading…
Reference in a new issue