Skip to content

Is it good to have only HTTPS mirrors in your mirrorlist, since it's encrypted?

Not downloaded yet

Edit: Yes.

Edited 1 Nov 2020. We only hold this version.

132 points27 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
132 · 98% up
Kind
Image
ID
it283g

Author

39
posts
57
comments
7
media
View profile

33 comments

It prevents MITM attacks when packages and databases aren't signed, but I don't know enough about how pacman works to tell you if it's really needed.

Personally I only use https, but that's because I'm paranoid.

83 points

Yes, the package databases are not signed.

It's also true that TLS helps to mitigate that weakness by ensuring a database isn't modified in transit. The mirror itself could still become compromised, of course. The latter is the most realistic method of attack in the first place, I would think, if a third party wished to serve you a bogus DB. Additionally, I suppose it also helps hide which packages you download from the mirror if you care about that.

So https mirrors slightly help protect you against the meagre danger of a bogus package database. On the flip side, there's hardly any reason not to use https mirrors, especially if there are sufficiently many high quality https mirrors available for you to choose from in your region.

IMO you should use them if you can, but don't sweat it if you can't.

44 points

What is the implication of package databases not being signed? As long as the packages themselves are signed it doesn't seem like a compromised mirror could do much

7 points
unknown author

Deleted before we saved it.

1 points
unknown author

Deleted before we saved it.

1 points

If the connection is unencrypted (or at least unauthenticated), a MiTM could exploit flaws in the update process of the package manager itself, so it is a good idea to to use HTTPS as a mitigation.

https://justi.cz/security/2018/09/13/alpine-apk-rce.html

https://justi.cz/security/2019/01/22/apt-rce.html

78 points

Encryption isn't the main problem. It's Man in the Middle.

TLS also verifies authenticity of the server. You want to make sure you are getting binaries to install on your system from a verified location not a potentially spoofed location.

5 points

Using https only does have security and anonymity advantages, but in my opinion, the advantages gained are not enough to justify not using the http mirrors.

I use both. I start with the https mirrors for my country, and then use the https mirrors for the next closest country, then the next closest and so on. Finally I end my list with the http mirrors; starting with my country, and going to the next closest, as with the https ones.

As the mirrors are read in sequence going down the list from top to bottom, this means I rarely use the http mirrors, as pacman rarely reaches that point in the list; but, they are there, as backups, if for some reason the https mirrors all fail. Or for the rare occasion when a package I want is only available from an http mirror.

2 points

Using https only does have security and anonymity advantages,

Worth noting SNI part of the handshake isn't encrypted so any party listening on the wire will know the vhost you're connecting to.

the advantages gained are not enough to justify not using the http mirrors.

HTTP mirrors provide the baseline. HTTPS mirrors provide both the baseline and some added benefits. In my opinion, it's enough to drop HTTP from the mirror list.

7 points

I would prefer using https mirrors only, but there just aren't enough of them that provide fast, reliable service.

1 points

I use the ones located in Germany as they're the fastest for me in EU and it uses almost my whole bandwidth so I get 30+MB/s.. can't complain tbh..

1 points

Pacman 6 will come with parallel download support. Meanwhile you can use my script pactman-parallelizer...

1 points

I use only HTTP mirrors because:

  • Packages are signed and checksumed, there's no realistic way a MiTM can modify and insert malware in those packages without those checks failing, which would result in pacman throwing away the download and starting again from another mirror. The wost a MiTM could do is serve a old version of the database/packages, which then again, not very scary, and I'd probably realize within a week or so anyway. This wouldn't force a downgrade even.
  • Allows for transparent caching, I cache HTTP downloads in my home, allowing me to download the packages from the internet only once, after that the transparent cache will serve the file to other hosts, greatly reducing download times
  • Using HTTPS is often slower, due to fewer mirrors supporting it, and those being further from me, so I'd trade 5-10% speed to get a marginal security boost. Plus it doesn't allow for transparent caching without installing custom CA certs on each device, which is a pain to do and maintain
1 points
unknown author

Deleted before we saved it.

1 points

At this point in the internet, there should almost be no such thing as http; only https. I agree with @couye

Especially when it comes to downloading core packages for your operating system.

I’ve downloaded rpms and docker images from questionable sources “because it was easier,” only to find bitcoin miners in our dev stack because libraries can be patched easily by a sufficiently motivated party.

That, of course, can also be done over https. But any party who takes the time to put their ssl certificate on their repo/mirror is also probably actually paying attention to the contents of their repositories.

It is definitely about security on a technical level for things like man in the middle, but importantly about the quality of the remote data. You can post an evil file on a remote site and update a checksum fairly easily. I look for indicators that the remote side is responsible for their data, and one of them is https.

1 points

I use both. It gives me more options for downloading.

-2 points

Of course is it ;)
No explanation is needed !

You should run away from HTTP !

-3 points

Why?

The packages are all signed and checksumed. HTTP is perfectly safe in this context, you can't modify the packets in transit to add malware/etc because then the package would be discarded and downloaded from another mirror until it finds one that matches the checksums and signatures.

1 points

You're right, the packages are checked.

But firstly, it prevents data leakage (even though HTTPS is decodable during an MITM, it is deterrent). Then we are not immune to a still undiscovered vulnerability (at least to the public).

If we care about security, we might as well go all the way.

1 points

I don't recommend it, because it wastes cpu and ram. you have to be using shitty network to get man in the middle attack. you probably should worry about many more other things under such network.

-12 points

This tops the stupid things I have read this week.

I don't recommend it, because it wastes cpu and ram. you have to be using shitty network to get man in the middle attack. you probably should worry about many more other things under such network.

7 points

I don't recommend it, because it wastes cpu and ram

The cpu overhead of TLS is minimal on modern chipsets, even for web servers that are doing tens/hundreds/thousands of requests a second: https://istlsfastyet.com/ When you're downloading a half dozen packages you shouldn't even think about it.

you have to be using shitty network to get man in the middle attack.

ISPs like to MitM, as do governments, and rarely do you have a choice about either.

6 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.