7 Commits

Author SHA1 Message Date
MarcoFalke
fa8d56f9f0
fuzz: Reject too large descriptor leaf sizes in scriptpubkeyman target 2026-01-08 14:26:29 +01:00
MarcoFalke
333333356f
fuzz: [refactor] Use std::span over FuzzBufferType in descriptor utils
They are exactly the same, but the descriptor utils should not prescribe
to use the FuzzBufferType. Using a dedicated type for them clarifies
that the utils are not tied to FuzzBufferType.

Also, while touching the lines, use `const` only where it is meaningful.
2026-01-08 12:18:01 +01:00
Antoine Poinsot
bc34bc2888
fuzz: limit the number of nested wrappers in descriptors
The script building logic performs a quadratic number of copies in the
number of nested wrappers in the miniscript. Limit the number of nested
wrappers to avoid fuzz timeouts.

Thanks to Marco Falke for reporting the fuzz timeouts and providing a
minimal input to reproduce.
2024-07-14 17:47:40 +02:00
Antoine Poinsot
8d7340105f
fuzz: limit the number of sub-fragments per fragment for descriptors
This target may call into logic quadratic over the number of
sub-fragments. Limit the number of sub-fragments to keep the runtime
reasonable.

Thanks to Marco Falke for reporting the fuzz timeouts with a minimized
input.
2024-07-14 17:46:40 +02:00
Hennadii Stepanov
56e1e5dd10
refactor, bench, fuzz: Drop unneeded UCharCast calls
The `CKey::Set()` template function handles `std::byte` just fine.
2024-04-06 15:46:53 +01:00
Antoine Poinsot
a44808fb43
fuzz: rule-out too deep derivation paths in descriptor parsing targets
This fixes the reported timeouts and direct the target cycles toward what it's intended to fuzz: the descriptor syntax.
2023-12-31 16:19:56 +01:00
brunoerg
2e1833ca13 fuzz: move MockedDescriptorConverter to fuzz/util 2023-11-20 15:57:50 -03:00