Giter VIP home page Giter VIP logo

Comments (5)

nareddyt avatar nareddyt commented on July 28, 2024 1

Hi, I saw this issue pop up in OSS Fuzz and also google3 (example: b/160321599).

Root cause is that protobuf text format does not have proper stack overflow protection. This was initially noticed in #172. I added this code to fix it: https://github.com/protocolbuffers/protobuf/blob/6935eae45c99926a000ecbef0be20dfd3d159e71/src/google/protobuf/text_format.cc#L675

But it looks like there is one edge case where the text format library can recurse on unknown fields without hitting the recursion protection: https://github.com/protocolbuffers/protobuf/blob/6935eae45c99926a000ecbef0be20dfd3d159e71/src/google/protobuf/text_format.cc#L844

Which is triggered by the input @asraa posted above, deeply nested arrays.

I will make a PR to protobuf to fix this edge case...

from libprotobuf-mutator.

vitalybuka avatar vitalybuka commented on July 28, 2024

It looks like as an input from a different fuzzer. Maybe something in OSS-Fuzz tries to mix them?

from libprotobuf-mutator.

asraa avatar asraa commented on July 28, 2024

Yes!! You're right. OSS-Fuzz does cross pollination of corpora.

Hmmm. I see. So this is not an issue of LPM generating unknown fields, but because unknown fields were passed in to the fuzzer.

from libprotobuf-mutator.

vitalybuka avatar vitalybuka commented on July 28, 2024

LPM does not generate unknown fields
However it would be nice to fix libprotobuf to not crash here. It has buffer overflow protection counter but it's probably not checked for this case.

from libprotobuf-mutator.

asraa avatar asraa commented on July 28, 2024

Ah!! I see where it is. Thanks Teju, let me know if you need help.

from libprotobuf-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.