caddy icon indicating copy to clipboard operation
caddy copied to clipboard

fuzz-parse-network-address: Timeout in fuzz-parse-network-address

Open mohammed90 opened this issue 1 month ago • 4 comments

Issue Details

Detailed Report: https://oss-fuzz.com/testcase?key=5287767798775808

Project: caddy Fuzzing Engine: libFuzzer Fuzz Target: fuzz-parse-network-address Job Type: libfuzzer_asan_caddy Platform Id: linux

Crash Type: Timeout (exceeds 60 secs) Crash Address: Crash State: fuzz-parse-network-address

Sanitizer: address (ASAN)

Regressed: https://oss-fuzz.com/revisions?job=libfuzzer_asan_caddy&range=202609190705:202609200629

Reproducer Testcase: https://oss-fuzz.com/download?testcase_id=5287767798775808

Issue on oss-fuzz tracker: Issue 564561669

Reproducer:

clusterfuzz-testcase-minimized-fuzz-parse-network-address-5287767798775808.txt

Assistance Disclosure

AI not used

If AI was used, describe the extent to which it was used.

No response

mohammed90 avatar Oct 15 '26 19:10 mohammed90

Hi, I'd love to give this a try, will open a PR soon!

jasperdingg avatar Oct 19 '26 07:10 jasperdingg

Uhhh the reproducer finishes in 11 to 22 ms on current master outside the libFuzzer ASAN harness and scales roughly linearly. We need to reproduce or profile the exact ASAN job and identify the hotspot before changing the parser.

steadytao avatar Oct 19 '26 09:10 steadytao

the reproducer finishes in 11 to 22 ms on current master

The test may be cached in your system. Go is aggressive on test cache. Also, your specs play a role. It's not 60 seconds on my system, but it's not the fastest.

FAIL    github.com/caddyserver/caddy/v2 1.844s
go test -run TestTempParseNetworkAddress  4.94s user 1.77s system 78% cpu 8.589 total

We can identify the slow areas and assess from there.

mohammed90 avatar Oct 19 '26 09:10 mohammed90

Ah very true. Good to profile it nonetheless. Feel free @jasperdingg.

steadytao avatar Oct 19 '26 09:10 steadytao