Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 43 |
Nodes: | 6 (0 / 6) |
Uptime: | 101:27:42 |
Calls: | 290 |
Files: | 905 |
Messages: | 76,534 |
To whom it may concern,
dpkg currently uses MD5 to verify packages, but MD5 is considered
insecure, why not switch to SHA256 (and also update lintian)?
dpkg currently uses MD5 to verify packages, but MD5 is considered[...]
insecure, why not switch to SHA256 (and also update lintian)?
Please, include my email address in the CC if you respond to this[...]
message. I am not subscribed to the mailing list.
On Thu, Nov 7, 2024 at 7:22 PM Jeremy Stanley <fungi@yuggoth.org> wrote:[...]
On 2024-11-07 16:45:54 -0500 (-0500), David Campbell wrote:
[...]
dpkg currently uses MD5 to verify packages, but MD5 is considered insecure, why not switch to SHA256 (and also update lintian)?[...]
MD5 is considered insecure to collision attacks, but mounting one
would require that the creator of the original file intentionally
pick content that can hash to the same value as some malicious
content (and even that is nontrivial, but let's set that aside for
the moment).
https://en.wikipedia.org/wiki/Collision_attack
I think Marc Stevens' work on Chosen-Prefix Collisions is of
interest. MD5 is currently around 2^39, which is well within reach
of adversaries.
To whom it may concern,
dpkg currently uses MD5 to verify packages, but MD5 is considered
insecure, why not switch to SHA256 (and also update lintian)?
Also, to make verifying packages more useful, why not get a checksum
from a more trusted source, like a main Debian package repository to
compare with what is generated from a package from a mirror?
Are there any other ways to make check summing packages more useful?
Does dpkg or apt currently check packages checksums if you don't pass
dpkg --verify? Can the check summing ever cause a failure?
Please, include my email address in the CC if you respond to this
message. I am not subscribed to the mailing list.
Mostly. I don't know that the per-file checksums inside the DEB are
all that useful to "make sure the packages arrived in one piece and
weren't corrupted" since we already have stronger solutions for
that:
I'm not a Debian developer, just a curious onlooker who hasn't[...]
seen all of these messages, so I could completely off base with my understanding of how things work. But, it was my understanding
that the bundled MD5 inside a .deb file isn't there for security,
it's just there to make sure the packages arrived in one piece and
weren't corrupted, and for that purpose it's still perfectly
adequate. The "security", or validity of the packages' origin, are
ensured by the digital signature on the packages or repos. A
malicious package forged to match a desired MD5 would still fail a
digital signature check.
Am I incorrect in how this all works?
Now grab a package file like https://deb.debian.org/debian/pool/main/o/openssh/ssh_9.9p1-3_all.deb[...]
and unpack it (dpkg-deb ssh_9.9p1-3_all.deb foo)
I am a frequent debsums runner. debsums alerts you when a file
from a Debian package has changed. Please keep those MD5-s.