You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have managed to trigger a buffer overflow in my Qiling target if _uc_hook_sub_impl_64 is called with a cur_loc close to, but less than the total MAP_SIZE. I believe the per-byte comparison "+" offsets push it over, incrementing an index beyond the map's buffer itself.
The resulting incremented afl_area_ptr_ index is: 0x13772, overflowing the MAP_SIZE by a lot, losing a coverage point and potentially crashing the target.
I can see there's a check to attempt to avoid this before the individual byte checks are called, should the comparison instead be >= (ucafl->afl_inst_rms_-6)) or similar ?
I have managed to trigger a buffer overflow in my Qiling target if
_uc_hook_sub_impl_64
is called with acur_loc
close to, but less than the totalMAP_SIZE
. I believe the per-byte comparison "+" offsets push it over, incrementing an index beyond the map's buffer itself.Take for example the following values:
unicornafl/unicornafl.cpp
Lines 367 to 370 in 2abdcd3
The resulting incremented
afl_area_ptr_
index is: 0x13772, overflowing the MAP_SIZE by a lot, losing a coverage point and potentially crashing the target.I can see there's a check to attempt to avoid this before the individual byte checks are called, should the comparison instead be
>= (ucafl->afl_inst_rms_-6))
or similar ?unicornafl/unicornafl.cpp
Line 418 in 2abdcd3
The text was updated successfully, but these errors were encountered: