How does Arch stack up security wise against other distributions?
I thought this might be an interesting question in the context of the recent incident with Linux Mint. This article suggests that it is difficult to provide a secure and stable Linux distribution with so little manpower.
Since Arch isn't backed (as far as I know) by major corporations like Fedora or Ubuntu are, could it possibly run into similar problems?
Edited 24 Feb 2016. We only hold this version.
About this post
- Posted
- Archived
- Edited
- Score
- 62 · 100% up
- Kind
- Text
- ID
- 47ezol
112 comments
Everything that Arch releases is signed ([1]), so it is possible to verify that whatever you downloaded was created by an Arch Linux developer. However, there are no background checks and no security audits. A developer could be evil, or his private key could be stolen. In such a case, all that can be done is revoking that developer's key (but then, damage has already been done).
[1] I am actually working on delivering cryptographically signed netboot images, so that even netboot from a public ftp server is secure. However, I don't get to it too much, so it might take some time until I actually finish that work.
This should be upvoted more. The issue with Mint was that you verified it with an md5sum. Arch linux packages and ISOs are cryptographically signed. If you verify the signature, it means it hasn't been tampered with since it was signed.
I would like to clarify here that the difference is that you can just change the md5sum to match the download and thus mask your tampering, where as if it were cryptographically signed you could not do it without also having the private key.
Plus, Arch has several mirrors, which also distribute the signature, so if you download the iso from one mirror and the signature from another, you can avoid trouble unless both mirrors (or the original distribution) are compromised.
Happy Archer here that also has Linux Mint experience. Linux Mint ISOs have been verifiable with sha256sum for a long while and for the past few releases the sha256sum is gpg signed (all the current Linux Mint 17.x release have a gpg signed sha256sum). sha256sum and gpg signature are stored on each mirror. It's not as bad as folks make it out to be.
Though arch does seem to be a bit behind in new developments. I wasn't using arch at the time, but wasn't arch one of the last distros to get signing? Hell, debian is working on reproducible builds right now.
Yup, I have tried to point that out since the day I started Arch but somehow no one wants to understand that. Thanks for your comment !
This seems more like a problem with the administrators of Mint's website and not anything to do with Linux. It's impossible to know whether Arch's website could be similarly hacked, but consider that mint's website does not even use TLS.
TLS would not have saved them from this attack. The attack came from a wordpress vuln.
Deleted before we saved it.
But apparently distributions like Linux Mint, Elementary etc have difficulty taking packages from upstream and implementing them in a secure way. In some cases that they didn't even update at all because it would break things. I don't think it is just web admin mishap.
If there is one thing you can say about Arch it is that it is very up to date so that is not a worry.
There is no absolute security.
IMO:
As long as no pgp key get into the hand of an attacker we should be pretty safe.
And arch users tend to know there system quite well and would notice strange behavior very fast.
Well this is an incredibly misleading statement.Arch has its own security team and even issues CVE alertsEdit: don't omit letters in words when you read them, kids!
Did you perhaps misread like I did? I read, "there is absolutely no security" the first time. Then I got riled up and reread it correctly as, "there is no absolute security."
Or are you referring to a different portion of the comment?
If one person (let's say with full GPG trust) fucked up and lost a key to an attacker, what damage could they do?
Publish malicious packages that pacman would accept on your next update.
Red Hat / CentOS / Fedora are the only distros(?) that ship with SELinux enabled by default. Alpine ships with grsecurity by default.
Standard distributions that do not ship with either are likely less secure.
The security of their websites is another discussion and doesn't necessarily correlate with the security of the distributions themselves. Even CIA's / NSA's websites have been hacked (at least DDOSsed) iirc. It doesn't necessarily mean much.
My resume from about 7 yrs ago is still sitting around on the net somewhere from an Anonymous attack on a company I applied to which was a security company that the CIA uses for malware....
Arch is as secure as you set it up to be.
How would you secure a system with tainted core packages (with malicious code) in the arch repositories?
are all the repositories compromised?
and there's always the option of using the upstream versions (which could be compromised as well.... as could you cpu or some other piece of hardware) really the only way to get 100% security is to design and build everything yourself (including fabbing the chips)
Well the AUR is a massive glaring security hole compared to the normal repos.
I wanted to write the same, however this can be said for Ubuntus PPA, maybe even for packages in Ubuntu universe which are maintained by MOTU.
I bet it's the same for inofficial Gentoo overlays and for inofficial Debian repositories.
If you're download software from github or some other site and run './configure;make;sudo make install', same thing as 'curl | sh'.
It's about trust, do you trust the maintainers of the distribution to do it right, do they understand security and do they have processes in place? Do you trust the github, the softwares author, the PPA owner?
In the past the answer was to stay within the official packages of your distribution, but that has its limits.
At least with the AUR you can read the PKGBUILD yourself and see where it pulls the code from and which commands it executes. With PPAs you get a prebaked binary that you have to trust was compiled from the source that it claims to be.
I agree.
Running arbitrary code is running arbitrary code no matter how you do it.
which nobody forces you to use and contains no essential sw
As a community we should really start taking reproducible builds more seriously... It would be yet another security layer: https://bugs.archlinux.org/task/43407
nice
SELinux/Apparmor for certain services would be a step forward.
It's not like Ubuntu does it for every application, maybe for a dozen.
On the user side of things Arch is extremely securable, perhaps beaten only by the likes of Gentoo. As far as server side, the base system ticks all the right boxes unless there's administrative errors in judgement we don't know about.
How do you come to that conclusion? Because you like Arch? Serious question, not trying to start a fight or something.
Fedora compared to Arch comes with SELinux enabled which is a pain in the ass to set up in Arch in can not be used if you stick to the official repositories of Arch Linux (replace kernel, systemd, coreutils and more with AUR variants) if possible at all (I don't follow that topic).
Fedora enables ASLR for all packages, Arch for a handful of packages.
The Arch kernel doesn't come with support for the audit framework, something which works out of the box in Fedora.
So I don't say you can not somehow arrange most of those things in Arch as well but I don't see how you think it's more secureable than let's say Fedora.
Fedora comes with more things out of the box, and some of those things come with sensible defaults. That said it's generally easier to add things to Arch as the admin sees fit, especially when you start talking about things that require more extensive modification of the OS to properly configure. ABS makes it fairly easy to do custom compiles as needed and the AUR often has tools you'd be hard pressed to find with any regularity on other distros. Basically it's either no more of a pain in the ass, or significantly less of one, to comprehensively harden Arch than it is with any other binary based distro.
The only reason I suggest Gentoo is easier is that with Gentoo hand compiling with custom options and toolchain are par for course rather than a secondary concern for those who understand how to use their distro's package building tools.
Ok, I've never set up arch with sellinux, but I don' remember gentoo being a huge pain.
Up-to-date packages with no unauthorized patches. Let the dev teams (Mozilla, Linux, Apache, etc) handle their code how they need to, and use the latest version, instead of some hacked-together codebase, to stay up-to-date with fixes in the most recently known exploits.
We have package signing now, but that was a long debate. I've been using Arch for six years, and it was raging way before I came in.
What happened to Mint had nothing really to do with corporate backing, or a lack thereof. kernel.org got hacked, stores get hacked. It's just an issue of a vulnerability. Even Canonical or Microsoft couldn't stop an attack they don't know is going to happen. There will always be a hole to break in through.
Hell, one time I was helping my brother get an Ubuntu LiveUSB set up, and they were experiencing overload from Ubuntu users that rendered their entire file hosting system useless simply from the volume of traffic they got. I'd say that the bigger guys are even more vulnerable (Mint is much more popular than Arch, with more naive users, and so is a better target).
From here, we go out of my depth, and into stuff others mentioned with signing ISOs and the like.
and i compile with -march=native on a haswell and you on a skywell and the sigs no longer match
unless you want to force everyone to use the most generic compile settings
Any OS is only secure as it's been configured by the user. Arch relies upon pgp keys for package installation so unless you get a dodgy key slipped into arch (and it doesn't get revoked) then you're not able to install downloaded packages if a valid key isn't found (though you can still download them and install them manually using pacman -U <pkg>). Pacman isn't SUID so you'd have to be a root user to install the package for a system-wide dodgy executable.
There's a lot to security, extra packages give you more software but also more attack area for people to get in e.g. if you install a backup utility that has a program with SUID (run as root regardless of who runs it) and it has an issue that might allow someone to run other commands, etc.
The less features you have (and the more locked down it is), the more secure it is but the less you can do with it. The most secure PC is a PC not connected to the internet that you can't login to, haha.
The main thing with security is user-knowledge (i.e. don't go clicking dodgy adverts saying 'click here for free $9999 software package') which is backed up with malware/antivirus scanners (I'd recommand clam, there are rootkit scanners available too though ironically one had a security flaw that'd execute a file in /tmp/ as root which could be edited by any user...)
I am on Arch because of its quick and constant updates (which prevents 0-day exploit quite good but not perfect yet).
How ever, I think that's it when it comes to security:
.
One important consideration:
Arch doesn't use anything from the ISO when you install, assuming a properly functioning pacstrap. As long as the mirrorlist used by the ISO isn't modified, the files the bootable image pulls will still be the standard set, rather than whatever was on the modified image.
This is also true of Debian and most (all?) other rolling release distributions. It's also why the Arch bootable ISO is only a few hundred MB, while Mint is now several GB.
That means an Arch hack hitting the population would require:
OR
So, there's one extra level, and a relatively difficult one.
Unfortunately, the AUR is quite insecure by comparison. All you need to do there is:
Most users don't bother to check the results as long as they don't conflict with anything else. Make your package conflict with
sland silently autocorrect tols, for example, or make it a patch so the conflict makes sense, like withwine-stagingandwine, and you'll have plenty of targets to weaponize.I'm a new archer (as of last night), so if I can piggy-back on to this with a couple of questions...
It seems like the ease of keeping arch up-to-date can be a liability to zero-day attacks. Is there any mechanism to push out warnings to update besides twitter?
It's great that bug fixes can get pushed so quickly, but isn't it a concern that updating the system to fix a security hole could open up a zero-day vulnerability in a different package?
Fixing a known exploitable bug is more important that possibly creating a new, unknown bug.
There is that.
You get new bugs, and you fix old ones. Personally, I'm riding on the fact that new bugs are more likely to be discovered when the software has been in use for a while, instead of RIGHT AS a release is made. Arch follows upstream better than most, so fixes can be installed a lot quicker.
I mean. You can go a long way with how long down the road it is before you're happy with how well tested something is. Think of this:
Jump in wherever you want. Realistically, you will be safe from day zero problems most of the time. If you're truly worried about day zero problems, don't use a cutting edge or even mostly near cutting edge distros. Arch, Fedora, and Ubuntu are at about equal risk of day zero problems. Debian Stable, Mageia, and Slackware are more the direction you want to go if you want fully tested software.
Ubuntu and Debian stable don't do new releases of software, you will almost never see a package getting upgraded to a new version. You will, however, see security updates. Ubuntu and Debian are pretty much equal in response time to security issues from what I've seen. Red Hat is ofter slightly faster for RHEL, since they are the ones who find a lot of them.
replace gnome and the spyware and we can talk about having ubuntu on the list
there's a .bashrc file somewhere which will print the 10 latest news items, you could put the warnings there
Arch's security relies on upstream and your configuration.
it's as secure as you make it mostly
other than things like heartbleed and such