< luke-jr> did anyone ever confirm that #17740 doesn't reintroduce CVE-2012-1910?
< gribble> https://github.com/bitcoin/bitcoin/issues/17740 | build: remove configure checks for win libraries we dont link against by fanquake · Pull Request #17740 · bitcoin/bitcoin · GitHub
< fanquake> luke-jr: Those checks don't determine what is linked against
< fanquake> From what I remember we did discuss that in the issue, and the only libs that were removed were unused.
< luke-jr> fanquake: it's supposed to
< fanquake> You're right. I've just re-read, and at the time I did check that none of those libs were being passed to the linker
< luke-jr> which makes my question: have we reintroduced it previously? XD
< fanquake> luke-jr: I'll look. btw if you've got time can you rebase #15704
< gribble> https://github.com/bitcoin/bitcoin/issues/15704 | Move Win32 defines to configure.ac to ensure they are globally defined by luke-jr · Pull Request #15704 · bitcoin/bitcoin · GitHub
< luke-jr> well, of course it won't be linking with the removed checks _now_ :P
< luke-jr> if I add the AC_CHECK_LIB back in, it seems to link to it
< fanquake> luke-jr: It's the same for something like winspool though right? It'll link to it even though we don't use it
< luke-jr> fanquake: using threads in mingw requires linking it
< luke-jr> otherwise we get thread-unsafe stuff linked in
< fanquake> Can you point to any mingwthrd documentation? I'm struggling to find anything that isn't close to 10+ years old
< luke-jr> -mthreads
< luke-jr> Support thread-safe exception handling on MinGW. Programs that rely on thread-safe exception handling must compile and link all code with
< luke-jr> the -mthreads option. When compiling, -mthreads defines -D_MT; when linking, it links in a special thread helper library -lmingwthrd which
< luke-jr> cleans up per-thread exception-handling data.
< luke-jr> from `man gcc`
< luke-jr> (-mthreads IIRC is itself broken for static linking though)
< * fanquake> looking
< luke-jr> wumpus: ping^ in case you investigated already
< fanquake> luke-jr: I can’t test right now but will by the end of the day
< luke-jr> I'm working on it; will just dig out the Windows test box
< fanquake> Just make sure you update it first so you don’t get RCE’d
< luke-jr> RCE'd?
< luke-jr> or I should ask: which one? :p
< luke-jr> 21633 ? S 0:00 /usr/bin/i686-w64-mingw32-g++-posix -std=c++11 -fstack-reuse=none -Wstack-protector -fstack-protector-all -fPIE -pipe -O2 -O2 -g -fno-ident -fvisibility=hidden -Wl,--exclude-libs -Wl,ALL -pthread -Wl,--dynamicbase -Wl,--nxcompat -pie -static -Wl,--large-address-aware -o bitcoin-cli.exe bitcoin_cli-bitcoin-cli.o bitcoin-cli-res.o -L/home/ubuntu/build/bitcoin/depends/i686-w64-mingw32/share/../lib libbitcoin_cli.a
< luke-jr> univalue/.libs/libunivalue.a libbitcoin_util.a crypto/libbitcoin_crypto_base.a crypto/libbitcoin_crypto_sse41.a crypto/libbitcoin_crypto_avx2.a crypto/libbitcoin_crypto_shani.a -lboost_system-mt-s-x32 -lboost_filesystem-mt-s-x32 -lboost_thread-mt-s-x32 -levent -lQt5AccessibilitySupport -lQt5DeviceDiscoverySupport -lQt5FbSupport -lQt5ThemeSupport -lQt5EventDispatcherSupport -lQt5FontDatabaseSupport -lssp -liphlpapi -lshlwapi -lws2_32 -
< luke-jr> ladvapi32 -luuid -loleaut32 -lole32 -lcomctl32 -lshell32 -lwinmm -lcomdlg32 -lgdi32 -luser32 -lkernel32 -lmingwthrd -pthread
< luke-jr> so -lmingwthrd is definitely being passed here
< fanquake> luke-jr: looking at the mingw-w64 source, in regards to mingwthrd I'm seeing: As _CRT_MT is getting defined in libgcc when using shared version, or it is getting defined by startup code itself, this library is a dummy version for supporting the link library for gcc's option -mthreads. As we support TLS-cleanup even without specifying this library, this library is deprecated and just kept for compatibility.
< fanquake> The only code in mingwthrd_mt.c is: int _CRT_MT_OLD = 1;
< fanquake> mingwthrd_mt.c is the source for libmingwthrd.a
< luke-jr> that file hasn't changed since Date: Fri Jun 26 10:49:35 2009 +0000
< fanquake> Yea I'm looking at the history now. Those changes happened in 22b6398a8acf17e6687375c414fae832888de53a
< luke-jr> we also don't have a minimum mingw version afaik
< luke-jr> if we decide to bump it, we should also check it meets the required version
< luke-jr> that commit first released in 2.0, sometime after Date: Tue Oct 4 15:17:14 2011 +0000
< luke-jr> but CVE-2012-1910 was Date: 2012-03-17
< fanquake> Right, because gitian builds would likely have been done with an older version of mingw-w64
< * luke-jr> checking that
< fanquake> Need to find out what version of mingw-w64 was shipping with ubuntu lucid
< fanquake> *mingw32
< luke-jr> Version: 3.15.2-0ubuntu1
< luke-jr> :/
< luke-jr> there is no 3.15 tho
< luke-jr> mingwrt-3.15.2-mingw32/include/_mingw.h:#define __MINGW32_VERSION 3.15.2
< luke-jr> sigh
< luke-jr> I propose we just add mingwthrd back in. It's harmless at worst.
< luke-jr> 26805 ? S 0:00 /usr/bin/x86_64-w64-mingw32-g++-posix -std=c++11 -fstack-reuse=none -Wstack-protector -fstack-protector-all -fPIE -pipe -O2 -O2 -g -fno-ident -fvisibility=hidden -Wl,--exclude-libs -Wl,ALL -pthread -Wl,--dynamicbase -Wl,--nxcompat -Wl,--high-entropy-va -pie -static -o bitcoind.exe bitcoind-bitcoind.o bitcoind-res.o -L/home/ubuntu/build/bitcoin/depends/x86_64-w64-mingw32/share/../lib libbitcoin_server.a libbitcoin_
< luke-jr> wallet.a libbitcoin_common.a univalue/.libs/libunivalue.a libbitcoin_util.a libbitcoin_zmq.a libbitcoin_consensus.a crypto/libbitcoin_crypto_base.a crypto/libbitcoin_crypto_sse41.a crypto/libbitcoin_crypto_avx2.a crypto/libbitcoin_crypto_shani.a leveldb/libleveldb.a crc32c/libcrc32c.a crc32c/libcrc32c_sse42.a leveldb/libmemenv.a secp256k1/.libs/libsecp256k1.a -lboost_system-mt-s-x64 -lboost_filesystem-mt-s-x64 -lboost_thread-mt-s-x64 -ldb_
< luke-jr> cxx-4.8 -lminiupnpc -levent -lzmq -lQt5AccessibilitySupport -lQt5DeviceDiscoverySupport -lQt5FbSupport -lQt5ThemeSupport -lQt5EventDispatcherSupport -lQt5FontDatabaseSupport -lssp -liphlpapi -lshlwapi -lws2_32 -ladvapi32 -luuid -loleaut32 -lole32 -lcomctl32 -lshell32 -lwinmm -lcomdlg32 -lgdi32 -luser32 -lkernel32 -lmingwthrd -pthread
< luke-jr> so x86_64 uses it too
< fanquake> I just checked that binaries produced with and without -lmingwthrd are basically identical. I see 5 bytes difference, and that's the git commit and what looks like 2 timestamps.
< bitcoin-git> [bitcoin] luke-jr opened pull request #18427: Bugfix? Restore linking to libmingwthrd (master...2020mingwthrd) https://github.com/bitcoin/bitcoin/pull/18427
< fanquake> MarcoFalke: did DrahtBot get an upgrade: https://github.com/bitcoin/bitcoin/pull/18426#discussion_r397534721
< bitcoin-git> [bitcoin] kallewoof closed pull request #16440: BIP-322: Generic signed message format (master...feature-generic-signed-message-format) https://github.com/bitcoin/bitcoin/pull/16440
< bitcoin-git> [bitcoin] fanquake pushed 2 commits to master: https://github.com/bitcoin/bitcoin/compare/5236b2e267a5...5b4a9f4bdf9d
< bitcoin-git> bitcoin/master 33dd764 practicalswift: doc: Add fuzzing quickstart guides for libFuzzer and afl-fuzz. Simplify in...
< bitcoin-git> bitcoin/master 5b4a9f4 fanquake: Merge #18342: doc: Add fuzzing quickstart guides for libFuzzer and afl-fuz...
< bitcoin-git> [bitcoin] fanquake merged pull request #18342: doc: Add fuzzing quickstart guides for libFuzzer and afl-fuzz (master...fuzzing-quick-start-guide) https://github.com/bitcoin/bitcoin/pull/18342
< bitcoin-git> [bitcoin] fanquake closed pull request #18377: build: fix libevent linking errors for bench-only builds (master...bench-compilation) https://github.com/bitcoin/bitcoin/pull/18377
< bitcoin-git> [bitcoin] MarcoFalke pushed 3 commits to master: https://github.com/bitcoin/bitcoin/compare/5b4a9f4bdf9d...3f5107d008e1
< bitcoin-git> bitcoin/master 87d24e6 practicalswift: tests: Add integer serialization/deserialization fuzzing harness
< bitcoin-git> bitcoin/master 102f326 practicalswift: tests: Add fuzzing harness for classes/functions in blockfilter.h
< bitcoin-git> bitcoin/master 3f5107d MarcoFalke: Merge #18423: tests: Add fuzzing harness for classes/functions in blockfil...
< bitcoin-git> [bitcoin] MarcoFalke merged pull request #18423: tests: Add fuzzing harness for classes/functions in blockfilter.h. Add integer {de,}serialization fuzzing. (master...fuzzers-misc-2) https://github.com/bitcoin/bitcoin/pull/18423
< stevenroose> If you would just have applied https://github.com/bitcoin/bitcoin/pull/13990/commits/c68f796c41b9b145c9c1b2c24aea505362ad1b63 without the other changes, what would have be the problem?
< stevenroose> It seems that at least part of the other commits are intended to not require users to remove the fee_estimatoin.dat file, is that correct?
< aj> stevenroose: seems kinda rude to have to spend a week before you can get fee estimates again?
< aj> stevenroose: (if you just did that, users who upgrade would continue to not get estimates for below 1s/B until they deleted their fee_estimates.dat, they'd continue using the same buckets that were current when f_e.dat was generated)
< stevenroose> aj: where does that week come from?
< stevenroose> does that mean a week before getting any estimate? Or a week before getting reliable ones?
< aj> stevenroose: i'm not sure of the numbers, but there's a weekly cycle so i wouldn't really trust the numbers much without that much data
< bitcoin-git> [bitcoin] brakmic opened pull request #18429: build: remove double LIBBITCOIN_SERVER from bench-Makefile (master...bench-makefile) https://github.com/bitcoin/bitcoin/pull/18429
< bitcoin-git> [bitcoin] laanwj pushed 4 commits to master: https://github.com/bitcoin/bitcoin/compare/3f5107d008e1...baa72cd9a2fd
< bitcoin-git> bitcoin/master 5e6b8b3 Hennadii Stepanov: build: Use git archive as source tarball
< bitcoin-git> bitcoin/master 6c4da59 Hennadii Stepanov: build: Drop SOURCEDIST reordering
< bitcoin-git> bitcoin/master e4d3667 Hennadii Stepanov: build: Drop needless EXTRA_DIST content
< bitcoin-git> [bitcoin] laanwj merged pull request #18331: build: Use git archive as source tarball (master...20200312-git-archive) https://github.com/bitcoin/bitcoin/pull/18331
< bitcoin-git> [bitcoin] laanwj pushed 3 commits to master: https://github.com/bitcoin/bitcoin/compare/baa72cd9a2fd...244e88e6b580
< bitcoin-git> bitcoin/master aae2605 Jon Atack: gui: display Mapped AS in peers info window
< bitcoin-git> bitcoin/master 76db4b2 Jon Atack: gui: avoid QT Designer/Form Editor re-formatting
< bitcoin-git> bitcoin/master 244e88e Wladimir J. van der Laan: Merge #18402: gui: display mapped AS in peers info window
< bitcoin-git> [bitcoin] laanwj merged pull request #18402: gui: display mapped AS in peers info window (master...gui-peers-display-mapped_as) https://github.com/bitcoin/bitcoin/pull/18402
< wumpus> i think it would be nice to have #15600 in 0.20.0, as it prevents leaking private key data into core dumps; does anyone here know enough about linux internals and madvise() to review / test it?
< gribble> https://github.com/bitcoin/bitcoin/issues/15600 | lockedpool: When possible, use madvise to avoid including sensitive information in core dumps by luke-jr · Pull Request #15600 · bitcoin/bitcoin · GitHub
< vasild> wumpus: I was just wondering what to pick up next :)
< bitcoin-git> [bitcoin] laanwj pushed 2 commits to master: https://github.com/bitcoin/bitcoin/compare/244e88e6b580...3e50fdbe4e5b
< bitcoin-git> bitcoin/master 1a0993a fanquake: scripts: add PE dylib checking to symbol-check.py
< bitcoin-git> bitcoin/master 3e50fdb Wladimir J. van der Laan: Merge #18395: scripts: add PE dylib checking to symbol-check.py
< bitcoin-git> [bitcoin] laanwj merged pull request #18395: scripts: add PE dylib checking to symbol-check.py (master...pe_dll_checking) https://github.com/bitcoin/bitcoin/pull/18395
< luke-jr> fanquake: freaking Windows Update fails -.-
< jonatack> wumpus: having a look
< phantomcircuit> luke-jr, akamai is currently exploding a little bit
< luke-jr> phantomcircuit: what?
< bitcoin-git> [bitcoin] MarcoFalke opened pull request #18430: ci: Only clone bitcoin-core/qa-assets when fuzzing (master...2003-ciFuzzClone) https://github.com/bitcoin/bitcoin/pull/18430
< bitcoin-git> [bitcoin] laanwj pushed 2 commits to master: https://github.com/bitcoin/bitcoin/compare/3e50fdbe4e5b...60a39a96fc04
< bitcoin-git> bitcoin/master 3e0df92 Andrew Chow: Update with new Windows code signing certificate
< bitcoin-git> bitcoin/master 60a39a9 Wladimir J. van der Laan: Merge #18425: releases: Update with new Windows code signing certificate
< bitcoin-git> [bitcoin] laanwj merged pull request #18425: releases: Update with new Windows code signing certificate (master...win-cert-3-20) https://github.com/bitcoin/bitcoin/pull/18425
< wumpus> is there something wrong with Travis? it looks like it isn't running on #18430
< gribble> https://github.com/bitcoin/bitcoin/issues/18430 | ci: Only clone bitcoin-core/qa-assets when fuzzing by MarcoFalke · Pull Request #18430 · bitcoin/bitcoin · GitHub
< achow101> something is always wrong with travis..
< vasild> btw that condition "if (addr)" https://github.com/bitcoin/bitcoin/commit/ca126d490#diff-4b0d3d6c6796a93894e682b4073a9865R254 is never going to be false. mmap() returns MAP_FAILED on failure, and given that we already checked that the return value is not MAP_FAILED, then for sure it is going to evaluate to true (e.g. not going to be a null pointer).
< * luke-jr> gives up on Windows Update nonsense. How do people even use Windows? smh
< vasild> luke-jr: ^ maybe sneak a removal of "if (addr)" into #15600, or maybe not. It is definitely out of scope.
< gribble> https://github.com/bitcoin/bitcoin/issues/15600 | lockedpool: When possible, use madvise to avoid including sensitive information in core dumps by luke-jr · Pull Request #15600 · bitcoin/bitcoin · GitHub
< phantomcircuit> luke-jr, windows update is akamai who seem to be randomly on fire from huge demand at the moment
< fjahr> wumpus: that looks like the same issue that I saw here https://github.com/bitcoin-core/bitcoin-maintainer-tools/pull/54 I think while there could be something wrong on travis side, Github should definitely not hide the check either way. I will report it to Github as a bug.
< luke-jr> phantomcircuit: the download works fine, it just errors installing
< wumpus> vasild: huh, good catch, "On error, the value MAP_FAILED (that is, (void *) -1)". Seems out of scope for this issue but might still make sense to open a PR for it.
< vasild> yes, I was thinking the same
< wumpus> fjahr: ah yes it might be a github issue too, that they skip calling travis for some reason. i suspected a travis issue because last time travis was 'under maintenance' the same happened.
< hebasto> wumpus: since 18331 is merged, mind looking into ##18349 ?
< gribble> https://github.com/bitcoin/bitcoin/issues/18349 | build: Fix quick hack for version string in releases by hebasto · Pull Request #18349 · bitcoin/bitcoin · GitHub
< wumpus> hebasto: sure will take a look
< hebasto> wumpus: ty
< bitcoin-git> [bitcoin] MarcoFalke pushed 2 commits to master: https://github.com/bitcoin/bitcoin/compare/60a39a96fc04...7c942250264e
< bitcoin-git> bitcoin/master fae1e99 MarcoFalke: ci: Only clone bitcoin-core/qa-assets when fuzzing
< bitcoin-git> bitcoin/master 7c94225 MarcoFalke: Merge #18430: ci: Only clone bitcoin-core/qa-assets when fuzzing
< bitcoin-git> [bitcoin] MarcoFalke merged pull request #18430: ci: Only clone bitcoin-core/qa-assets when fuzzing (master...2003-ciFuzzClone) https://github.com/bitcoin/bitcoin/pull/18430
< fjahr> wumpus: yes, but even if there is an issue on travis' side then at least Github should warn that one of the checks didn't run in my opinion. I had to send them an email. Seems like they can't think of a better way to track issues %)
< wumpus> hehe
< bitcoin-git> [bitcoin] laanwj pushed 2 commits to master: https://github.com/bitcoin/bitcoin/compare/7c942250264e...2e97d8001705
< bitcoin-git> bitcoin/master d056df0 Ben Woosley: Replace std::to_string with locale-independent alternative
< bitcoin-git> bitcoin/master 2e97d80 Wladimir J. van der Laan: Merge #18134: Replace std::to_string with locale-independent alternative
< bitcoin-git> [bitcoin] laanwj merged pull request #18134: Replace std::to_string with locale-independent alternative (master...2020-02-to-string) https://github.com/bitcoin/bitcoin/pull/18134
< vasild> luke-jr: jonatack: wumpus: Do you think that #15600 may create too crippled core files and thus impede debugging? In gdb, inspecting a core file and trying to read the value of a pointer that points to a removed page I get "Cannot access memory at address 0x803200000" which looks like a bogus/dangling pointer.
< gribble> https://github.com/bitcoin/bitcoin/issues/15600 | lockedpool: When possible, use madvise to avoid including sensitive information in core dumps by luke-jr · Pull Request #15600 · bitcoin/bitcoin · GitHub
< vasild> I do not want to bloat the PR with this, but maybe surround the madvise(DONTDUMP) call with "#ifdef DEBUG"?
< vasild> I mean #ifndef
< jonatack> vasild: interesting review, good catch! am trying to reproduce your tests with the steps you gave
< vasild> I am ok with the patch as it is. Just got this thought which you may want to consider.
< vasild> jonatack: abort() is king! :)
< jonatack> :)
< sipa> vasild: due to our secure allocator, the only thing actually stored in the protected pages is private keys
< sipa> so i think the degree to which it would hurt debugging is probably very limited?
< vasild> sipa: this is why I only mention it here instead of "bloating the PR". Btw, at least some random bytes are also allocated with the secure_allocator, see https://bpaste.net/RWOQ
< luke-jr> vasild: that's what it's supposed to do..
< sipa> right, the RNG state, of course
< sipa> my point is mainly that it's just *data* that's stored there
< sipa> not for example allocation tables
< sipa> or complex data structures
< luke-jr> I don't know any way to execute anything in a coredump-loaded gdb, but if there is, you could also fix it by mmaping something
< luke-jr> (IIRC, mmap lets you choose a location)
< sipa> luke-jr: i don't follow
< luke-jr> sipa: if you're worried that you may get a SEGV running some funcitons to debug with, you can simply first mmap a blank file to the DONTDUMP pages
< vasild> ok, so leave the PR as is
< sipa> luke-jr: i don't think you can execute anything in a core-dump inspection; just observe
< sipa> and non-dumped data you cannot observe
< luke-jr> sipa: right, I don't know a way how either; but in that scenario, you can't get a SEGV either
< luke-jr> being unable to observe non-dumped data, is the point of the PR
< sipa> it may be undesirable in debug settings, which is certainly true
< wumpus> vasild: I think that's an acceptable risk personally, we have to err on the side of security/privacy in general
< wumpus> I think people rarely use core files for debugging, but if they do, if that means gdb gives a few more warnings I think that's acceptable
< wumpus> yes, as sipa already says, it only applies to private key data and some very limited things
< vasild> +1
< jonatack> reproduced vasild's findings
< jonatack> describing with a comment in the PR
< vasild> So it works! \o/
< jonatack> yes! good stuff
< fjahr> Is there a github access token available in travis and if yes, what is the variable name? I would need it to prevent running into rate limiting with #18399
< gribble> https://github.com/bitcoin/bitcoin/issues/18399 | lint: PR description linter by fjahr · Pull Request #18399 · bitcoin/bitcoin · GitHub
< bitcoin-git> [bitcoin] practicalswift opened pull request #18432: util: Make current implicit C++ locale assumption in tfm::format(...) explicit (master...cpp-locale) https://github.com/bitcoin/bitcoin/pull/18432