Skip to content

Conversation

fanquake
Copy link
Member

@fanquake fanquake commented Apr 23, 2020

Currently backports the following to the 0.20 branch:

achow101 and others added 5 commits April 23, 2020 13:32
automake is needed to build osslsigncode otherwise autogen.sh fails.

Github-Pull: bitcoin#18598
Rebased-From: e44aeef
ASLR is not currently working for the bitcoin-cli.exe binary. This is
due to it not having a .reloc section, which is stripped by default by
the mingw-w64 ld we use for gitian builds. A good summary of issues with
ld and mingw-w64 is available in this thread:
https://sourceware.org/bugzilla/show_bug.cgi?id=19011.

All other Windows binaries that we distribute (bitcoind, bitcoin-qt,
bitcoin-wallet, bitcoin-tx and test_bitcoin) do not suffer this issue,
and currently having working ASLR. This is due to them exporting
(inadvertent or not) libsecp256k1 symbols, and, as a result, the .reloc
section is not stripped by ld.

This change is a temporary workaround, also the same one described here:
https://www.kb.cert.org/vuls/id/307144/, that causes main() to be
exported. Exporting a symbol will mean that the .reloc section is not
stripped, and ASLR will function correctly.

Github-Pull: bitcoin#18702
Rebased-From: 315a4d3
@fanquake fanquake added this to the 0.20.0 milestone Apr 23, 2020
Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

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

ACK a9ca65b, locally backported and got zero diff with this PR.

@maflcko
Copy link
Member

maflcko commented Apr 27, 2020

There will be a few more backports, so I suggest piling them all up here and do one merge for rc2.

@fanquake
Copy link
Member Author

fanquake commented Apr 27, 2020

There will be a few more backports, so I suggest piling them all up here

That was the intent

@laanwj
Copy link
Member

laanwj commented May 11, 2020

ACK 7f7548d

It looks like 0.20.0 ran out of steam, to keep things moving a bit I'm going to merge this now.

@laanwj laanwj merged commit fb5b098 into bitcoin:0.20 May 11, 2020
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
@fanquake fanquake deleted the 0_20_rc2_backports branch August 2, 2022 10:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants