Skip to content

Add absolution-based fuzzing#215

Open
N3ur0sis wants to merge 2 commits into
masterfrom
aro/fuzzing-framework
Open

Add absolution-based fuzzing#215
N3ur0sis wants to merge 2 commits into
masterfrom
aro/fuzzing-framework

Conversation

@N3ur0sis

Copy link
Copy Markdown

Checklist

  • App update process has been followed
  • Target branch is develop
  • Application version has been bumped

@github-actions

Copy link
Copy Markdown
Contributor

Code coverage report

Code Coverage

Per-file coverage
Package Line Rate Branch Rate Health
src.transaction 85% 58%
Summary 85% (50 / 59) 58% (28 / 48)

@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.44%. Comparing base (383782c) to head (b903542).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #215   +/-   ##
=======================================
  Coverage   72.44%   72.44%           
=======================================
  Files           5        5           
  Lines          98       98           
  Branches       22       22           
=======================================
  Hits           71       71           
  Misses          9        9           
  Partials       18       18           
Flag Coverage Δ
unittests 72.44% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@N3ur0sis N3ur0sis marked this pull request as ready for review June 25, 2026 12:25
@N3ur0sis N3ur0sis requested a review from a team as a code owner June 25, 2026 12:25
@N3ur0sis N3ur0sis requested review from agrojean-ledger and Copilot and removed request for a team June 25, 2026 12:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an SDK-driven, coverage-guided fuzzing setup for the boilerplate app (including ClusterFuzzLite integration), and tightens status-word handling for crypto derivation failures to avoid bogus/truncated SW values.

Changes:

  • Replace the legacy standalone transaction-parser fuzzer with the Ledger Secure SDK fuzzing framework + Absolution-based state prefixing.
  • Add fuzzing harness/mocks/manifests/invariants and update docs + gitignore for the new workflow.
  • Update ClusterFuzzLite build to fetch a pinned Secure SDK revision and build/package the framework-based fuzz targets.

Reviewed changes

Copilot reviewed 16 out of 41 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/handler/get_public_key.c Avoids returning truncated cx_err_t as a 16-bit status word by mapping derive failures to SWO_SECURITY_ISSUE.
fuzzing/README.md Replaces the old fuzzer instructions with framework-based campaign usage and artifact layout.
fuzzing/mock/scenario_layout.h Adds generated Absolution prefix layout constants for the harness.
fuzzing/mock/mocks.h Declares fuzzer control/tail globals and required framework symbols.
fuzzing/mock/mocks.c Provides fuzz-build stubs (e.g., PRINTF, BSS-zero no-op) and control/tail globals.
fuzzing/macros/exclude_macros.txt Adds macro-exclusion list for fuzz builds (e.g., stripping PRINTF macro define).
fuzzing/invariants/zero-symbols.txt Defines app-local globals to pin/zero in the invariant to conserve prefix bytes.
fuzzing/invariants/domain-overrides.txt Constrains key enum/state domains to improve convergence and unlocks swap/mock toggles.
fuzzing/harness/fuzz_dispatcher.c Adds the app-specific fuzz harness dispatcher and optional swap-callback lane.
fuzzing/fuzz-manifest.toml Introduces the fuzz target manifest (coverage key files, dictionary, seeds, exclusions).
fuzzing/fuzz_tx_parser.c Removes the legacy LibFuzzer transaction-parser-only target.
fuzzing/extra/TxParser.cmake Removes the legacy standalone txparser build helper.
fuzzing/CMakeLists.txt Switches to LedgerAppFuzz.cmake + ledger_fuzz_add_app_target() build model.
fuzzing/base-corpus/.compat-key Adds compatibility key for validating base-corpus reuse across builds.
.gitignore Ignores new .fuzz-artifacts/ and generated invariant snapshot.
.clusterfuzzlite/Dockerfile Moves to OSS-Fuzz base-builder and fetches a pinned Secure SDK revision with fuzz framework.
.clusterfuzzlite/build.sh Reworks build to use SDK scripts for configuring/building targets and generating seed corpus zip.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread fuzzing/CMakeLists.txt
Comment on lines +23 to +26
file(GLOB_RECURSE C_SOURCES
"${APP_SOURCE_DIR}/src/*.c"
"${CMAKE_SOURCE_DIR}/mock/*.c"
)
@N3ur0sis N3ur0sis changed the title Aro/fuzzing framework Add absolution-based fuzzing Jun 25, 2026
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.

2 participants