panda-re / lava

LAVA: Large-scale Automated Vulnerability Addition
Other
371 stars 60 forks source link

Compilationerrors after injecting bugs using function args #6

Closed horlabs closed 5 years ago

horlabs commented 6 years ago

Hey, when I tried to compile the file-program ("example"/default in the init-script) with bugs, I got many errors if the scripts using function args to inject the bugs. Because of the new args there are several errors in attribute(format(printf, x, y) (new argument for this function, but x and y weren't actualized) and function prototypes inside a c-file weren't changed either.

Using globals instead of function args works fine.

moyix commented 6 years ago

Yes, the implementation of data flow through arguments is somewhat flaky in this version. We have updates that make it more reliable that we are hoping to push to here pretty soon.

AndrewFasano commented 5 years ago

This is now fixed for the provided File target through pre-processing and removing the attributes. We've described the process for doing this in our documentation on adding new targets.

That said, this isn't a great solution. We could instead do something where we rewrite attributes for the functions we're adding data_flow to, but this might only work for a subset of possible attributes.