Skip to content
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

Backport and bump secp256k1 to 0.24.2 #558

Closed

Conversation

tcharding
Copy link
Member

@tcharding tcharding commented Dec 6, 2022

Needs base branch changing to an as-yet-uncreated secp256k1-0.24.x if we want this backport.

Backport #548 and bump version ready for release.

apoelstra and others added 3 commits December 6, 2022 12:32
Fixes unsoundness in `preallocated_gen_new` which previously did not
properly constrain the lifetime of the buffer used to back the context
object. We introduce an unsafe marker trait, and impl it for our
existing preallocated-context markers.

Annoyingly the trait has to be public even though it should never be
used directly, and is only used alongside the sealed `Context` trait,
so it is de-facto sealed itself.

Fixes rust-bitcoin#543
Add `# Safety` section to the rustdocs of the `PrealocatedContext`
trait. This change was back ported manually (instead of directly
cherry-picking the patch) so as to add a blank newline after the heading
as is customary.

Original: `commit 1e6eb6c`
Done after backport to fix unsoundness issue.
@apoelstra
Copy link
Member

I'm not sure what you intended with this PR -- if you meant to bump the version to 0.24.2 then that's the only thing that needs bo be done since #548 is already merged.

If you meant to backport, the correct version is not 0.24.2 and the correct target branch is not master.

@Kixunil Kixunil mentioned this pull request Dec 7, 2022
apoelstra added a commit that referenced this pull request Dec 7, 2022
5c6225e Bump version to 0.24.2 (Tobin C. Harding)
0a696b2 Add saftey docs for PreallocatedContext trait (Tobin C. Harding)
dd194b6 context: introduce unsafe `PreallocatedContext` trait (Andrew Poelstra)

Pull request description:

  I believe this is what tcharding meant by #558

ACKs for top commit:
  apoelstra:
    utACK 5c6225e

Tree-SHA512: 54cac9bd146e9dd32cf28f3a914053c7a68e99756e29431e0324691b2ef803dac044bb7002183c2773e042ac5f34f3a43646e46823bc1349ffb34f2eaa4c42a6
@tcharding
Copy link
Member Author

So you don't want to do a 0.24.x point release with just this fix? We did 0.22 and 0.23 and the upcoming release is 0.25 so anyone that stays on 0.24 will miss this fix.

@tcharding tcharding closed this Dec 7, 2022
@tcharding tcharding deleted the backport-and-bump-0.24.2 branch December 7, 2022 20:37
@Kixunil
Copy link
Collaborator

Kixunil commented Dec 7, 2022

@tcharding I opened #559 for you :)

@tcharding
Copy link
Member Author

tcharding commented Dec 7, 2022

Thanks man, I was dead confused by #559 until I worked out you used my branch and the correct target branch :)

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.

None yet

3 participants