Comment on Beginner looking for advice on open-source NAS hardware and OS for self-hosting
hperrin@lemmy.ca 6 days agoThat’s because package managers are designed to use mirrors. You have to verify a digital signature because the package isn’t necessarily coming from the package maintainer’s repo.
Docker pulls come from the registry, not a mirror. There is no such thing as a mirror in docker. The registry is something you decide on, and if you don’t trust it, you shouldn’t use it. If the registry itself is compromised, that’s essentially like the private key of a package manager getting compromised. Same risk.
The two biggest registries are Docker Hub and GitHub. If either of them were compromised, it wouldn’t take very long for them to mitigate it. The damage would likely be very small.
You’re talking about publishing infrastructure compromise
Compromise of the integrity of the traffic between your server and theirs can happen. Loads of CAs have been compromised. X.509 root stores insecurity breaks https.
hperrin@lemmy.ca 5 days ago
I feel like your threat model is not realistic. It is way more likely that you will be running malicious and/or vulnerable code that was packaged appropriately by the actual package maintainer than for a CA compromise to allow an attacker to inject a malicious package during a MITM attack while retrieving an OCI image from a container repository.
Like, yes, you shouldn’t 100% trust your ISP or your DNS server, but if you’re that paranoid, you shouldn’t trust your distro’s repository either. You should be building everything from source.
MITM attacks happen all the time. As are there a ton of historical cases of CA compromise.
I can’t think of a time that a Debian maintainer went rogue and put something malicious into the official repos.
And, if they did, everyone would see it. But MITM attacks are not publicly visible because they’re targeted.
hperrin@lemmy.ca 4 days ago
I can literally think of the XZ utils off the top of my head. That was nearly the most prolific supply side attack of all time, and it absolutely was in the Debian repos, signed by the Debian package maintainers. In a docker container, that attack wouldn’t have worked. It’s only when installed on bare metal.