53 points vesinisa 1 hour ago 50 comments
hiddenvulkcan 1 hour ago | parent
bradfa 1 hour ago | parent
hiddenvulkcan 43 minutes ago | parent
I didn't know that about apt, interesting choice!
TZubiri 38 minutes ago | parent
EDIT: With 'AV:Adjacent Network' and A 'User Interaction: Required' and max impact (High on Confidentiality, Integrity and Availability, assuming worst case), then it gets a score of 8.
The subjectives lower the severity to my eyes as well, including the use of HTTP mirrors (which is the default notwithstanding), and the attacker needing to be an existing mirror at the time of the announcement, which is already a vetted group (or be in the path between the user and the mirrors, umm that is quite possible though, but quite hard to target). And finally the window for the disclosure and attacks is almost null, someone needs to use apt to be vulnerable, but if they use apt, they are probably autoupdating apt itself, I wonder if a simple 'apt install thing' will trigger an apt upgrade, in order to patch those that are not running autoupgrades.
RagingCactus 28 minutes ago | parent
I always strongly argue against framing MITM scenarios as AV:Adjacent as MITM attacks can be performed at any point of the transmission path. If someone MITMs the package mirror the attacker is certainly not adjacent to the vulnerable component. I argue in favor of using Attack Complexity: High instead, as you do need to be in a MITM position.
And while UI:Required could be argued, there are also unattended upgrades and updates are performed regularly anyway. CVSS 4 makes some progress here with UI active vs passive, but ultimately CVSS is often not helpful for capturing the unique risk of a vulnerability.
vesinisa 1 hour ago | parent
Sounds like the vulnerability is in the HTTP handling code, and because apt downloads packages over plain HTTP a man-in-the-middle position would be enough to exploit it.
It almost seems like a repeat of two previous apt vulnerabilities:
In 2019: https://lists.debian.org/debian-security-announce/2019/msg00...
And in 2014: https://lists.debian.org/debian-security-announce/2014/msg00...
greggsy 1 hour ago | parent
vesinisa 1 hour ago | parent
TZubiri 45 minutes ago | parent
I think the idea is that debian distributes the hash themselves through their domain, and mirrors offer the downloads either through http or https. So that you don't need to trust the mirror, you just verify the debian given hash. Only weakness would be a hash collision or a cve like this.
DaSHacka 20 minutes ago | parent
The way packages are validated actually is through the same channel as you download the packages themselves from (IE your mirror), they just are signed with the Debian package signing key(ring), of which only a select few maintainers have authorized private keys for.
This does mean an adversary (whether a MITM if you're using HTTP or malicious operator on the mirror server itself) can technically serve you old versions of an (officially signed) package indefinitely and your package manager would be none the wiser, but otherwise this approach actually works quite well.
angry_octet 1 hour ago | parent
InsidiousWombat 50 minutes ago | parent
greggsy 1 hour ago | parent
Is there a German word for a broken tool that can only be fixed by using the same broken tool?
12312987 1 hour ago | parent
How are you going to update if apt is compromised?
throwaway74354 50 minutes ago | parent
Download the package with your http client of choice, install with sudo dpkg --verify -i
teddyh 34 minutes ago | parent
mariofdistrust 1 hour ago | parent
serbuvlad 57 minutes ago | parent
ferngodfather 52 minutes ago | parent
InsidiousWombat 52 minutes ago | parent
Of course, that breaks if implementation checks the signatures in wrong moment
vesinisa 37 minutes ago | parent
basilikum 30 minutes ago | parent
MiscIdeaMaker99 14 minutes ago | parent
flotzam 53 minutes ago | parent
If necessary, with instructions for downloading and verifying it out of band
Or maybe by passing a parameter to the old apt that disables the vulnerable HTTP download resumption when downloading the new apt
TZubiri 48 minutes ago | parent
flotzam 44 minutes ago | parent
But yes, they could have mentioned HTTPS to make the announcement at least half-assed. Even just saying "good luck not getting exploited" would be an improvement over literally nothing
InsidiousWombat 53 minutes ago | parent
Karliss 29 minutes ago | parent
1) Apt downloads first package (unmodified)
2) apt checks signature -> signature checked and remembered as valid
3) apt downloads second package, http redirect to the same url as package 1
4) the second package overwrite first one due to sharing URL. The temporary storage name or download cache key is derived from URL.
5) signature for package 2 fails but first one (already overwritten by bad one) is still considered good
6) Package 1 gets executed because the signature check already passed in step 2
Note sure where exactly resuming an HTTP download fits in. Maybe step 4 also requires pausing and resuming the update process. Which could involve some state serialization/deserialization vulnerable to conflicting URL confusion.
justinsaccount 27 minutes ago | parent
> APT can merge two different package downloads after an HTTP redirect gives them the same URI
It sounds like the verification is ran but there is some deduplication or caching involved keyed on the destination of the url redirect, not the original source.
So could imagine a malicious server that:
Responds for a request for foo.deb with a redirect to evil.deb containing the original foo.deb. This validates properly.
Responds with a second request for bar.deb with a redirect again to evil.deb that now returns a malicious package. The downloading code thinks it has already validated evil.deb
hypfer 33 minutes ago | parent
Is it going to be fixed for oldstable?
basilikum 32 minutes ago | parent
bookworm-security has the fix
iamnothere 26 minutes ago | parent
I never understood the insistence on using HTTP as a default for apt. Once HTTPS transport was available and tested (which took forever btw) then it should have become the default. Maybe this will spur some changes.
ducktective 17 minutes ago | parent
iamnothere 13 minutes ago | parent
Avamander 10 minutes ago | parent
sznio 7 minutes ago | parent
Avamander 15 minutes ago | parent
Exposing all of the internals of something to any and all MITM keeps on demonstrating how it's a dangerous idea.
Hopefully this example settles at least some of this pointless discussion.
londons_explore 6 minutes ago | parent
I think this demonstrates exactly why everything should be https.
teddyh 2 minutes ago | parent