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

Buffer Overflow When Syncing Bitcoin SV Mainnet #1567

Open
etscrivner opened this issue Jan 23, 2019 · 1 comment
Open

Buffer Overflow When Syncing Bitcoin SV Mainnet #1567

etscrivner opened this issue Jan 23, 2019 · 1 comment

Comments

@etscrivner
Copy link

etscrivner commented Jan 23, 2019

WHAT HAPPENED
Buffer overflow caused the Bitcoin Unlimited process to terminate when attempting to sync mainnet Bitcoin SV fork.

libc terminated the process with the following error message: *** buffer overflow detected ***: /app/bitcoind terminated

This does not appear to happen deterministically as sometimes it does fully sync. So seems like a buffer overflow bug that is largely path dependent.

OS: Linuxkit 4.9.125 64-bit
Version: bucash 1.5.1.0

LOGS

  | January 22nd 2019, 20:25:43.978 | /app/bitcoind[0x68c30e]

  | January 22nd 2019, 20:25:43.978 | /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7ff2ad9c941d]

  | January 22nd 2019, 20:25:43.978 | /app/bitcoind[0x4ad98f]

  | January 22nd 2019, 20:25:43.978 | /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7ff2adc936ba]

  | January 22nd 2019, 20:25:43.978 | /app/bitcoind[0x4af19d]

  | January 22nd 2019, 20:25:43.978 | /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.58.0(+0x115d5)[0x7ff2afa305d5]

  | January 22nd 2019, 20:25:43.978 | /app/bitcoind[0x4ba3d3]

  | January 22nd 2019, 20:25:43.978 | /app/bitcoind[0x4adeb7]

  | January 22nd 2019, 20:25:43.978 | /app/bitcoind[0x4ba49e]

  | January 22nd 2019, 20:25:43.977 | /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7ff2ad9db15c]

  | January 22nd 2019, 20:25:43.977 | /lib/x86_64-linux-gnu/libc.so.6(+0x117160)[0x7ff2ad9d9160]

  | January 22nd 2019, 20:25:43.977 | ======= Backtrace: =========

  | January 22nd 2019, 20:25:43.977 | /app/bitcoind[0x688f08]

  | January 22nd 2019, 20:25:43.977 | 2019-01-23 04:25:43 Acceptable block: ver:20000002 time:1493403775 size: 998140 Tx:2608 Sig:5308

  | January 22nd 2019, 20:25:43.977 | /lib/x86_64-linux-gnu/libc.so.6(+0x1190a7)[0x7ff2ad9db0a7]

  | January 22nd 2019, 20:25:43.977 | /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7ff2ad9397e5]

  | January 22nd 2019, 20:25:43.976 | *** buffer overflow detected ***: /app/bitcoind terminated

  | January 22nd 2019, 20:25:43.976 | 2019-01-23 04:25:43 UpdateTip: new best=000000000000000000ffa002684abf896651e7cadcfdd405878758ea23373e6b  height=462882 bits=402791539 log2_work=86.315554  tx=215156477  date=2017-04-21 16:37:01 progress=0.595330  cache=5033.1MiB(36084861txo)

  | January 22nd 2019, 20:25:43.976 | 2019-01-23 04:25:43 Acceptable block: ver:20000002 time:1493403074 size: 998106 Tx:2854 Sig:5379

  | January 22nd 2019, 20:25:43.679 | 2019-01-23 04:25:43 UpdateTip: new best=00000000000000000002cf3cc6a4d844fb941b345e0070919f5b90e86144a203  height=462879 bits=402791539 log2_work=86.315453  tx=215149142  date=2017-04-21 16:05:10 progress=0.595309  cache=5032.5MiB(36079970txo)

  | January 22nd 2019, 20:25:43.679 | 2019-01-23 04:25:43 UpdateTip: new best=000000000000000000e05ac7331c8714e63a8323ca7382a11aa8b60a5ce249c1  height=462881 bits=402791539 log2_work=86.315521  tx=215154199  date=2017-04-21 16:21:53 progress=0.595323  cache=5033.0MiB(36083412txo)

CONFIGURATION FILE

datadir=/data
bind=0.0.0.0
listen=1
port=8332
bantime=15
rpcport=8332
rpcallowip=0.0.0.0/0
rpcthreads=8
rpcworkqueue=32
consensus.forkNov2018Time=0
consensus.svForkNov2018Time=1
printtoconsole=1
disablewallet=1
txindex=1
rpcauth=...
zmqpubhashtx=tcp://0.0.0.0:28332
zmqpubhashblock=tcp://0.0.0.0:28332
@etscrivner
Copy link
Author

etscrivner commented Jan 23, 2019

Was able to observe a second buffer overflow crash adding data below:

  | January 23rd 2019, 14:02:05.801 | 7f080118f000-7f080c000000 r--s 00000000 ca:20 55320517                   /data/blocks/index/044765.ldb
  | January 23rd 2019, 14:02:05.801 | 7f07fc000000-7f07ff77a000 rw-p 00000000 00:00 0

  | January 23rd 2019, 14:02:05.800 | 7f07ec000000-7f07ef1e4000 rw-p 00000000 00:00 0

  | January 23rd 2019, 14:02:05.800 | 00bd2000-00d1f000 rw-p 00000000 00:00 0

  | January 23rd 2019, 14:02:05.800 | 00bd0000-00bd2000 rw-p 005d0000 ca:05 2634549                            /app/bitcoind

  | January 23rd 2019, 14:02:05.800 | 00400000-009cf000 r-xp 00000000 ca:05 2634549                            /app/bitcoind

  | January 23rd 2019, 14:02:05.800 | 7f07f4000000-7f07f7b1c000 rw-p 00000000 00:00 0

  | January 23rd 2019, 14:02:05.800 | 7f07ef1e4000-7f07f0000000 ---p 00000000 00:00 0

  | January 23rd 2019, 14:02:05.800 | 0122f000-050fc000 rw-p 00000000 00:00 0                                  [heap]

  | January 23rd 2019, 14:02:05.800 | 00bcf000-00bd0000 r--p 005cf000 ca:05 2634549                            /app/bitcoind

  | January 23rd 2019, 14:02:05.799 | /app/bitcoind[0x4adeb7]

  | January 23rd 2019, 14:02:05.799 | /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f0bbe1e441d]

  | January 23rd 2019, 14:02:05.799 | /app/bitcoind[0x4ad98f]

  | January 23rd 2019, 14:02:05.799 | /app/bitcoind[0x4ba49e]

  | January 23rd 2019, 14:02:05.799 | /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f0bbe4ae6ba]

  | January 23rd 2019, 14:02:05.799 | /app/bitcoind[0x4ba3d3]

  | January 23rd 2019, 14:02:05.799 | /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.58.0(+0x115d5)[0x7f0bc024b5d5]

  | January 23rd 2019, 14:02:05.799 | /app/bitcoind[0x68c30e]

  | January 23rd 2019, 14:02:05.799 | ======= Memory map: ========

  | January 23rd 2019, 14:02:05.799 | /app/bitcoind[0x4af19d]

  | January 23rd 2019, 14:02:05.798 | /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7f0bbe1f615c]

  | January 23rd 2019, 14:02:05.798 | /app/bitcoind[0x688f08]

  | January 23rd 2019, 14:02:05.798 | /lib/x86_64-linux-gnu/libc.so.6(+0x117160)[0x7f0bbe1f4160]

  | January 23rd 2019, 14:02:05.798 | /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f0bbe1547e5]

  | January 23rd 2019, 14:02:05.798 | 2019-01-23 22:02:05 UpdateTip: new best=000000000000000000e38492349fa80f05c5577234940bc8c85fd74f3b63384a  height=546236 bits=402780741 log2_work=87.575295  tx=257066345  date=2018-09-03 07:59:18 progress=0.709277  cache=4365.0MiB(30745621txo)

  | January 23rd 2019, 14:02:05.798 | /lib/x86_64-linux-gnu/libc.so.6(+0x1190a7)[0x7f0bbe1f60a7]

  | January 23rd 2019, 14:02:05.798 | *** buffer overflow detected ***: /app/bitcoind terminated

  | January 23rd 2019, 14:02:05.798 | 2019-01-23 22:02:05 Acceptable block: ver:20000000 time:1536559523 size: 77134 Tx:75 Sig:458

  | January 23rd 2019, 14:02:05.798 | ======= Backtrace: =========

  | January 23rd 2019, 14:02:05.797 | 2019-01-23 22:02:05 Acceptable block: ver:20000000 time:1536152939 size: 1799869 Tx:8233 Sig:10047

  | January 23rd 2019, 14:02:05.797 | 2019-01-23 22:02:05 UpdateTip: new best=00000000000000000056d4b3f6d9024c6e0fa9b32a35fd8f65ad4d879d048c03  height=546235 bits=402780255 log2_work=87.57528  tx=257062425  date=2018-09-03 07:56:43 progress=0.709266  cache=4364.6MiB(30742434txo)

  | January 23rd 2019, 14:02:05.797 | 2019-01-23 22:02:05 Acceptable block: ver:20000000 time:1536558985 size: 17323 Tx:36 Sig:65

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

No branches or pull requests

1 participant