Re: Random MIME boundary needed? (was: Security findings)
"Kevin J. McCarthy" <[email protected]>
| Newsgroups | gmane.mail.mutt.devel |
|---|---|
| Message-ID | <aedN2NULgkN2oFqt@qinghai> |
On Tue, Apr 21, 2026 at 09:40:37AM +0200, Werner Koch wrote: >I see no attack here. However, mutt_random_bytes is also used to >construct message ids. I would suggest to make them less predictable. >But do not use new crypto algorithms for that. All systems come with >proper random number generators these days. Something like > > /* Create an unpredicable nonce of LENGTH bytes in BUFFER. */ > void gcry_create_nonce (void *buffer, size_t length); > >if you anyway link to Libgcrypt, or use the respective functions from >the other crypto libs. Thank you Werner and Greg KH! (I'll just reply to you both here) Something like gcry_create_nonce() sounds perfect. Unfortunately we don't link to Libgcrypt. Perhaps, as Greg KH suggested we could try checking for getrandom(), and then arc4random_buf(), and if both are missing I guess fall back to what we have now? Some quick searches suggested FreeBSD and OpenBSD switched their arc4 implementation to use ChaCha. -- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEiXWpszqjeRA4XFMIre92hIAxa9oFAmnnTdgACgkQre92hIAx a9pW4Q/+I1ch2mcY8+MQps0rSaby8dIrvQTELxNGz5UpqvTzNHso9zUPpwgC5YBK V7heI5gyR57ABtRJzYalYqsLAEJT1pQJIy7fr8/HPEfyTJ/fMLSempiMkgtOzNr4 Jj9TqPtAXGuWp+CAjbVeAMq13Sf3CCblf0yO8hxj2Ikae4RA7gYuoio2Awf/X1T1 Ia6logSCVZSXPAYdGeetRXVdIsPcLQhFHL3zOtu1TDBbounAOk8ufwY+9Q4JDTvD OAJigmDz+TlkVV8KN/VUNcuNftXocrY7QiAuDqX6bowtTADVFfXXVN9dDA6tCb9V 50eueiubmWjlr9QNt47QndWKnmROAGnsH5nAMCDg+vFIB1I5SMfkzUaF9Bh0RFsj soqbrmGFQp+GY8AWw8QgWthJsOA6cxGPK9wOMrZE4rx/cL+AbU4GZyHApnLdBAts 4Sa513r1NGlV0Ap3WIYX4fo5dJdq+GWOiO+sgOXsxd1XNfQPX96IpfNmWkHY5DJ6 +BgJS9s+Dc4ziqJttsTeVsaKVFIHO8T2ww8tvpSYi84ZJyMrgk0m45jNDOMnLR/L 7jk04GIu7wYlRT9Ah058uvTS5DYScorf3LkaIZf15RG8pp/hKOqU8vQ6cqKVm23A GAFtXpKNEFd/M6kcyq/OvijAGIMguSskkwqgXk61HOJpBmGQwdE= =1hZp -----END PGP SIGNATURE-----