Re: Random MIME boundary needed? (was: Security findings)

Alejandro Colomar via Mutt-dev <[email protected]>
Newsgroups gmane.mail.mutt.devel
Message-ID <aeeEwViufDhMWTsS@devuan>
Hi Greg,

On 2026-04-21T15:48:28+0200, Greg KH wrote:
> On Tue, Apr 21, 2026 at 03:42:40PM +0200, Alejandro Colomar via Mutt-dev wrote:
> > Hi Kevin,
> > 
> > On 2026-04-21T21:20:17+0800, Kevin J. McCarthy wrote:
> > > On Tue, Apr 21, 2026 at 02:32:54PM +0200, Alejandro Colomar via Mutt-dev wrote:
> > > > On 2026-04-21T12:49:43+0200, Greg KH wrote:
> > > > > On Tue, Apr 21, 2026 at 06:13:44PM +0800, Kevin J. McCarthy wrote:
> > > > > > 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?
> > > > >
> > > > > I would recommend that.  I would hope that most modern systems have
> > > > > getrandom() by now.
> > > >
> > > > BTW, getentropy(3) --which itself calls getrandom(2)-- was added to both
> > > > glibc and musl in the same versions as getrandom(2).  Should we prefer
> > > > getentropy(3) or getrandom(2)?  getentropy(3) seems to have been
> > > > standardized by POSIX.1-2024 --which I'll document in the manual page
> > > > right now--.
> > > 
> > > One tiny advantage for getrandom(2) is the GRND_NONBLOCK flag.  But
> > > perhaps there isn't a "real" issue there for the request sizes mutt will
> > > be passing.
> > 
> > AFAIK, these days getrandom(2) doesn't block except in weird cases at
> > boot.
> 
> And even then, that should not happen anymore on a sane system.

Thanks for confirming!

> 
> > The manual page random(7) needs to be updated, but I need someone expert
> > in the matter to send and discuss patches.  (CC += Mingye)
> > 
> > BTW, Greg, would you be able to help with that?
> 
> Nope! :)
> 
> I would recommend Jason, the random kernel maintainer, for help with
> that.

Thanks!  I've asked Ted and Jason.

> 
> > > I've already been playing with the code some tonight.  This is just a
> > > WIP below, compiled but not tested.  Of course, it would be easy to swap
> > > to using getentropy() if you and Greg think that's a better idea.
> > 
> > It makes sense to start with getrandom(2), since as you say, it's easy
> > to swap to it.
> 
> Agreed, the path seems sane.
> 
> thanks,
> 
> greg k-h


Cheers,
Alex

-- 
<https://www.alejandro-colomar.es>
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEES7Jt9u9GbmlWADAi64mZXMKQwqkFAmnnhOkACgkQ64mZXMKQ
wqme2RAAtFqgTLeN3LNWJPH/klrqZs5Q8Sy6axtG5tYoLkt7HGZTAwsoNQA7lTBw
d4WN5qzCdZUJFJzAwqr8yGPsfjifE0r93vICWpP/gDVlKwrWp5R43SRBbyrW6n4M
xJYUAlXErcX6GW7wzXRkeSXCJpQ4rIf+6PSU5UDHQ+bvlmFCIbbu4ZXRv7qDlAwE
KGoiHKpTW6ayS59Yo+7XghfQ45Q8zyE9JeKJWslRMh2aL5coQ2NqepOK9r43N7KC
cp5DF4pRlE/qiy2Q/tsSwIcRaRIjWIgXty5nx2yPV+vET7ysQ0rhp7cngdsLwgwm
t+yde2GaDuw9yCPh7u1XqFkYFie5zPG7Fs6uQ8pV74lIryQeJw3eqZaP4nrrbc3i
r347EBQ23kY7lc7q9aYfUbi2MW7hf8NmLhnsqfsficuxJnvYoQSHHb64cpTX/KqP
xugtePEVD9RUGgbKLflBfV5gvC/VeDw7xizmEkk05rtuV377tQU+utvRwdqT65bJ
esRkpepMtJ3b8odbL/SCuJF0MgWw4EeVd+fhIYxc0TjfB0DtBfG1ItLvw9ROBLH3
/co1HNubpINPd7UZyt/lDFt7g+BqHOuyQgbU1Mh1CWPjNa0iWXxapjBDtteCyAoq
yoLwvP3Xul5FtrxHt7IxxufvtKsH1tcZMEbSihVVttp2JEieLr0=
=QNKI
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.