News for hackers. Stuff that matters.
Re:Nixos-unstable’s ISO_minimal.x86_64-Linux is 100% reprodu... by radicalcentrist on Sunday June 20, 2021 @05:49PM (#27574217)
Reproducibility is necessary, but unfortunately not sufficient, to stop a "Trusting Trust" attack. Nixpkgs still relies on a bootstrap tarball containing e.g. gcc and binutils, so theoretically such an attack could trace its lineage back to the original bootstrap tarball, if it was built with a compromised toolchain.
Re:Nixos-unstable’s ISO_minimal.x86_64-Linux is 100% reprodu... by mjg59 on Sunday June 20, 2021 @06:34PM (#27574474)
Diverse double compilation should allow a demonstration that the toolchain is trustworthy.
Re:Nixos-unstable’s ISO_minimal.x86_64-Linux is 100% reprodu... by Foxboron on Sunday June 20, 2021 @07:03PM (#27574620)
Indeed, and with the work done by Guix and the Reproducible Builds project we do have a real-world example of diverse double compilation which is not just a toy example utilizing the GNU Mes C compiler.

https://dwheeler.com/trusting-trust/#real-world

Re:Nixos-unstable’s ISO_minimal.x86_64-Linux is 100% reprodu... by dane-pgp on Sunday June 20, 2021 @07:52PM (#27574874)
Projects like GNU Mes are part of the Bootstrappable Builds effort[0]. Another great achievement in that area is the live-bootstrap project, which has automated a build pipeline that goes from a minimal binary seed up to tinycc then gcc 4 and beyond.[1]

[0] https://www.bootstrappable.org/

[1] https://github.com/fosslinux/live-bootstrap/blob/master/part...

Re:Nixos-unstable’s ISO_minimal.x86_64-Linux is 100% reprodu... by Foxboron on Sunday June 20, 2021 @07:56PM (#27574903)
I feel the need to point out that the "Bootstrappable Builds" project is a working group from a Reproducible Builds project which where interested in the next step beyond reproducing binaries. Obviously this project has seen most effort from Guix :)

The GNU Mes C experiment mentioned above was also conducted during the 2019 Reproducible Builds summit in Marrakesh.

https://reproducible-builds.org/events/Marrakesh2019/

Re:Nixos-unstable’s ISO_minimal.x86_64-Linux is 100% reprodu... by naniwaduni on Sunday June 20, 2021 @09:24PM (#27575397)
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 people are going to make.

Critically, it shouldn't be taken as a demonstration that the toolchain is trustworthy unless you trust whoever's picking the compilers! This kind of ruins approaches based on having any particular outside organization certify certain compilers as "trusted".

Re:Nixos-unstable’s ISO_minimal.x86_64-Linux is 100% reprodu... by XorNot on Sunday June 20, 2021 @10:17PM (#27575644)
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..."

Re:Nixos-unstable’s ISO_minimal.x86_64-Linux is 100% reprodu... by GauntletWizard on Monday June 21, 2021 @12:34AM (#27576344)
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.
Re:Nixos-unstable’s ISO_minimal.x86_64-Linux is 100% reprodu... by User23 on Sunday June 20, 2021 @08:50PM (#27575204)
Really? How does that accomplish more than proving the build is a fixed point? An attacker may well be aware of the fixed point combinator after all.

Edit: I think that tone may have come off as snarky, but I meant it as an honest question. If any expert can answer I'd really appreciate it.

Re:Nixos-unstable’s ISO_minimal.x86_64-Linux is 100% reprodu... by eru on Monday June 21, 2021 @03:30AM (#27577080)
Fixed points don't come in here at all, unless you specifically want to talk about compiling compilers.

Diverse double compilation is useful for run-of-the mill programs, too.

Re:Nixos-unstable’s ISO_minimal.x86_64-Linux is 100% reprodu... by chriswarbo on Monday June 21, 2021 @11:27AM (#27580105)
Programs built by different compilers aren't generally binary comparable, e.g. we shouldn't expect empty output from `diff <(gcc run-of-the-mill.c) <(clang run-of-the-mill.c)`

However, the behaviour of programs built by different compilers should be the same. Run-of-the-mill programs could use this as part of a test suite, for example; but diverse double compilation goes a step further:

We build compiler A using several different compilers X, Y, Z; then use those binaries A-built-with-X, A-built-with-Y, A-built-with-Z to compile A. The binaries A-built-with-(A-built-with-X), A-built-with-(A-built-with-Y), A-built-with-(A-built-with-Z) should all be identical. Hence for 'fully countering trusting trust through diverse double-compiling', we must compile compilers https://dwheeler.com/trusting-trust/

Re:Nixos-unstable’s ISO_minimal.x86_64-Linux is 100% reprodu... by smitty1e on Sunday June 20, 2021 @09:11PM (#27575321)
And how about that hardware and firmware microcode?
Re:Nixos-unstable’s ISO_minimal.x86_64-Linux is 100% reprodu... by beermonster on Monday June 21, 2021 @02:01AM (#27576699)
And also shipped firmware or binary blobs.