Re: dpkg MD5
Jeremy Stanley <[email protected]> Fri, 8 Nov 2024 03:12:17 +0000
| Newsgroups | gmane.linux.debian.devel.security |
|---|---|
| Message-ID | <[email protected]> |
On 2024-11-07 21:30:26 -0500 (-0500), Jeffrey Walton wrote: > On Thu, Nov 7, 2024 at 7:22 PM Jeremy Stanley <[email protected]> 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. [...] Yes, which is the "even that is nontrivial" bit to which I alluded, wherein I meant a single party constructing two functional Debian packages which hash to the same MD5 checksum, one of which is malicious. There may be some tricks that can be played based on common sections created by some archive implementations and padding with arbitrary offsets, but when you introduce compression into the mix I have a feeling it trends toward impractical. (The example with two X.509 certs is sort of a special case which takes advantage of nuances of the format itself.) An attacker constructing anything functional with the same checksum as an existing package published by someone else is another matter entirely, and what I expect the typical user misleadingly imagines when they see MD5 hashes and have a knee-jerk reaction based on the contextless warnings they've been bombarded with for years about the insecurity of the algorithm. Probably the most convincing reason to replace such uses of MD5 is that we collectively get to stop wasting time answering this same question over and over and over... -- Jeremy Stanley
signature.asc
(application/pgp-signature, 963 B)
-----BEGIN PGP SIGNATURE----- iQKTBAABCgB9FiEEl65Jb8At7J/DU7LnSPmWEUNJWCkFAmctgYVfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDk3 QUU0OTZGQzAyREVDOUZDMzUzQjJFNzQ4Rjk5NjExNDM0OTU4MjkACgkQSPmWEUNJ WCkr0hAA2+SdEx6Zm4CLyyTulFkVF9ep464cEpnm0nZ4OP8OkX5k7+Lp1aEdYQqS f9kI6/KiQ9NcNVZO/yWLcgxmvhR9I+3B4Cz/qmoEugPM/eiTRTA5uxkMRLVBNBng DNIdV18fSl8lT0IzMBmf3GIk5Ei0D956FHdSnaNfLndEL1MIOPe+W1yu889YYxal P1geYSPGqCsny3DWf4vPA2RvhBnzHXJjUoC2U0TkzxU59JMfoP072F3v4Nw58lzf TWbWkfBbPUOSwGch3YyR9ZoILzxMd4PgWPkEV4nwHL9OVnPX1lE5C1/OmXZufyjt xDKB3W/AgyXLryj8g8Lpr3UCfuFDa1CM1KHlansovaevPtpW0DdgP02sg2vytf2G Y7vfDM2JITrgNHTyhOkzKZS3Ud96GxTVqnONqeQA39Cl+npzyAbEV7EnJKIGxRJz hqfskcA9WMK1ridgwYN7n5aUZE5ioQS1flJl30VthD/CdsLOSrqyjA0JDXpegK3g uj2DY641UNzygc37jzci8SrLX8UtdrWCnE9riOy1vd0iDkqxOcJbGMqxku8Mordo 74YUGFOQVz4FF8fTtyIhG6gT3cqyZsB74jQzCA7gklmuUjKIiaiqyV1vS4rhdJUC Dvd6isjsPKgNf0KAHBeepiZTMxZ36AkY8E9LrehRiqBuhDJB1yE= =lsG0 -----END PGP SIGNATURE-----