Live data from Hacker News

Nixos-unstable’s ISO_minimal.x86_64-Linux is 100% reproducible

discourse.nixos.org

141–150 of 232 posts

Re: Nixos-unstable’s ISO_minimal.x86_64-Linux is 100% reproducible

#141
post #77

I don't see a single comment doubting the value of reproducibility, so I'll be the resident skeptic :) I think build reproducibility is a cargo cult. The website says reproducibility can reduce the risk of developers being threatened or bribed to backdoor their software, but that is just ridiculous. Developers have a perfect method for making their own software malicious: bugdoors. A bugdoor (bug + backdoor) is a del…

You'll never beat the source.

IIUC Reproducible Builds guarantees that source is turned into an artifact in a consistent and unchanging way. So as long as the source doesn't change neither will the build.

Re: Nixos-unstable’s ISO_minimal.x86_64-Linux is 100% reproducible

#142
post #139
post #122

Earlier quoted context omitted.

The crev folks are working on a co-ordination system for incremental distributed code review: https://github.com/crev-dev/

Crev is a great idea, unfortunately it is only really available for Rust right now.

I noticed there is a git-crev project, might that be useful for other languages? Also there is pip-crev for Python.

Re: Nixos-unstable’s ISO_minimal.x86_64-Linux is 100% reproducible

#143
post #7
post #2

Can anyone comment on the significance of this accomplishment, and why it was hard to achieve before? I (naively, apparently) assumed this had been possible with open-source toolchains for a long time.

Just recently, there were large non-reproducible projects: python, gcc. Not sure where is the history of non-r13y. --- There is Debian initiative to create bit-to-bit reproducible builds for all their software (well, all critical). https://reproducible-builds.org/ R13y is akin to "computer proofs" in math -- if you don't have it, that's fine, but if you have it, that's awesome. There are practical reasons to favor re…

> There's no good reason (that I can think of) why this shouldn't have been the case all along

Determinism can decrease performance dramatically. Like concatenating items (say, object files into a library) in order is clearly more expensive in both time & space than processing them out of order. One requires you to store everything in memory and then sort them before you start doing any work, whereas the other one lets you do your work in a streaming fashion. Enforcing determinism can turn an O(1)-space/O(n)-time algorithm into an O(n)-space/O(n log n)-time one, increasing latency and decreasing throughput. You wouldn't take a performance hit like that without a good reason to justify it.

Re: Nixos-unstable’s ISO_minimal.x86_64-Linux is 100% reproducible

#144
post #11

This really deserves more love. Who remembers Ken Thompson's "Reflections on Trusting Trust"? The norm today is auto-updating, pre-built software. This places a ton of trust in the publisher. Even for open-source, well-vetted software, we all collectively cross our fingers and hope that whoever is building these binaries and running the servers that disseminate them, is honest and good at security. So far this has mo…

Actually, being able to build projects much easier from GitHub is the sole reason why I'm currently using Arch as my main OS.

Building a project is just a shell script with a couple of defined functions. Quite literally.

I really admire NixOS's philosophy of pushing the boundaries as a distro where everything, including configurations and modifications, can be done in a reproducible manner. They're basically trying to automate the review process down the line, which is absurdly complex as a challenge.

And given stability and desktop integrations improve over time, I really think that Nix has the potential to be the base for easily forkable distributions. Building a live/bootable distro will be so much easier, as everything is just a set of configuration files anyways.

Re: Nixos-unstable’s ISO_minimal.x86_64-Linux is 100% reproducible

#145
post #135

Earlier quoted context omitted.

> Reproducible builds are way more important than is currently widely appreciated. Why? How will this help with the problems you're talking about? I can't come up with a single benefit to security from reproducible builds. It seems nice for operational reasons and performance reasons though.

> I can't come up with a single benefit to security from reproducible builds. It is a means to allow to detect a compromised supply chain. If people rebuilding a distro cannot get the same hash as the distro shipping from the distributor, then likely the distributors infrastructure has been compromised

How does this work in practice? The distro is owned, so where are you getting the hash from? I mean, specifically, what does the attacker have control of and how does a repeatable build help me stop them.

