Skip to content

ci(cli-fuzz): set ASAN detect_leaks=0 to avoid abort-path false positive - #451

Merged
fcostaoliveira merged 2 commits into
masterfrom
fix/cli-fuzz-detect-leaks-off
Jun 3, 2026
Merged

fcostaoliveira merged 2 commits into
masterfrom
fix/cli-fuzz-detect-leaks-off

Conversation

@fcostaoliveira

@fcostaoliveira fcostaoliveira commented Jun 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The nightly CLI fuzz hit a sanitizer-only abort with argv=['--authenticate', '', '--cluster-mode'] (against a no-auth server). The connection-stage supervisor (#431) correctly fires within 3 s (after #449), but the abort path tears down a partially-initialised cluster_client; LSAN flags the unreleased allocations at __cxa_finalize; ASAN_OPTIONS=abort_on_error=1 converts that to SIGABRT.

Release builds exit cleanly. The leak class is on the supervisor-abort path, not introduced by any specific CLI input. Tracked in #450.

Turn off detect_leaks in this fuzzer's harness while keeping abort_on_error=1 so any real ASAN catch (UAF, OOB, double-free) still fails loudly. Steady-state leak coverage continues via asan.yml.

Test plan

  • Re-run workflow_dispatch on master to confirm the nightly fuzz now completes
  • CI green

Note

Low Risk
Test-only change that excludes one documented argv combination from fuzzing; no production code paths are modified.

Overview
The nightly CLI fuzz test now skips Hypothesis examples that combine --cluster-mode with --authenticate '' (empty password) against a no-auth server.

That argv shape triggers the connection-stage supervisor abort while cluster_client is only partly initialized; LSAN then reports leaks at teardown and, with abort_on_error=1, the run looks like a crash. The test uses assume(False) so Hypothesis discards those cases and keeps searching, which avoids turning off leak detection for every other generated argv (see #450).

Reviewed by Cursor Bugbot for commit 51a255d. Bugbot is set up for automated code reviews on this repo. Configure here.

The nightly CLI fuzz hit a sanitizer-only abort with argv shapes like
'--authenticate "" --cluster-mode' against a no-auth server: the
connection-stage supervisor (#431) fires while cluster_client is
mid-initialisation, the abort path tears down partial cluster_client
state, and LSAN flags the unreleased allocations at __cxa_finalize,
which the harness's abort_on_error=1 converts to SIGABRT.

Release builds exit cleanly; the issue is sanitizer-only and is on
the supervisor-abort path, not the CLI input. Tracked separately in
#450.

This fuzzer's primary purpose is finding crashes/hangs from CLI
shapes; steady-state leak coverage already comes from asan.yml. Turn
off detect_leaks here while keeping abort_on_error=1 so any real
ASAN catch (UAF, OOB, double-free) still fails loudly.

Refs: nightly cli-fuzz failures on 03ef76e + 1142696.
@jit-ci

jit-ci Bot commented Jun 3, 2026 •

Copy link
Copy Markdown

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

R3 review feedback on the prior approach (blanket detect_leaks=0):
turning LSAN off in the only nightly that exercises diverse argv
shapes silently dropped leak coverage on the exact cluster_client
region #450 is about.

Switched approach:
- Re-enable detect_leaks=1 in cli-fuzz-nightly.yml
- Add a Hypothesis assume(False) guard in test_cli_fuzz_does_not_crash
  for the known --authenticate '' + --cluster-mode combo so the
  example is discarded and Hypothesis keeps searching.

Net: LSAN now catches leaks on every other argv shape (including
single-flag --cluster-mode runs, --authenticate against an
auth-enabled server, etc.) -- only the one combo tracked in #450 is
skipped, with a comment linking to that issue.
@fcostaoliveira

Copy link
Copy Markdown
Collaborator Author

Switched to R3's option (b) per review: re-enabled detect_leaks=1 in the workflow and added a Hypothesis assume(False) guard in test_cli_fuzz_does_not_crash for the specific --authenticate '' --cluster-mode combo. Net: LSAN is back on for every other argv shape so any new leak class introduced by a different CLI pattern still fires; only the one combo tracked in #450 is skipped, with an inline comment pointing at that issue.

@fcostaoliveira
fcostaoliveira merged commit c3546a4 into master Jun 3, 2026
95 of 96 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant