6
submitted 11 months ago by blarp@lemmy.ml to c/linux@lemmy.ml

For me, it's not enough to verify the integrity of an ISO -- I also have to verify its authenticity (or at least verify the checksum file) with GPG. I don't know why, but just need to see that "Good signature" message before I feel safe installing Linux.

I notice, though, that the download pages of some prominent distros (Pop_OS!, openSUSE, etc) just give you a checksum, probably because they feel that anything else is unnecessary. This makes me shy away from installing them, which is a shame because I'd like to give some of those distros a try on bare metal.

Am I being paranoid when it comes to installing Linux?

all 35 comments
sorted by: hot top controversial new old
[-] tony@lemmy.hoyle.me.uk 42 points 11 months ago

You know which site you're getting it from..check the SSL certificate and that's enough. If an official site got breached it'd be found out pretty quickly.

[-] lemmyvore@feddit.nl 7 points 11 months ago

There's no relation whatsoever been the website certificate and the files it serves. And anyway the ISOs are downloaded from somewhere else like an FTP site, not from the website.

There have been cases where a breach that added malware to downloads went unnoticed for quite a while.

GPG signing with a key that's already be published and distributed in advance is the only really secure option.

[-] dewritoninja@pawb.social 35 points 11 months ago

This point just compile from source

[-] moreeni@lemm.ee 41 points 11 months ago

Somebody could've pushed malware in the code, write all software yourself.

[-] hunter2@sh.itjust.works 31 points 11 months ago

Someone could've pushed a malicious compiler. Better write all the bits by hand.

[-] OddFed@feddit.de 30 points 11 months ago

Someone could have compromised the CPU interface, better build one from scratch.

[-] russjr08@outpost.zeuslink.net 23 points 11 months ago

Someone could've compromised the materials used to build the CPU, better assemble the atoms together one by one.

[-] cows_are_underrated@feddit.de 3 points 11 months ago

Somebody could have pushed Malware in the machines used for building your Cpu Better to just die.

[-] AnUnusualRelic@lemmy.world 8 points 11 months ago

After reading all said sources, of course.

With a hand written compiler.

[-] Pantherina@feddit.de 2 points 11 months ago

No not really, authenticity of compiled software is needed to start trusting this person

[-] the_q@lemmy.world 21 points 11 months ago

You're being a little paranoid.

[-] hunter2@sh.itjust.works 18 points 11 months ago* (last edited 11 months ago)

What is the benefit of a gpg signature over a checksum? In either case you have to trust someone.

[-] WhatAmLemmy@lemmy.world 7 points 11 months ago* (last edited 11 months ago)

Signature = authentication: signed (presumably) by the private key of the project owner(s).

Checksum = integrity: confirms the file hasn't been corrupted or tampered with in transit.

If the checksum file is signed by the project owners, that's the highest guarantee available that the file on your local is identical to the one compiled by the project owner(s).

[-] hunter2@sh.itjust.works 7 points 11 months ago* (last edited 11 months ago)

Where do you get the public key to verify the signature from? My point being, that you have to trust someone. I don't really see the benefit of trusting a key server, that the public key really belongs to the owner over a checksum file being published on the website of the owner.

[-] lemmyvore@feddit.nl 1 points 11 months ago

You mean trusting a key published on a different site (and replicated between all GPG key registries), Vs a checksum published on the same website that's serving you the suspect ISO?

Which do you think is more likely to also be compromised?

[-] hunter2@sh.itjust.works 1 points 11 months ago

Oh you are absolutely right about it being much harder to compromise the distro website as well as a key server. And as much as I am aware of the concept of the web of trust, I still do not get how you securely draw a relation between a key on a third party website and the publisher of a distro?

I just checked for OpenSuse and Fedora. Both link to their keys on their own website, which both target files on their own domain. And even if they linked to a third party, what is stopping an attacker, who already managed to swap the iso and checksum file to also change the link to the key server?

You are right about already imported keys. But why would someone, who does not already have distro xyz installed, have the keys of the publisher of distro xyz imported?

Thanks in advance for the discussion!

[-] lemmyvore@feddit.nl 2 points 11 months ago* (last edited 11 months ago)

how you securely draw a relation between a key on a third party website and the publisher of a distro?

You publish the master GPG key in a DNS record for the website you download from, and you sign the DNS records with DNSSEC. (Yes I know, ironically the TLS cert for the page with the explanation has expired last month...) You can also use DNS records to enable autodiscovery of the GPG keyserver hosting the relevant master key.

Once you have one GPG key you can trust you can use it to verify downloads as well as other GPG keys.

Unfortunately most Linux distros don't use DNS records. Most of them publish the GPG key on the same page as the checksum, which can be compromised just the same, you are correct. Some of them publish their key on a separate keyserver, but to find that key you need to know its fingerprint or its associated email address... and if those are provided via the download page then you're back to square one. 😆

