Comments (5)
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.
It looks like as an input from a different fuzzer. Maybe something in OSS-Fuzz tries to mix them?
from libprotobuf-mutator.
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.
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.
Ah!! I see where it is. Thanks Teju, let me know if you need help.
from libprotobuf-mutator.
Related Issues (20)
- OSS-Fuzz issue 57094 HOT 1
- OSS-Fuzz issue 57096 HOT 1
- Mutator breaks content of Any
- Ninja check failing HOT 2
- clang++ filed HOT 8
- OSS-Fuzz issue 61338 HOT 1
- OSS-Fuzz issue 61395 HOT 1
- How can I start with macos???? HOT 6
- What is a correct way to disable code coverage instrumentation?
- Ninja check failed HOT 1
- Propagate `seed` to `DEFINE_PROTO_FUZZER`
- OSS-Fuzz issue 63081 HOT 1
- Error during ninja check: no type named `string_view` in namespace `absl` HOT 1
- ninja check fails on stddef.h HOT 1
- feasibility of using libprofobuf-mutator for highly complex nested protobuf in heavy compuation program
- OSS-Fuzz issue 65416 HOT 1
- OSS-Fuzz issue 65495 HOT 1
- OSS-Fuzz issue 65497 HOT 1
- OSS-Fuzz issue 65516 HOT 1
- error: use of undeclared identifier 'absl' HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libprotobuf-mutator.