build: fix RELOC_SECTION security check for bitcoin-util #20939

pull fanquake wants to merge 1 commits into bitcoin:master from fanquake:fix_bitcoin_util_reloc_section changing 1 files +9 −0
  1. fanquake commented at 3:11 AM on January 15, 2021: member

    The binutils we use for gitian builds strips the reloc section from Windows binaries, which breaks ASLR. As a temporary workaround, export main(). This is the same workaround as #18702 (bitcoin-cli), and will fix the currently failing security check:

    + make -j1 -C src check-security
    make: Entering directory '/home/ubuntu/build/bitcoin/distsrc-x86_64-w64-mingw32/src'
    Checking binary security...
    bitcoin-util.exe: failed RELOC_SECTION
    make: *** [check-security] Error 1
    

    Relevant upstream issue: https://sourceware.org/bugzilla/show_bug.cgi?id=19011

  2. fanquake added the label Build system on Jan 15, 2021
  3. build: fix RELOC_SECTION security check for bitcoin-util
    The binutils we use for gitian builds strips the reloc section from
    Windows binaries, which breaks ASLR. As a temporary workaround, export
    main(). This is the same workaround as #18702 (bitcoin-cli), and will
    fix the currently failing security check:
    ```bash
    + make -j1 -C src check-security
    make: Entering directory '/home/ubuntu/build/bitcoin/distsrc-x86_64-w64-mingw32/src'
    Checking binary security...
    bitcoin-util.exe: failed RELOC_SECTION
    make: *** [check-security] Error 1
    ```
    
    Relevant upstream issue:
    https://sourceware.org/bugzilla/show_bug.cgi?id=19011
    c061800bb1
  4. fanquake force-pushed on Jan 15, 2021
  5. dongcarl commented at 4:47 AM on January 15, 2021: member

    ACK c061800bb17ce8005ac7b189135dd7e95155e7de


    Let's fix the builds and see if we need https://github.com/bitcoin/bitcoin/blob/3b6d1b61d31674e033e821046baa95c66dedf623/src/bitcoin-cli.cpp#L932-L934 later

    Tested on my windows machine and nothing failed catastrophically

  6. MarcoFalke added the label Needs gitian build on Jan 15, 2021
  7. laanwj commented at 2:34 PM on January 16, 2021: member

    Good catch!

    ACK c061800bb17ce8005ac7b189135dd7e95155e7de

  8. laanwj merged this on Jan 17, 2021
  9. laanwj closed this on Jan 17, 2021

  10. sidhujag referenced this in commit dd5dc2411a on Jan 17, 2021
  11. DrahtBot commented at 3:42 AM on January 18, 2021: member

    <!--a722867cd34abeea1fadc8d60700f111-->

    Gitian builds

    File commit 30e664dcce1a9adb9ba9a29e4f0cf809767870dd<br>(master) commit 05522264a9c9090954691730db1a09fce0f26d52<br>(master and this pull)
    *-osx-unsigned.dmg 61b5ab6e94391ec7... 3934a6307e1fb48e...
    *-osx64.tar.gz e92276d46559f171... eb19a3af6c642a24...
    *.tar.gz 9be6af995f6e4f3b... 990b1ba73ce128b7...
    bitcoin-core-osx-22-res.yml 4565877b1ef9f4a5... c84cb124adbc13c3...
    linux-build.log 975ec704d8675956... 007cab9fc0111a21...
    osx-build.log 4a491ad2d3ee3430... 67575dc86a235c8c...
    win-build.log 6da2ae4d2d5c8c0b... e9c32782c0782a6c...
    *-win64-debug.zip 6993364235f1b77b...
    *-win64-setup-unsigned.exe 46c326efb04bf933...
    *-win64.zip 1d3d134ed9a5c97b...
    bitcoin-core-osx-22-res.yml.diff 3ef0e957fb7d7ebd...
    bitcoin-core-win-22-res.yml 1111c84cf83d4d5d...
    linux-build.log.diff fc78b7561dd76dee...
    osx-build.log.diff 0207ec427d530105...
    win-build.log.diff 649e332f288fccd4...
  12. DrahtBot removed the label Needs gitian build on Jan 18, 2021
  13. DrahtBot locked this on Aug 16, 2022
  14. fanquake deleted the branch on Nov 9, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-25 21:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me