Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: FuzzParseDN causing OOMs in restricted environments #466

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion fuzz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@

package ldap

import "testing"
import (
ber "github.com/go-asn1-ber/asn1-ber"
"testing"
)

func FuzzParseDN(f *testing.F) {
// See https://github.com/go-asn1-ber/asn1-ber/blob/04301b4b1c5ff66221f8f8a394f814a9917d678a/fuzz_test.go#L33-L37
// for why this limitation is necessary
ber.MaxPacketLengthBytes = 65536

f.Add("*")
f.Add("cn=Jim\\0Test")
Expand Down
Loading