Skip to content

Incorrect banner value used in statsd reporting #1881

@m4drat

Description

@m4drat

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:

  1. 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
  2. Run Grafana instance or somehow otherwise get the reported data.
  3. The banner value will be the name of the executable instead of sync_id.
  4. When running multiple instances, they all will be using the same banner value, 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

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

Screenshot 2023-10-03 115214

Additional context
Adding -T none-1 directly sets the banner to be the expected value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions