Concerns about Arch Team size, trusting Arch supply chain, developer machines and build process
Arch is one of the best experiences I've ever had with a Linux distro and my respect goes to all the people behind it making this sweet distro possible.
I have a few questions and perplexities, though, and a couple things that I find concerning.
Package building infrastructure
Where are packages built? According to this answer, there is nothing forcing the building of packages to happen on dedicated, audited, controlled machines.
If the package binary building can happen on any Arch maintainer's personal machine, then we aren't just trusting a few big dedicated machines but a lot of random laptops\desktops.
We've seen some shit, over and over that makes me not trust any binary directly built on a developer machine, especially if it's a personal machine dedicated to other usages as well on which they may as well even do gaming or porn.
Small amount of people building stuff
I've read this joke thread which, actually, makes a good and concerning argument.
I won't try to ask "is it easier to trust 5 people or 5000?" and get into the Arch vs Debian thing, however I still wonder what happens when just 2-3 people change their life plans and\or don't have the time to contribute anymore, when just one of them is responsible for 42% of packages.
If anything of what I am stating is wrong, I'm happy to be corrected and discuss things.
Thanks
Edited 8 Jan 2023. We only hold this version.
About this post
- Posted
- Archived
- Edited
- Score
- 237 · 91% up
- Kind
- Text
- ID
- 106lib9
56 comments
Arch Linux is one of the few distros trying to tackle this via reproducible builds:
https://reproducible.archlinux.org/
it's not as many packages as Debian but still a lot
I'm surprised to see the kernel itself on that list. Would expect it to be easy to do since everyone is vying for the goal of reproducible builds.
One problem is that we don't have a module signing key, so a random one is generated every build.
This at least makes enforcing module signatures do something useful, as you can only load modules built together with the kernel.
If we chose a signing key, it would have to be kept secret or module signatures would be useless. The public would then not be able to easily reproduce the build, either.
Can't Arch use OBS from Suse? It's free for all.
Deleted before we saved it.
I’ll counter point, though I definitely don’t think your concerns are invalid.
Most arch installs have somewhere between 500 and 1000 packages from what I can tell. Installing from source addresses some of the risk, but most of the risk seems to come from poor security auditing and hardware. The only way to mitigate these holes is to inspect all the source code prior to install, and installing/implementing mitigations.
Even when they only build on the servers, you obviously still have to trust all machines used by people that have access to them. This argument contradicts itself. They would need extra machines only used for accessing those servers but this isn't a nuclear facility.
As u/EddyBot already pointed out, reproducible builds are the best thing to tackle them.
If you only want to trust yourself, run repro yourself to validate the integrity of packages and don't install prebuilt binaries of non-reproducible packages.
Yes, but it only has to be a subset of the devs. It could even be a mostly automated system which only accept sources. A few other distros do this.
Contributions welcome.
https://gitlab.archlinux.org/foxboron/archlinux-buildbot
https://lists.archlinux.org/archives/list/arch-dev-public@lists.archlinux.org/thread/SM43ASYDCWX4TWGLVBQAKYLUTBY6AK2U/
This surely won't be exploitable \s
The attack surface will stay the same, just another hurdle that would be quick-written, non-audited & will be modified without much overthought over the time.
Honestly, if you care about security so much, start at your web browser. You should care about the least safe thing 1st. The reddit comment I'm just writing could contain a cross-site-scripting payload that exploits a vuln in the JS JIT compiler of your browser, which you most likely didn't deactivate. This so much more likely and imminent danger than your scenario above. If you don't think reasonable security by doing reproducible builds is enough, start using Qubes as your base OS & compile everything from sources you all read & understood yourself.
wrong; reproducible builds means anyone can generate the build and any can validate its correct.
you can build this yourself and run it as a way to do 3rd party validation of packages. its not technically hard.
I’ve documented some thoughts on trying to abide by SLSA level-1 for a package I maintain on the AUR. The idea here is to have some kind of accountability of “look, I’m doing the right things for maintaining these packages”.
When in doubt you could build your own packages, and potentially setup some kind of CI/CD platform (github actions/gitlab runners/Jenkins) to achieve this.
Great info. Thanks
team size is immaterial; you want reproducible builds as others have pointed out then where and when the packages are built is unrelated to the packages themselves.
Actually i am more concerned about AUR. Most helper don't even do chroots for builds and given how open the whole system is, i am surprised nothing serious happened yet.
so don't use aur. AUR comes with huge warnings about its use. and is intentionally made slightly annoying to setup tooling to use it because of this. and most AUR tools have PKGBUILD inspection tools for you to validate what you're getting.
if you use AUR you've asked for any problems you run into.
PKGBUILDs should always be vetted before building! If you trust in your ability to do that correctly, the AUR is theoretically safer than the official packages because they take out the middleman.
In any case, chroots won't necessarily save you. A malicious package can simply exploit your system during/after installation.
Maybe we need a absolutely-reproducible script similar to the absolutely-proprietary script that tells you all the non free packages you have installed.
I’d be interested in keeping tracking of how reproducible my set of installed package is (and validating against another set of servers ideally).
Also, the Arch dev team moved 100% to Yubikeys for auth a while ago, they take their responsibility seriously. However, they aren’t qualified or attempt to audit upstream package changes - something other distros like Debian do. So accidental, intentional security issues, or maybe compromised upstream supply chain could result in huge downstream impact.
Debian does not do this. If they say they do, it's a lie. Be real.
Debian even did really dumb patches to cybersecurity packages in the past because they didn't understand that the valgrind warning has to be tolerated in the specific case
https://www.debian.org/security/2008/dsa-1571
I think we need a CI/CD with a GPG verification pipeline for core packages. Those packages could be fetched from their sources, verified with keys, and have a buildbot put them up.
A lot of people keep putting up front the "but I'd you don't do 100%, then why do it?" argument. Cybersecurity is about reducing the attack surface, mitigating events, and keeping watch.
A motto I use when dealing with security is that "everything is vulnerable". But even if locks are pickable, you don't leave your door unlocked. Even the best lock is pickable, but it acts as a good deterrent.
We need a rootless package manager, too.
the old "if it's not perfect why bother" is incredibly dumb, there's a microscopic chance someone could guess your 2000 char crypto key so why bother
But there is a chance! That's why, in the advent, someone guesses you should have a disaster plan and mitigations in place.
:)
This, so much. Debian does privilege separation.
In fact, we are doing both. We have a dedicated build machine that we can offload a build to and we have
npackagers that may build on their own dedicated machines (all package builds are done in systemd-nspawn containers). We encourage packagers to e.g. use hardware tokens though (by providing free hardware) to make PGP key exfiltration less likely.The upcoming switch to package sources in git repositories will allow us to move towards an environment in which all packages are built (and signed!) on dedicated build infrastructure in the future and with which we can tackle complex rebuild scenarios. However, as pointed out by u/Foxboron in an answer to this thread, there is still a lot left to be done and I strongly encourage anyone with matching background and skill set to get in touch via #archlinux-projects on libera.chat or via the arch-projects mailing list to help with work on e.g. https://gitlab.archlinux.org/foxboron/archlinux-buildbot and https://gitlab.archlinux.org/archlinux/repod
We are aware of the low bus factor on (some) ecosystems and tooling (I consider myself one of them e.g. for all things audio). Arch Linux is a community run distribution and as such improving this problem is done by becoming a package maintainer yourself and being the (co-)maintainer for packages in a specific section (e.g languages, tooling, etc.). If certain aspects of the distribution go unmaintained for a while, there is usually someone stepping up to do the job eventually. However, this may take time, since we are not a company and can't "just hire someone".
Becoming an official packager is not the only way to improve this situation though: Documenting (e.g. in the wiki) and helping to improve tooling for automated rebuilds (see above) as well as our official build tools (https://gitlab.archlinux.org/archlinux/devtools) has immense value to the distribution. Similarly, documenting and improving per language packaging and rebuild instructions is very very helpful. Packagers don't necessarily do a good job on this, since they naturally suffer from confirmation bias and are exposed to tribal knowledge eventually ("I know how this works, it's easy").
In summary: We are a community run project (not a company). To improve things, people need to get involved.
In regards specifically to this, what counts as a "matching background and skill set"?
I have been using Arch for a few years and am keen to get involved. I am a software developer and have some DevOps skills.
Topics such as "building packages", "maintaining infrastructure", "writing tested software" (more specifically Python in that case), "willingness to read documentation and/or ask questions".
Well, if you're interested, you know where to find us! :) With repod we also do bi-weekly meetings, but I haven't yet picked it up again this year.
Makes sense, thank you very much
iirc all TU's use pkgbuild.com as a build server, don't remember which hosting provider donated the hardware.
I personally use the Open Suse Build Service to build the packages I mantain. I believe they are trustworthy.
I don't see public build logs on there.
the OBS has public build logs. Pkgbuild doesn't seem to have them indeed.
Wait a second is this Slackware? I remember seeing similar concerns (team size) a few years ago when PV was MIA for a little while.
I agree with your concerns and having been thinking the same way lately. It seems like it's impossible to maintain the usefulness and flexibility of a general purpose PC and make it secure. One reason why MS Windows and macOS are becoming more walled off like smartphones with every version.
While I'm sure it's not perfect and others would have different needs, the best I've been able to come up with is to move anything I feel is truly sensitive to a dedicated SIMless smartphone. In my case that's just banking where money is stored, plus domain and email administrative access. I might come up with other stuff as this evolves. The phone can stay off or in airplane mode most of the time. Encrypted secrets from the phone can be backed up to less secure machines for use in bootstrapping a new phone in the event it breaks.
This is entirely missing the point of my question. Even then, Debian and Ubuntu feature dedicated build machines and prevent maintainers to upload binaries they built themselves.
Edit: u/Foxboron corrected a misunderstanding on my part. NixOS isn't as reproducible as I initially thought.
Note: Former arch user here. Moved to NixOS about a year ago for reasons unrelated to this post.
If you're concerned about this kind of thing and want to see an example of how it can be done in a trustworthy, or possibly zero trust, manner, see NixOS.
NixOS is probably (definitely?) the leader with regard to reproducible builds.Some nix binary packages built from the same git commit have the same sha256 hash no matter when or where they are built. Their infrastructure code is all on Github:https://github.com/nix-community/infra, Community project builds https://github.com/NixOS/hydra, NixOS build server
NixOS also has a pretty strong developer base, with over 600 people involved in the NixOS Github organization.
Additionally, Nixos is a source-based distro, with packages distributed from a binary cache. This allows you to tell NixOS to build packages locally if you so desire.
It's not. They are actively working on Reproducible Builds, but they have only been reproducing less than 1000 packages out of their (idk) 90k packages. While Arch is actively reproducing the entire package set.
I wasn't aware of that. I knew Arch was working on reproducible builds, but I wasn't aware of the extent of the progress.