Code Monkey home page Code Monkey logo

Comments (8)

vanhauser-thc avatar vanhauser-thc commented on August 18, 2024

hmm I think ... yes and no... trimming means shortening the input, and yes with objects a smaller/simpler object might maybe be longer in binary. however I rather think that objects should only be removed when being trimmed, not changing it contents.
And removing objects/subobjects should never make them larger (I think) however they could result in the same binary size.
or what do you think? and @andreafioraldi ?

from grammar-mutator.

vanhauser-thc avatar vanhauser-thc commented on August 18, 2024

I am not an expert in grammar (I only know basic stuff), hence I want to avoid making the fuzzer bad by my limited knowledge :)

from grammar-mutator.

andreafioraldi avatar andreafioraldi commented on August 18, 2024

I agree with @h1994st

from grammar-mutator.

andreafioraldi avatar andreafioraldi commented on August 18, 2024

Trimming is to make the input faster, if changing a terminal content does it it should be allowed.

from grammar-mutator.

vanhauser-thc avatar vanhauser-thc commented on August 18, 2024

trimming is not to make the input faster but smaller.
to have the smallest possible input that still triggers the same path.
the trimming function does not check the timing at all, only if the path is the same.

so for a grammar I think this translate to either remove objects (or whatever you call this in grammar-speak ;) ) or simply it.

from grammar-mutator.

h1994st avatar h1994st commented on August 18, 2024

@vanhauser-thc

hmm I think ... yes and no... trimming means shortening the input, and yes with objects a smaller/simpler object might maybe be longer in binary. however I rather think that objects should only be removed when being trimmed, not changing it contents.

The issue I met comes from the subtree trimming in Nautilus. In summary, this trimming strategy replaces a tree node and its subtree with the smallest possible subtree at this position. The root node of the original subtree and the replaced subtree have the same type, but they may represent different contents (i.e., binary buffer).

And removing objects/subobjects should never make them larger (I think) however they could result in the same binary size.
or what do you think?

The normal fuzzer like AFL++ has a different definition of the "size" from the grammar mutator. The trimming functions in the grammar mutator do remove objects (i.e., tree nodes), but do not guarantee a smaller binary size.

I may submit a pull request to AFL++ to allow the custom mutator to generate the trimmed data that is larger than the original data. What do you think? : )

from grammar-mutator.

vanhauser-thc avatar vanhauser-thc commented on August 18, 2024

I may submit a pull request to AFL++ to allow the custom mutator to generate the trimmed data that is larger than the original data. What do you think? : )

if that makes the grammar fuzzer better then yes.
the question is however how ... I think it is easier if just the check + FATAL is removed rather than doing complex stuff in either the mutator or afl-fuzz.

from grammar-mutator.

h1994st avatar h1994st commented on August 18, 2024

Just submitted a pull request (merged).

Simply replace the FATAL with WARN so that the custom mutator can keep running even if generating larger trimmed data.

from grammar-mutator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.