Skip to content

bind9: fix broken build#12

Open
tc-agent wants to merge 2 commits into
masterfrom
fix-bind9-meson-fuzzing-backend
Open

bind9: fix broken build#12
tc-agent wants to merge 2 commits into
masterfrom
fix-bind9-meson-fuzzing-backend

Conversation

@tc-agent

@tc-agent tc-agent commented Apr 10, 2026

Copy link
Copy Markdown
Owner

Summary

Fix the broken OSS-Fuzz build for bind9. The build has been failing since 2026-04-06 (build status JSON, last successful build 6808bda2 on 2026-04-05). All daily builds since then fail at:

+ git apply --ignore-space-change --ignore-whitespace /src/patch.diff
error: patch failed: meson.build:1584
error: meson.build: patch does not apply

(see latest build log)

Root cause

Upstream bind9 commit e16a3d7a8e ("embed default sanitizer flags in executables", merged via 7c60b7da on 2026-04-05) added a new sources: default_sanitize_options, line directly after link_args: in the fuzz_binaries executable() block. The block also moved from meson.build:1584 to meson.build:1882, so the existing patch.diff hunk no longer matches its surrounding context.

The bind9 meson.options file already provides a proper fuzzing-backend combo option (none/afl/libfuzzer/oss-fuzz) and an oss-fuzz-args string option, replacing the need to manually inject -fsanitize=fuzzer via patch.

Changes

build.sh: Pass -Dfuzzing-backend=oss-fuzz -Doss-fuzz-args="$LIB_FUZZING_ENGINE" -Db_lundef=false to meson setup. The first two activate the upstream-supported integration path; the b_lundef=false flag is required by an explicit assertion in meson.build when any fuzzing backend is enabled with clang.

patch.diff: Drop the obsolete meson.build hunk (it tried to manually append -fsanitize=fuzzer, which is now handled by the oss-fuzz backend). Keep only the tests/meson.build hunk converting libtest = shared_library(...)static_library(...). The fuzz binaries depend on libtest_dep; keeping libtest static avoids a runtime libbindtest.so dependency that the OSS-Fuzz runner container cannot resolve.

Coverage

Baseline: Fuzz Introspector currently shows N/A because both the fuzzer and coverage builds have been failing. The last successful coverage report (2026-04-05) reported:

Metric Coverage
Line 21.23% (26334 / 124031)
Function 24.17% (1433 / 5928)
Region 16.57% (36638 / 221064)

After this fix (5 minutes of fuzzing per harness, then coverage build over the resulting corpus):

Aggregate (all harnesses combined): line 17.53% (21687/123741), function 21.61% (1280/5922), region 13.46% (29666/220328).

Harness Line Function Region
dns_master_load_fuzzer 4.53% 7.08% 3.33%
dns_message_checksig_fuzzer 7.68% 11.91% 5.65%
dns_message_parse_fuzzer 7.32% 9.72% 5.41%
dns_name_fromtext_target_fuzzer 0.72% 1.29% 0.48%
dns_name_fromwire_fuzzer 0.76% 1.40% 0.51%
dns_qp_fuzzer 0.54% 1.17% 0.38%
dns_qpkey_name_fuzzer 0.84% 1.53% 0.56%
dns_rdata_fromtext_fuzzer 5.07% 5.57% 4.24%
dns_rdata_fromwire_text_fuzzer 3.97% 5.67% 3.28%
isc_lex_getmastertoken_fuzzer 0.99% 1.62% 0.67%
isc_lex_gettoken_fuzzer 0.75% 1.38% 0.53%

The aggregate gap to the 2026-04-05 baseline (~3.7 line-coverage points) reflects the ~5 minute corpus generation budget vs. the long-accumulated production corpus; once OSS-Fuzz resumes daily fuzzing, the corpus will grow back to its previous reach.

@tc-agent
tc-agent force-pushed the fix-bind9-meson-fuzzing-backend branch from b5da83c to 5851b98 Compare April 10, 2026 21:58
@tc-agent
tc-agent force-pushed the master branch 28 times, most recently from 7488d4b to 543eb9b Compare April 12, 2026 22:07
@tc-agent
tc-agent force-pushed the master branch 13 times, most recently from 496e7c9 to 9f35b26 Compare April 30, 2026 09:18
@tc-agent
tc-agent force-pushed the master branch 5 times, most recently from 80dc05a to 7143a4d Compare May 8, 2026 14:19
@tc-agent
tc-agent force-pushed the fix-bind9-meson-fuzzing-backend branch from 5851b98 to b4a44c8 Compare May 8, 2026 14:55
@tc-agent tc-agent changed the title bind9: fix build broken by upstream fuzzing-backend meson option bind9: fix broken build May 8, 2026
@github-actions

github-actions Bot commented May 8, 2026

Copy link
Copy Markdown

Fuzzing Coverage Report

Tested: project bind9 · base b4ad4f8 → head 3be7869 · 300s total fuzz budget · updated 2026-05-28 12:21 UTC · workflow run

Metric Before After Delta
Static reachability 12.9% (1248/9683) 12.9% (1248/9683) +0.0%
Line coverage 0% 17.6% (21894/124127) new
Branch coverage 0% 11.7% (13056/111765) new
Function coverage 0% 21.5% (1279/5936) new

Per-harness

Harness Lines before Lines after Δ
dns_master_load_fuzzer 0% 4.3% (5302/123058) new
dns_message_checksig_fuzzer 0% 7.7% (9431/123266) new
dns_message_parse_fuzzer 0% 7.6% (9297/123107) new
dns_name_fromtext_target_fuzzer 0% 0.7% (876/123035) new
dns_name_fromwire_fuzzer 0% 0.8% (928/123171) new
dns_qp_fuzzer 0% 0.5% (664/123397) new
dns_qpkey_name_fuzzer 0% 0.8% (1030/123053) new
dns_rdata_fromtext_fuzzer 0% 5.7% (7018/123093) new
dns_rdata_fromwire_text_fuzzer 0% 4.4% (5371/123128) new
isc_lex_getmastertoken_fuzzer 0% 0.9% (1142/123047) new
isc_lex_gettoken_fuzzer 0% 0.7% (917/123036) new

Δ = (after − before) / before, to accommodate that denominators may change. "new" when before is 0; "deleted" when after is 0.

@tc-agent tc-agent added the ready label May 8, 2026
@tc-agent
tc-agent force-pushed the master branch 4 times, most recently from 4e78c9b to 92a5bd8 Compare May 8, 2026 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant