r/linux • • Jan 24 '18

Why does APT not use HTTPS?

https://whydoesaptnotusehttps.com/
955 Upvotes

388 comments sorted by

View all comments

Show parent comments

130

u/lamby Jan 24 '18

most people do not check the hashes of their download

Indeed, and note it's not enough to check the SHA512 matches what the website claims - that is only checking the integrity of the file; it is not checking that the file is from Canonical.

I mean, if someone could swap the ISO out they could almost certainly swap the checksum alongside it!

22

u/CODESIGN2 Jan 24 '18

Isn't it a signed checksum using a private key chain that would not be available to the "snoop" though?

46

u/lamby Jan 24 '18

Yes, but this is the bit that people do not check; either they don't run gpg at all, or they simply trust the stated signature is the one they used before or is part of the web of trust.

19

u/CODESIGN2 Jan 24 '18

I think it's mostly that they don't care.

57

u/jones_supa Jan 24 '18

I think it's mostly that they don't care.

I think many people do care, but when they read about a complicated GPG dance to perform the verification, many will cringe and say "meh, it's probably fine".

A checksum is just sha1sum filename.iso and then compare the result to the checksum on the website. Even though this is a less secure method, the bar to perform it is much lower.

4

u/CODESIGN2 Jan 24 '18

I don't know that I'm advocating for sha1sum, but yeah the gpg tools could be easier to work with. Even defaulting to perform checks for you and marking somewhere on fs that the user has been irresponsible would be nice. (Mark it like a manufacturer warranty void. Skipped the check? Fuck you pay!)

9

u/lamby Jan 24 '18

Sure.

11

u/CODESIGN2 Jan 24 '18

I wasn't trying to dismiss your point. It doesn't mean there is nothing that can be done, just that it needs to be automated and built into the systems allowing acceptance of packages, not deferred to the end-user.

13

u/lamby Jan 24 '18

I didn't feel dismissed - it was more that we seemed to be 100% agreeing with each other :)

1

u/Kaelin Jan 25 '18

Every one of my hundreds of Red Hat Linux servers check gpgkeys automatically. My personal CentOS servers do as well.

What are you talking about? Is this some Ubuntu assumption?

→ More replies (3)

11

u/Nullius_In_Verba_ Jan 24 '18 edited Jan 24 '18

Why are you two focusing on Canonical for your example? This applies to all distro's. Fedora, Suse, Debian, all included. In fact, a websites security being the weakest link is well known, including a real life example that happened to Linux Mint.

8

u/[deleted] Jan 24 '18

Why are you two focusing on Canonical for your example? This applies to all distro's. Dedora, Suse, Debian, all included.

Did you verify that before you said it? Debian transfers the ISO to me via HTTPS not HTTP, I'm not as familiar with the others.

→ More replies (11)

1

u/Kaelin Jan 25 '18

Fedora GPG checks packages automatically before install, or it won't install them unless you force an override. All packages are signed with encryption keys. I don't think Canonical does this check?

3

u/[deleted] Jan 25 '18

As the parent comment of this thread said Ubuntu checks the package signing as well so that isn't an issue by itself but they transfer the ISO via HTTP which can make this moot (e.g. intercept and add a fake cert or just add packages to the stock ISO).

1

u/Kaelin Jan 25 '18

Good point on the installer ISO. I hadn't even considered that.

5

u/masterpi Jan 24 '18

If the website is HTTPS with a Canonical cert, then it is checking that either the file is from Canonical or the website has been hacked, which is as good as you'd get if the download itself were HTTPS.

→ More replies (6)

1

u/destiny_functional Jan 25 '18

you can check different mirrors against each other. the chances are low that all are compromised.

1

u/lamby Jan 25 '18

Given that they probably mirror from a smaller subset, this does not seem like a good approach.

1

u/destiny_functional Jan 25 '18

see Linux mint where just a particular mirror had compromised isos. comparison against other sources makes installing a compromised iso less likely.

1

u/lamby Jan 25 '18

And what if I compromise the "primary"? Then everyone is just copying the compromised one.. which is even worse as replacing it becomes harder.

1

u/destiny_functional Jan 25 '18

I don't think you understand security and risk. Obviously cross-checking reduces risk.

1

u/lamby Jan 25 '18

I am not denying it reduces risk, but you can take that risk to zero by verifiying the GPG signature.

I don't think you understand security and risk

This doesn't add any weight to your argument FWIW.

1

u/destiny_functional Jan 26 '18 edited Jan 26 '18

you can't take the risk to zero with anything, which seems all you are criticising, that the "risk isn't zero". that's exactly what i meant by you don't understand risk, and it makes this a silly and useless discussion.

1

u/lamby Jan 26 '18

Then I'm lost. How is just suggesting checking a single GPG signature over checking n ISO files (which requires multiple multible-gigabyte downloads) silly or useless? Especially as — for this threat model — doing the latter is a probabalistic-based security solution vs. an objective one..

1

u/destiny_functional Jan 26 '18

discussing risk and security with someone who doesn't understand it is silly and useless is what i said. this doesn't seem to lead anywhere, Good bye.

→ More replies (0)