protobuf-python: restore builds and fuzz DescriptorPool inputs - #15901
protobuf-python: restore builds and fuzz DescriptorPool inputs#15901slegarraga wants to merge 4 commits into
Conversation
|
slegarraga is a new contributor to projects/protobuf-python. The PR must be approved by known contributors before it can be merged. The past contributors are: hunsche, zhangskz, maflcko, mkruskal-google |
|
/gcbrun trial_build.py protobuf-python --sanitizer address --fuzzing-engine libfuzzer |
d5a0df8 to
990b990
Compare
|
@mkruskal-google, could you please review the protobuf-python integration changes when you have a chance? The current project had stale |
|
/gcbrun trial_build.py protobuf-python --sanitizer address --fuzzing-engine libfuzzer |
|
@slegarraga please don't try to run the gcbrun commands. We will make sure the CI runs. |
|
Understood, thank you. I will not run any further gcbrun commands. |
Restores the current protobuf-python project build and adds a dedicated Atheris target for serialized descriptor inputs.
Current Protobuf uses Bzlmod and no longer supports the stale
--noenable_bzlmodoverride. This removes that override from the Docker preflight and fuzzer build, and uses a shallow source clone.The new target creates an isolated
DescriptorPoolfor each input and callsAddSerializedFile. Expected descriptor validation errors are discarded while native crashes and sanitizer findings remain visible. It follows the existingfuzz_*.pydiscovery convention.The Bazel wheel build now also propagates the OSS-Fuzz
fuzzer-no-linkinstrumentation into the native extension. This preserves ASan while allowing libFuzzer to receive coverage feedback from the upb parser rather than only from the Python wrapper.Local Linux x86_64 validation with the OSS-Fuzz helpers:
fuzz_protobufandfuzz_descriptor_poolwere packaged successfullyfuzz_descriptor_poolsmoke run completed 519,722 executions with no sanitizer findingcov: 421 / ft: 422tocov: 1437 / ft: 4216, adding 1,695 corpus units