-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Incorrect banner value used while reporting statsd statistics.
When running AFL++ with AFL_STATSD_TAGS_FLAVOR=<any> AFL_STATSD=1 the banner value that is used in statistics reporting is equal to the name of the executable, while in reality it should be the sync_id, or the value directly provided using -T option. While the latter one works as expected, the first one is not. This leads to a situation when multiple instances are reporting statistics, the data can't be differentiated as all the instances have the same banner value, which is the name of the executable.
Tested on the latest dev revision: 1f7f1eff4323720997079d468c9a55096ac2fc3e
To Reproduce
Steps to reproduce the behavior:
- Run your AFL++ instance with the options mentioned before, e.g.,
AFL_STATSD_TAGS_FLAVOR=statsd AFL_STATSD=1 afl-fuzz -i - -o out -S none-1 -- ./xxx - Run Grafana instance or somehow otherwise get the reported data.
- The banner value will be the name of the executable instead of
sync_id. - When running multiple instances, they all will be using the same
bannervalue, thus the instances couldn't be distinguished.
Expected behavior
The banner value should be the sync_id or the value provided by the -T option (this one works as expected).
Potential solution
As I can see, a potential solution might use afl->sync_id instead of afl->use_banner in the
AFLplusplus/src/afl-fuzz-statsd.c
Lines 226 to 227 in d09950f
| snprintf(tags, MAX_TAG_LEN * 2, afl->statsd_tags_format, afl->use_banner, | |
| VERSION); |
But that would make the -T not able to set the banner value for statsd reporting.
Screen output/Screenshots
Additional context
Adding -T none-1 directly sets the banner to be the expected value.
