Closed wakolzin closed 4 years ago
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://cla.developers.google.com/ to sign.
Once you've signed (or fixed any issues), please reply here with @googlebot I signed it!
and we'll verify it.
ℹ️ Googlers: Go here for more info.
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://cla.developers.google.com/ to sign.
Once you've signed (or fixed any issues), please reply here with @googlebot I signed it!
and we'll verify it.
ℹ️ Googlers: Go here for more info.
@googlebot I signed it!
I would not call it a fix as it is behaving as designed.
And I am not sure about your analysis. in run_target() after the execution classify_counts() is called, and that normalizes each byte entry to the highest bit only. hence a trace_bit[100] = 255 value will be reduces to 128 and therefore leave 7 bits set in virgin_bits.
following new path criterion from white paper
what is this?
@vanhauser-thc Yes, I agree. It was my inattention. By "new path criterion" i meant new edge or new backet detection.
@vanhauser-thc Yes, I agree. It was my inattention. By "new path criterion" i meant new edge or new backet detection.
I meant the whitepaper you were refering to :)
@vanhauser-thc https://lcamtuf.coredump.cx/afl/technical_details.txt
2) Detecting new behaviors
@vanhauser-thc Thanks for review. I close pull request.
In function 'has_new_bits' were fixed following points:
Let's consider the following case. Before another program start we have:
virgin_map[100] = 0xff // '100' is chosen just for example
Let's say after run we have:trace_bits[100] = 0xff // > 128, i.e. we got into 7th hit counts bucket (128+)
After 'has_new_bits' was called:virgin_map[100] = 0x00
and we will not ever detect any bucket, despite we hit in only one bucket during all program runs.In fact, we must update virgin_map so as:
virgin_map[100] = 0x8f
It is somewhat extreme example, but current 'has_new_bits' realization causes loss of some new testcases (following new path criterion from white paper) and in some cases it causes save extra entries in queue (such cases were not considered here).And that is a fix.