Re: Nixos-unstable’s ISO_minimal.x86_64-Linux is 100% reproducible

#146
post #77

I don't see a single comment doubting the value of reproducibility, so I'll be the resident skeptic :) I think build reproducibility is a cargo cult. The website says reproducibility can reduce the risk of developers being threatened or bribed to backdoor their software, but that is just ridiculous. Developers have a perfect method for making their own software malicious: bugdoors. A bugdoor (bug + backdoor) is a del…

You'll never beat the source. IIUC Reproducible Builds guarantees that source is turned into an artifact in a consistent and unchanging way. So as long as the source doesn't change neither will the build.

I don't really understand what you're saying.

If you're saying "reproducible builds are reproducible", then that is obviously true, but the question is what is the benefit?

Some people claim that the benefit is that there will be less incentive to threaten developers with violence, and I'm saying that's nonsense. If you cut through the nonsense, there are some modest claims that are true, but doing reproducible builds properly is very complicated and the benefit is negligible.

Re: Nixos-unstable’s ISO_minimal.x86_64-Linux is 100% reproducible

#147
post #146

Earlier quoted context omitted.

You'll never beat the source. IIUC Reproducible Builds guarantees that source is turned into an artifact in a consistent and unchanging way. So as long as the source doesn't change neither will the build.

I don't really understand what you're saying. If you're saying "reproducible builds are reproducible", then that is obviously true, but the question is what is the benefit? Some people claim that the benefit is that there will be less incentive to threaten developers with violence, and I'm saying that's nonsense. If you cut through the nonsense, there are some modest claims that are true, but doing reproducible build…

> ... the question is what is the benefit?

I don't think I should have to explain this. It has nothing directly to do with violence against developers, that's taking many leaps.

It simply gives you what you expect, which is kinda the basis of safety and security.

Re: Nixos-unstable’s ISO_minimal.x86_64-Linux is 100% reproducible

#148
post #125

Earlier quoted context omitted.

Has a full linux image--something you can actually boot--existed as a reproducible build before today?

Forgive my ignorance but isn’t that Slackware?

No, if I build Slackware on my computer and you build Slackware on yours; the binaries we end up with will not be bit-for-bit identical.

Re: Nixos-unstable’s ISO_minimal.x86_64-Linux is 100% reproducible

#149
post #96
post #11

This really deserves more love. Who remembers Ken Thompson's "Reflections on Trusting Trust"? The norm today is auto-updating, pre-built software. This places a ton of trust in the publisher. Even for open-source, well-vetted software, we all collectively cross our fingers and hope that whoever is building these binaries and running the servers that disseminate them, is honest and good at security. So far this has mo…

> I'm grateful to the nixos team for being beating a trail thru the jungle here. Retrofitting reproducibility onto a big software project that grew without it, is hard work. Actually, it's Debian guys who pushed reproducible build hard in the early days. They upstreamed necessary changes and also spread the concept itself. This is a two-decade long community effort. In turn, NixOS is mostly just wrapping those projec…

That's somewhat uncharitable. patchelf, for example, is one tool developed by NixOS which is widely used for reproducible build efforts. (although I don't know concretely if Debian uses it today)

Re: Nixos-unstable’s ISO_minimal.x86_64-Linux is 100% reproducible

#150
post #119

Earlier quoted context omitted.

In principle, diverse double-compiling merely increases the number of compilers the adversary needs to subvert. There are obvious practical concerns, of course, but frankly this raises the bar less than maintaining the backdoor across future versions of the same compiler did in the first place, since at least backdooring multiple contemporary compilers doesn't rely on guessing, well ahead of time, what change future…

There is an uphill effort here to actually do this. While theoretically a very informed adversary might get it right first time, human adversaries are unlikely to and their resources are large, but far from infinite. Your entire effort is potentially brought down by someone making a change in a way you didn't expect and someone goes "huh, that's funny..."

Quite frankly, I'm surprised that is hasn't come up multiple times in the course of getting to NixOS and etc. The attacks are easy to hide and hard to attribute.
Post reply on HN