News for hackers. Stuff that matters.
Re:Debian apt security update: man-in-the-middle arbitrary c... by serbuvlad on Wednesday November 04, 2026 @08:26AM (#50365232)
It's always been strange to me and I've been saying forever that I don't get why package repos don't use HTTPS.
Re:Debian apt security update: man-in-the-middle arbitrary c... by ferngodfather on Wednesday November 04, 2026 @08:30AM (#50365268)
I get it to a point because it can be a chicken and egg situation sometimes, but there has got to be a better way.
Re:Debian apt security update: man-in-the-middle arbitrary c... by InsidiousWombat on Wednesday November 04, 2026 @08:30AM (#50365275)
theoretical model means that the transfer method doesn't matter.

Of course, that breaks if implementation checks the signatures in wrong moment

Re:Debian apt security update: man-in-the-middle arbitrary c... by vesinisa on Wednesday November 04, 2026 @08:46AM (#50365440)
There have already been quite a few vulnerabilities in the implementation that would have been avoided if the transport itself was simply protected in line with the industry standard practice of using TLS by default.
Re:Debian apt security update: man-in-the-middle arbitrary c... by InsidiousWombat on Wednesday November 04, 2026 @09:34AM (#50366088)
The ones I looked at could be summed up to "well the redirects are misbehaving again"

Assuming transport is compromised and you can only trust package signatures IS A GOOD THING. Extra security layer on top of it is nice of course but arguably if it was all https we would've never found this bug and then in case of CA compromise attacker would have plenty of bugs to use to fool apt.

The problem is that they failed ordering of validation; it should be "download from source" (of any type, remember that http(s) isn't only way) -> put into temporary dir -> validate, regardless of source used.

There are also edge cases where HTTPS does hurt you, on system without reliable time (and there is quite a few SBCs that don't have RTC) you would just not be able to download the packages at all because all certs are in future.

Re:Debian apt security update: man-in-the-middle arbitrary c... by tremon on Wednesday November 04, 2026 @10:16AM (#50366779)
> it should be "download from source" (of any type, remember that http(s) isn't only way) -> put into temporary dir -> validate, regardless of source used

This is what apt already does. The problem is that a malevolent source can see a client downloading package #1, then on seeing a request for package #2 it issues a redirect to a doctored package #1 and because apt stores files based on the remote name and not the requested name, it will overwrite already-downloaded package #1. The validation fails on downloaded package #2 but apt doesn't abort the install process, it simply skips it (and any dependencies) and continues to install the downloaded and previously-validated package #1.

There's plenty of ways to solve this, and none are obvious if you are unaware of this attack vector:

a) use per-package tempdir instead of per-source: no obvious benefit

b) use request package name instead of remote url filename: it would be dangerous for apt to assume that it knows better than a package mirror what the expected filename for a package is (it's strictly defined by Debian policy)

c) immediately delete downloaded package if validation fails: obstructs problem analysis and digital forensics

d) abort install process if a package fails validation: reduces resilience in the face of network errors (e.g. if the mirror is in the process of updating itself)

Re:Debian apt security update: man-in-the-middle arbitrary c... by vesinisa on Wednesday November 04, 2026 @01:12PM (#50369374)
Not exactly sure how would a system be able to connect to Internet to download package updates but be unable to source a correct time reference from NTP?

But yes, it should probably be a Debian installer question: use HTTPS sources or not. Debian is the universal operating system but most users running a desktop or server setup should choose YES. The setups where you really want plain HTTP sources are an edge case and users setting up such systems probably already know about their special requirements, so HTTPS sources should really be presented as the default / "if in doubt" option.

Re:Debian apt security update: man-in-the-middle arbitrary c... by krautsauer on Wednesday November 04, 2026 @08:48AM (#50365463)
Easier to put caching proxies on the path?
Re:Debian apt security update: man-in-the-middle arbitrary c... by Avamander on Wednesday November 04, 2026 @09:07AM (#50365720)
Who actually does that this day and age?
Re:Debian apt security update: man-in-the-middle arbitrary c... by tremon on Wednesday November 04, 2026 @09:58AM (#50366444)
I do. Helps massively when seeding virtual machines using auto-install scripts.
Re:Debian apt security update: man-in-the-middle arbitrary c... by moebrowne on Wednesday November 04, 2026 @12:22PM (#50368673)
Same. It's faster and feels respectful to not keeping hitting freely provided repos for the same packages over and over. Someone has to be paying for the bandwidth.
Re:Debian apt security update: man-in-the-middle arbitrary c... by krautsauer on Wednesday November 04, 2026 @07:26PM (#50373374)
Thinking about it, that's not a good argument for http being the default. If you're seeding VMs, you're already in control of the config. Using a dedicated repository proxy (apt-cacher-ng? sonatype nexus? pulp? something?) might even perform better than a generic caching proxy.
Re:Debian apt security update: man-in-the-middle arbitrary c... by tremon on Friday November 06, 2026 @05:57AM (#50390796)
Yes, I use acng. I still consider it a caching proxy, even if it's an application-specific one.
Re:Debian apt security update: man-in-the-middle arbitrary c... by elboulangero on Wednesday November 04, 2026 @11:42AM (#50368170)
Developers
Re:Debian apt security update: man-in-the-middle arbitrary c... by Avamander on Wednesday November 04, 2026 @01:41PM (#50369759)
So a minuscule part of the install base that can absolutely alter system configuration to use a local mirror.

Not something that should be the default, exposing everyone to the dangers.

Re:Debian apt security update: man-in-the-middle arbitrary c... by basilikum on Wednesday November 04, 2026 @08:52AM (#50365526)
It's not the default, but you can install apt-transport-https and then just change the update URLs to https assuming your mirror supports that.
Re:Debian apt security update: man-in-the-middle arbitrary c... by sczi on Wednesday November 04, 2026 @10:16AM (#50366777)
you can just change the urls to https, apt-transport-https isn't needed anymore, it's builtin to apt now.
Re:Debian apt security update: man-in-the-middle arbitrary c... by MiscIdeaMaker99 on Wednesday November 04, 2026 @09:08AM (#50365738)
I would speculate that it's inertia due to decisions made a decade or two ago, before we decided that everything should run via HTTPS.
Re:Debian apt security update: man-in-the-middle arbitrary c... by lousken on Wednesday November 04, 2026 @05:10PM (#50372233)
you can inspect the traffic even without ssl inspection