[-] hunter2@sh.itjust.works 2 points 11 months ago

TIL about GPG keys in DNS records. Thanks, that is indeed a real benefit!

[-] lemmyvore@feddit.nl 3 points 11 months ago

GPG keys are hosted on separate websites not on the distro's website, and also replicated (there are multiple GPG key registries) and if you have previously used a GPG key you already have it.

So now let's see. With just checksum, the attacker that wants you to download their malware-riddled ISO just has to break into the distro's website and change the checksum in one place. If they managed to break in and change the ISO there's a good chance they can break in to change the checksum too.

On the other hand, if the distro publishes a GPG signature, the attacker would have to compromise all the GPG registries and may still fail if you already had the good key.

Even if they managed to do that, if the key is used to sign other downloads, that the attacker hasn't changed, now the signature check will start failing for those, alerting other people.

It's just a lot harder to falsify downloads signed with GPG than just checksums.

[-] nakal@kbin.social 10 points 11 months ago* (last edited 11 months ago)

(My opinion) No, you aren't paranoid. I'm thinking a bit like you, but I also consider probabilities. You need to download the checksums from the official website and the ISO from mirrors. Two different sources would need to be hacked. This is where I say, it's hard and secondly someone would notice that hack very quickly.

Signing the ISO or the checksums with a well-known signature is still important. I verify it, if a signature available. It's just a couple of seconds and doesn't cost anything.

[-] blarp@lemmy.ml 2 points 11 months ago

Oh, that's a good work-around. Thank you.

[-] Acters@lemmy.world 7 points 11 months ago

No, and yes

A partly because there is always small risk involved in everything in life. However, you do need to realize what the paranoia is supposed to help prevent. If you install an unverified os thar hijacks the machine, then you will need to live the loss of the machine. Particularly, your paranoia stems mostly because you are afraid of losing your privacy or machine to a possible malicious attack. The proper way of mitigating this is to build from a verified source instead, as in you know what the code is, but you can't because the systems are too complex for a single person to verify manually. Unfortunately, your paranoia is too shallow and unfounded, and you will need to do some self reflection to come to the acceptance of a world you can not know or control.

On the other hand, when you are doing proper procedure to do a basic verification step to prevent corruption or possible simplistic malicious attacks, it is good behavior. It great you feel the need to verify your distributions and that your paranoia is likely not paranoia at all! A simple checksum is nice. Also, how can you verify that a gpg key is also a good one and not a tampered gpg that matches the tampered ISO? There is a level of trust you have, and your paranoia is simply never going to be able to be paranoid enough to encompass everything. You are forced to place some trust in something. After all, there are vulnerabilities found in gpg software that does either the encrypting step or verification steps(either from gaining the private key or the verification step throwing false positives). There is only so much we as normal people can do.

So overall, it is both. You are responsible, and your paranoia is too shallow to be useful for you. Go the extra steps and compile from source. It is safer because the code is less likely to be tampered and you can know it is right because you made it yourself.

[-] blarp@lemmy.ml 0 points 11 months ago

Wow thank you for this thorough explanation.

[-] Acters@lemmy.world 2 points 11 months ago* (last edited 11 months ago)

BTW someone made a guide on verifying the Pop OS checksums validity with gpg as the checksum is made with gpg key. https://gist.github.com/davidk/faf4018dd028ea997383f69e72c8572f https://github.com/pop-os/ISO

[-] blarp@lemmy.ml 0 points 11 months ago

This is awesome. Thanks so much.

[-] GustavoM@lemmy.world 7 points 11 months ago

There is being careful, and there is "The sky is emitting a weird tone of blue. Am I going to die?" kind of "being careful".

[-] TheEntity@kbin.social 6 points 11 months ago* (last edited 11 months ago)

From where would you get the public GPG to verify the signature with? How do you know this specific key is the one to trust? Like @tony above said, the best verification when you have no pre-existing trusted channel is the SSL certificate of the website you get the ISO from.

[-] knobbysideup@lemm.ee 3 points 11 months ago

Each individual package is also signed.

[-] Presi300@lemmy.world 3 points 11 months ago

I'd say paranoid, most Linux installers download packages from the repositories anyways, so must ISOs are just a way for you to boot the installer.

[-] oshu@lemmy.world 2 points 11 months ago* (last edited 11 months ago)

As a person who takes a belt-and-suspenders approach to security, I agree with you and I do the same.

When I make a code change, even just to a comment, I run the full regression test suite again.

[-] missingno@kbin.social 1 points 11 months ago

Are these mutually exclusive?

[-] MrAlternateTape@lemm.ee 1 points 11 months ago

Going a little overboard there in my opinion. If one of the major distributions would catch something sketchy, a whole bunch of tech savy would be all over it in no time.

this post was submitted on 15 Oct 2023
6 points (57.1% liked)

Linux

47484 readers
1115 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS