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

bitcoinarmory segfaults in nixos-unstable #29956

Closed
michalrus opened this issue Sep 30, 2017 · 11 comments · Fixed by #82368
Closed

bitcoinarmory segfaults in nixos-unstable #29956

michalrus opened this issue Sep 30, 2017 · 11 comments · Fixed by #82368

Comments

@michalrus
Copy link
Member

Issue description

@elitak

After installing bitcoinarmory, this happens:

$ ArmoryDB --version
zsh: segmentation fault  ./ArmoryDB --version

$ file -L $(which ArmoryDB)
/run/current-system/sw/bin/ArmoryDB: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /nix/store/q0prbrw9n7h2sjqmla8ac32lfyq0w91z-glibc-2.25-49/lib/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, not stripped

$ ldd $(which ArmoryDB)
        not a dynamic executable

Steps to reproduce

  1. Install bitcoinarmory from nixos-unstablec8e7aab.
  2. Run ArmoryDB --version.

Technical details

  • System: 17.03.1844.83706dd49f (Gorilla)
  • Nix version: nix-env (Nix) 1.11.14
  • Nixpkgs version: "17.03.1844.83706dd49f"
  • Sandboxing enabled: build-use-sandbox = true
@michalrus
Copy link
Member Author

Also, upstream made 2 releases since, one with a critical vuln.

@elitak
Copy link
Contributor

elitak commented Sep 30, 2017 via email

@elitak
Copy link
Contributor

elitak commented Sep 30, 2017

The upstream build process in still quite messy, with embedded libraries concretely integrated into build files. I've got a modified nix expression that replaces some of the deps with libs in the store, but with both variants I still get either a SegFault in ArmoryDB or a SIGILL in _CppBlockUtils.so. I don't know if I can invest much more time in fixing this. I suspect the issues originate upstream, FWIW.

Personally, I'm running a gcrooted-closure that I've kept unchanged for some months now.

@michalrus
Copy link
Member Author

I’m not sure, 0.96.3 works fine with <nixpkgs> from your original commit, i.e. e93fe9a.

The vulnerability was related to fragmented backups.

Well, I guess I’ll just stay with Bitcoin Core. I just wanted to try this one. ¯\_(ツ)_/¯

@elitak
Copy link
Contributor

elitak commented Sep 30, 2017

Oh, interesting. This isn't the first time I've seen a newer glibc cause segfaults and other nastiness, but I lack the skill to fix these types of problems efficiently.

Armory's great for the offline wallet stuff, but the original devs left the source tree in a poor state. I'll eventually get it working on the master branch again, probably.

@michalrus
Copy link
Member Author

I don’t get that, really. Is everything compiled from source in this derivation? Does upstream include binary blobs in the repo? :\

@michalrus
Copy link
Member Author

Both that SIGSEGV at the very beginning, and ldd failure, and SIGILL would suggest a linking error to me. You shouldn’t need to use patchelf on programs cleanly built from source. Hmm.

@michalrus
Copy link
Member Author

Even less so, to remove a /tmp reference? What is this upstream build script doing? 😁

*sighs*

@elitak
Copy link
Contributor

elitak commented Sep 30, 2017 via email

@michalrus
Copy link
Member Author

Let me try that, but that upstream repo is a total mess.

@michalrus
Copy link
Member Author

⬆️ fixed above.

@danderson danderson mentioned this issue Mar 12, 2020
10 tasks
alyssais pushed a commit that referenced this issue Mar 12, 2020
The project has been abandoned upstream for 2 years. For its entire
lifetime in nixpkgs, the installed binaries segfault due to static
library linking that couldn't be undone due to proprietary changes
to said libraries. In addition, there are unpatched CVEs according
to #29956.

Fixes #29956.

Signed-off-by: David Anderson <dave@natulte.net>
dtzWill pushed a commit to dtzWill/nixpkgs that referenced this issue Mar 12, 2020
The project has been abandoned upstream for 2 years. For its entire
lifetime in nixpkgs, the installed binaries segfault due to static
library linking that couldn't be undone due to proprietary changes
to said libraries. In addition, there are unpatched CVEs according
to NixOS#29956.

Fixes NixOS#29956.

Signed-off-by: David Anderson <dave@natulte.net>
(cherry picked from commit af576fc)
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 a pull request may close this issue.

2 participants