Fix refresh of bugfix/all/bpf-fix-integer-overflows.patch patch

Gbp-Dch: Ignore
This commit is contained in:
Salvatore Bonaccorso 2018-01-05 20:22:43 +01:00
parent 52909cebb8
commit 3452777429
1 changed files with 0 additions and 34 deletions

View File

@ -61,37 +61,3 @@ Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
smin, reg_type_str[type]);
return false;
}
@@ -1919,6 +1919,10 @@ static int adjust_ptr_min_max_vals(struc
!check_reg_sane_offset(env, ptr_reg, ptr_reg->type))
return -EINVAL;
+ if (!check_reg_sane_offset(env, off_reg, ptr_reg->type) ||
+ !check_reg_sane_offset(env, ptr_reg, ptr_reg->type))
+ return -EINVAL;
+
switch (opcode) {
case BPF_ADD:
/* We can take a fixed offset as long as it doesn't overflow
@@ -2052,6 +2056,9 @@ static int adjust_ptr_min_max_vals(struc
if (!check_reg_sane_offset(env, dst_reg, ptr_reg->type))
return -EINVAL;
+ if (!check_reg_sane_offset(env, dst_reg, ptr_reg->type))
+ return -EINVAL;
+
__update_reg_bounds(dst_reg);
__reg_deduce_bounds(dst_reg);
__reg_bound_offset(dst_reg);
@@ -2083,6 +2090,12 @@ static int adjust_scalar_min_max_vals(st
if (!src_known &&
opcode != BPF_ADD && opcode != BPF_SUB && opcode != BPF_AND) {
+ __mark_reg_unknown(dst_reg);
+ return 0;
+ }
+
+ if (!src_known &&
+ opcode != BPF_ADD && opcode != BPF_SUB && opcode != BPF_AND) {
__mark_reg_unknown(dst_reg);
return 0;
}