Skip to content

Custom mutator for proto messages #252

@KanishAnand

Description

@KanishAnand

We want to mutate a particular string field in a proto message with some specific values.
We have considered following approaches but none of them suits best here:

  1. Using dictionary to add those specific string values. But issue here is that fuzzer will use dictionary values to mutate all protobuf string fields not just this specific field, so this might not be good for fuzzers mutations?
  2. Using post-processing mutations which is ideally meant to not modify good messages. We can use this in some hacky way to insert specific string values at the time of mutation but not while running inputs from corpus. But post-processing mutations is not meant to do this.

So what would be best approach in this case, should libprotobuf-mutator provide custom mutators for protobuf message.

P.S: We need this due to libfuzzer's limitation in tracing CMP instructions due to which it's not able to use various string values present in our codebase in it's mutations, explained in detail here

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