lkml.org 
[lkml]   [2017]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 net-next 02/12] bpf/verifier: rework value tracking
From
Date
On 28/06/17 18:09, Daniel Borkmann wrote:
> Could you elaborate on this one? If I understand it correctly, then
> the scalar += pointer case would mean the following: given I have one
> of the allowed pointer types in adjust_ptr_min_max_vals() then the
> prior scalar type inherits the ptr type/id. I would then 'destroy' the
> pointer value so we get a -EACCES on it. We mark the tmp off_reg as
> scalar type, but shouldn't also actual dst_reg be marked as such
> like in below pointer += scalar case, such that we undo the prior
> ptr_type inheritance?
Good catch. The intent was that adjust_ptr_min_max_vals() wouldn't mark
dst_reg's type/id in the case when it returned -EACCES, but indeed there
are some such paths, and rather than changing those it may be easier to
change the type/id back to scalar/0. I don't think we need to go as far
as calling __mark_reg_unknown() on it though, its bounds and align
shouldn't have been screwed up by adjust_ptr_min_max_vals().

-Ed

\
 
 \ /
  Last update: 2017-06-28 20:29    [W:0.168 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site