mirror of
https://github.com/bitcoin/bitcoin
synced 2026-12-04 10:29:40 +00:00
fuzz: add coverage for GetQueryParameterFromUri #35964
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!35964
Loading…
Reference in a new issue
No description provided.
Delete branch "fuzz-query-parameter"
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?
GetQueryParameterFromUri()parses the query string of a request targetsupplied by a remote client. It is reached from the REST interface for the
count,offset,size,verboseandmempool_sequenceparameters, but hadno fuzz coverage.
This adds an
http_query_parametertarget. Besides running the parser onarbitrary input, it round-trips a URL-encoded key/value pair back through it and
checks the cases that are easy to get wrong:
=, which is an empty value rather than a missing one#, where the parser must returnthe value found before the
#and ignore the later occurrence, sinceeverything from the fragment separator onwards is not part of the query
string
Testing
Built the fuzz binary and ran the new target against a temporary corpus
directory, capped at 10,000 executions:
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
No conflicts as of last run.
Concept ACK
Left a few minor suggestions. Please let me know what you think
ec1f8dca31238b7a5c97afc88332b27f026ab588: fuzz: add coverage for GetQueryParameterFromUri
nit: Prefer matching the style of the above and using the shortened path names.
ec1f8dca31238b7a5c97afc88332b27f026ab588: fuzz: add coverage for GetQueryParameterFromUri
The PR text states that this proves we "ignore the later occurrence" after
#. However, because an identical key name sits before#, the first match wins and treating#like&still passes. In order to prove that statement, I think we need a lookup whosekeyexists only after#.The
?character must precede#and thedummyname cannot matchkeyname.tACK
a7ecf9c83c🐙 This pull request conflicts with the target branch and needs rebase.
🚧 At least one of the CI tasks failed.
Task
ASan + LSan + UBSan + integer: https://github.com/bitcoin/bitcoin/actions/runs/36252212318/job/108432231941LLM reason (✨ experimental): CI failed to compile the fuzz target due to an undeclared identifier
http_bitcoininsrc/test/fuzz/http_request.cpp.Hints
Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:
Possibly due to a silent merge conflict (the changes in this pull request being
incompatible with the current code in the target branch). If so, make sure to rebase on the latest
commit of the target branch.
A sanitizer issue, which can only be found by compiling with the sanitizer and running the
affected test.
An intermittent issue.
Leave a comment here, if you need help tracking down a confusing failure.
No opinion on the changes here, but please squash your commits according to https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#squashing-commits
Base:
c8e852d3a02a73d473228232148163cdbc8f7bb0Head:
cdd6222c4fb42091ebc753915d94e8f267a8bd86I found no actionable issues in this static review.
Full review report
are you still working on this or can it be closed?
@marcofleon @pinheadmz you might have an opinion on these changes?