mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 10:50:37 +00:00
fuzz: fix timelock range in miniscript_smart #36996
No reviewers
Labels
No labels
Android
Backport
Block storage
Brainstorming
Bug
Build system
CI failed
Consensus
Data corruption
Descriptors
Docs
DrahtBot Guix build requested
Feature
Fuzzing
GUI
Good First Review
IPC
Insufficient Review
Kernel
Linux/Unix
Mempool
Mining
Needs Backport (31.x)
Needs Backport (32.x)
Needs Benchmark
Needs Conceptual Review
Needs backport (30.x)
Needs rebase
Needs release note
Net
P2P
PSBT
Privacy
Private Broadcast
Questions and Help
RPC/REST/ZMQ
Refactoring
Resource usage
Review club
Scripts and tools
Settings
TX fees and policy
Tests
Tracking Issue
UTXO Db and Indexes
Up for grabs
Upstream
Utils/log/libs
Validation
Waiting for author
Wallet
Windows
good first issue
interfaces
macOS
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin/bitcoin!36996
Loading…
Reference in a new issue
No description provided.
Delete branch "fuzz-miniscript-smart-timelock"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
ConsumeNodeSmartdrawsolder()/after()values from[1, 0x7FFFFFF], one F short of the[1, 0x7FFFFFFF]range used by the stable target.after()never reachesLOCKTIME_THRESHOLD, sominiscript_smartnever builds time-basedafter()nodes and never exercises the height/time timelock mixing checks inComputeType.Use
std::numeric_limits<int32_t>::max()for the bound in both targets instead of hand-counted hex literals.With the fix, replaying the existing qa-assets corpus hits the mixing branches that previously had 0 hits (libFuzzer edges go from 8829 to 8841), and a 5 minute run covers the remaining ones. The corpus stays valid since the byte consumption stays the same.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
External sites
Reviews
See the guideline and AI policy for information on the review process.
If your review is incorrectly listed, please copy-paste
<!--meta-tag:bot-skip-->into the comment that the bot should ignore.Conflicts
Reviewers, this pull request conflicts with the following ones:
src/test/fuzzand treat them as errors by hebasto)If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
No findings were published from this review.
Review coverage was incomplete.
Reviewed:
54be7fb7e172· Review report · Previous reportspermalink
Not sure about having to count manually before and after this pull. Why not
std::numeric_limits<int32_t>::max()to fix this wholesale?Thanks for the fast review. I've also updated another place in the same file that used manually written hex that could be replaced by
std::numeric_limits<int32_t>::max()tACK 54be7fb
Built with
-DBUILD_FOR_FUZZING=ON -DSANITIZERS=fuzzerthe coverage increasedcov 4670 -> 4681Overall, this change makes sense since we were not covering the full range, and now we are.
crACK
54be7fb7e1For what it's worth i think
SEQUENCE_LOCKTIME_DISABLE_FLAGis more self-documenting than int32_t::max() here. (Not worth changing now, just saying. --And thanks for fixing a bug i introduced.)