Skip to content

Backport of #809: fix crash in Descriptor::parse_desc#810

Merged
apoelstra merged 3 commits intorust-bitcoin:release-12.xfrom
apoelstra:2025-04--backport-809
Apr 29, 2025
Merged

Backport of #809: fix crash in Descriptor::parse_desc#810
apoelstra merged 3 commits intorust-bitcoin:release-12.xfrom
apoelstra:2025-04--backport-809

Conversation

@apoelstra
Copy link
Copy Markdown
Member

Backports #809 and does another patch release.

When parsing a descriptor with `Descriptor::parse_descriptor`, we first parse
as a string and then parse the keys. We fail to consider parsing errors
in the keys, resulting in a panic.

Also, clean up the panic message so it's clearer what's going on.
@apoelstra
Copy link
Copy Markdown
Member Author

Also present in 11.x and 10.x. 9.x and before are unaffected. I think I should do the two other backports, though I'll wait for an ACK on the main PR first.

@apoelstra
Copy link
Copy Markdown
Member Author

cc @sanket1729 can you review this? It may be easier to just read it independently of #810 since it's a smaller change to avoid any API changes.

Copy link
Copy Markdown
Member

@sanket1729 sanket1729 left a comment

Choose a reason for hiding this comment

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

ACK b83e787

@apoelstra apoelstra force-pushed the 2025-04--backport-809 branch from b83e787 to 212d78a Compare April 28, 2025 22:54
@apoelstra
Copy link
Copy Markdown
Member Author

Oops, I forgot to update the lockfiles on this one.

Copy link
Copy Markdown
Member

@sanket1729 sanket1729 left a comment

Choose a reason for hiding this comment

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

reACK 212d78a

Copy link
Copy Markdown
Member Author

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

On 212d78a successfully ran local tests

@apoelstra apoelstra merged commit ce9c50f into rust-bitcoin:release-12.x Apr 29, 2025
10 of 12 checks passed
@apoelstra apoelstra deleted the 2025-04--backport-809 branch April 29, 2025 13:28
@apoelstra
Copy link
Copy Markdown
Member Author

Tagged and published. I will do the other backports today.

apoelstra added a commit that referenced this pull request May 3, 2025
06400b1 bump patch version of 10.2 (Andrew Poelstra)
1fed0ec add regression test for #806 (Andrew Poelstra)
2f21e23 descriptor: fix key parsing error handling in parse_desc (Andrew Poelstra)
0e40319 ci: update CI job to run all the fuzz tests (Andrew Poelstra)
6ff58af lib: remove some deny lints (Andrew Poelstra)

Pull request description:

  Backports #809 to 10.x. This is a direct rebase of #810 except that I added a commit with some lint fixes. (I had been avoiding this, but we've been having a lot of backports lately so I think I ought to just address it.)

  After this I will do 11.x.

ACKs for top commit:
  sanket1729:
    utACK 06400b1

Tree-SHA512: 6a30480becf20aa64e1f4528cf0d1df75bd2ddbaad95ae6bd4a3f5885624a791c7d7a77020b27675c348b2ff95467e0cb8bb42ca2c58112d7322f75480608dca
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