openvpn: fix harness aborts and stalls in fuzz_route/fuzz_buffer#55
Open
tc-agent wants to merge 2 commits into
Open
openvpn: fix harness aborts and stalls in fuzz_route/fuzz_buffer#55tc-agent wants to merge 2 commits into
tc-agent wants to merge 2 commits into
Conversation
Fuzzing Coverage ReportTested: project
Per-harness
Δ = (after − before) / before, to accommodate that denominators may change. "new" when before is 0; "deleted" when after is 0. |
tc-agent
force-pushed
the
master
branch
28 times, most recently
from
May 14, 2026 14:58
da881b1 to
886ecb1
Compare
tc-agent
force-pushed
the
master
branch
12 times, most recently
from
May 21, 2026 13:42
9a36aa8 to
6a4a93d
Compare
tc-agent
force-pushed
the
master
branch
3 times, most recently
from
May 27, 2026 06:33
6125235 to
e512e7e
Compare
tc-agent
force-pushed
the
fix-openvpn-harness-aborts
branch
from
May 27, 2026 07:53
8b99e38 to
50c8768
Compare
tc-agent
force-pushed
the
master
branch
5 times, most recently
from
May 27, 2026 16:16
b5fd10c to
712a52f
Compare
tc-agent
force-pushed
the
fix-openvpn-harness-aborts
branch
from
May 27, 2026 16:44
50c8768 to
602e977
Compare
tc-agent
force-pushed
the
master
branch
2 times, most recently
from
May 28, 2026 02:55
a7587cd to
b952f62
Compare
tc-agent
force-pushed
the
master
branch
4 times, most recently
from
May 28, 2026 18:05
af7f9a7 to
806b281
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three small fixes that let
fuzz_routeaccumulate execs againstOpenVPN/openvpn@fcc34b13, plus one matching guard infuzz_buffer.Fuzz Introspector (2026-05-09 baseline) shows the project at 10.07% line coverage:
fuzz_base64carries 62.27%, the other 9 harnesses each below 5%.fuzz_routewas in the long tail.Changes
fuzz_route— keep AI_NUMERICHOST inopenvpn_getaddrinfo's retry loop (build.sh)init_route_listandinit_route_ipv6_listresolve user-supplied hostnames throughopenvpn_getaddrinfo, which first triesAI_NUMERICHOSTand on failure clears the flag and re-entersgetaddrinfo(3)for actual DNS. With random fuzz inputs almost never being numeric IPs, every iteration goes through the system resolver and pays its full timeout — leaving the harness at single-digit exec/s.The patch keeps
AI_NUMERICHOSTset across the retry, so non-numeric inputs returnEAI_NONAMEimmediately and the harness moves on. The patch lives insideapply_sed_changes()alongside the existingM_FATAL → M_WARNand socket-stub redirections.fuzz_route— clampr6.netbitsto the IPv6 prefix range (fuzz_route.c)The case-7 path constructs a
route_ipv6foradd_route_ipv6.r6.netbitswas randomized over0..0xfffff, which is much wider than the legitimate IPv6 prefix range[0, 128]. Clamping it keeps the input in-range so the call exercises the real implementation rather than reaching the netlink layer with structurally invalid values.fuzz_route— symmetric IPv6 cleanup (fuzz_route.c)init_route_ipv6_listallocatesroute_ipv6objects intorl6->gc. The harness already callsgc_free(&rl.gc)after the IPv4 path; the IPv6 counterpart was missing. Mirroring the existing cleanup adds the matchinggc_free(&rl6.gc)whenroute_list_ipv6_initedis set.fuzz_buffer— extend the existingBUF_SIZE_MAXguard tostring_alloc_buf(fuzz_buffer.c)The harness already gates
buffer_list_pushwithstrlen(tmp) < BUF_SIZE_MAXfurther down (line 228). The same kind of guard goes around the existingstring_alloc_bufcall, with a+1for the trailing NUL thatstring_alloc_bufwrites (strlen(tmp) + 1 < BUF_SIZE_MAX).Validation
Built locally with
--sanitizer=addressagainstOpenVPN/openvpn@fcc34b13(master). All ten harnesses ran for 5 minutes from an empty corpus; coverage measured withllvm-cov reportoversrc/openvpn/src/openvpn:The 5-minute total (9.68%) lands close to Fuzz Introspector's 24-hour figure (10.07%); the small gap is consistent with the shorter wall-time and a slightly different denominator (the local report covers only
src/openvpn/src/openvpn).