-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Track tree depth to avoid stack overflow #704
Merged
apoelstra
merged 3 commits into
rust-bitcoin:master
from
sanket1729:sanketk/24-07/dos-bug
Jul 9, 2024
Merged
Track tree depth to avoid stack overflow #704
apoelstra
merged 3 commits into
rust-bitcoin:master
from
sanket1729:sanketk/24-07/dos-bug
Jul 9, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sanket1729
force-pushed
the
sanketk/24-07/dos-bug
branch
from
July 8, 2024 16:11
766640c
to
855835b
Compare
merged #697 -- can you rebase this? |
sanket1729
force-pushed
the
sanketk/24-07/dos-bug
branch
from
July 8, 2024 18:58
855835b
to
dfabe2d
Compare
Looks like the new test is failing. |
sanket1729
force-pushed
the
sanketk/24-07/dos-bug
branch
from
July 8, 2024 20:26
dfabe2d
to
14f0d7c
Compare
@apoelstra, the new test was not testing the correct thing :) . This is now fixed. 🤞 CI passes this time. |
@apoelstra ready for review. |
apoelstra
approved these changes
Jul 9, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 14f0d7c
Needs backport. |
Opened #705 to release new 12.x version. |
apoelstra
added a commit
that referenced
this pull request
Jul 14, 2024
fd823e8 release 11.1.0 (Andrew Poelstra) 0d28ebc Add offending test case (Sanket Kanjalkar) 351b192 Track miniscript tree depth explicitly (Sanket Kanjalkar) Pull request description: ACKs for top commit: apoelstra: ACK fd823e8 Tree-SHA512: 643309ed7b0f3c32b52c9fba59b6973c3a3f017b2f5f083c6623205e40f641c707a4aab469f00d48975df100604bc109aa1005abe8ec1d9e4d132b9b0e38c46b
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We track tree depth at the time of parsing, but that is insufficient because wrappers also count towards the stack limit when creating
Miniscript
structure.We could also fix this by fixing the wrappers to be limited to size 10 or something(wrappers are only for transformation of types, they don't provide any additional functionality).
Long term we want to move towards to complete non-recursive parsing, this is a good stop gap solution to address the current issues.