fix: FuzzParseDN causing OOMs in restricted environments#466
fix: FuzzParseDN causing OOMs in restricted environments#466cpuschma merged 1 commit intogo-ldap:masterfrom cpuschma:fix_fuzzing_oom
FuzzParseDN causing OOMs in restricted environments#466Conversation
Parallel and large amount of fuzzing data can create large amounts of allocated data and cause restricted fuzzing environments to crash (see #460)
|
Bug : v3/fuzz_test.go in this you need to change the names. To: also in fuzz_test.go To: And then in build.sh need to be updated. |
|
Oh you already opened the PR, alright. Thank you! I was about to remove the mirroring and separate this into a new PR, since the v3 and root directory are out of sync anyways. |
|
Odd, so with the current code, the following works But this returns Is this module related? EDIT: Ah, so if I cd into |
|
Note, after the changes the following had reasonable memory consumption (< 2 GB combined) when fuzzing across 10 cores.
|
|
To get things moving: I'll remove the part where I mirrored the |
|
…6 bytes (go-ldap#466)" This reverts commit 80095a3
…o-ldap#466) Parallel and large amount of fuzzing data can create large amounts of allocated data and cause restricted fuzzing environments to crash (see go-ldap#460)
go-ldap#500) * Revert "fix: Limit maximum BER packet length in `FuzzParseDN` to 65536 bytes (go-ldap#466)" This reverts commit 80095a3 * Fix index out of range crash
See the discussion in #460. The fuzzing might crash in certain environments because of the high
ber.MaxPacketLengthBytessize of 2147483647 bytes (2.1 GB).This change limits the maximum ASN1 BER packet size to 65KB, which should be sufficient for the fuzzer. We'll look into providing custom encoders/decoders to allow setting a limit without breaking things globally, as the configuration is package-wide.
Additionally, the fuzz_test.go file was missing in the v3 directory. This slipped through in the initial PR