21Nails: Multiple Critical Vulnerabilities in Exim Mail Server
exim.org
exim.org
But Exim is much more closely related to Sendmail (I believe it's technically a fork of Smail, which was a Sendmail competitor) than to Postfix or qmail. It parses haphazardly and, as, you can see, it isn't meaningfully privilege-separated. It rides atop all the quirks of the circa-1999 standard C library.
Nobody should be running Exim in 2021.
In reality, the world is moving on past even the 2nd generation MTAs, which, though their track records are pretty strong, are still built in memory-unsafe languages. Serverside software written in Java, Go, and Rust handle workloads far more difficult than even an ambitious Postfix deployment deals with. Still: it's baffling how we've ended up in a place where Exim --- whose security has been a running joke since the 1990s --- is one of the most popular Unix MTAs. Nobody would have called this outcome in 1999!
The funniest part of this advisory starts at "Exim's memory allocator"; just read on for a special Exim bug class.
This is great work, and a great writeup.
Maybe, yet it still shuffles a lot of email around the place. It deals with a lot of corner cases. When I say corner cases I mean orthogonality that might put off a top class mathematician fresh from fiddling with spherical cows in n dimensions. Email is not simply a bit odd but downright pathologically weird.
We all know what email is and it's just so simple. You can use telnet and point it at a smtpd and send a message. HELO me ... mail from: .... rcpt to: .... data .... . (blah blah message_id:x)
Yet, for some reason an MTA is a massive edifice of oddities. You could make an MTA that simply shuffles a text stream from a to b but what sort of text stream? MIME encoded doesn't mean what you think it does in quite a lot of cases. MIME is nearly formally defined but as always the beauty is in the eye of the programmer.
As well as moving text around a bit, MTAs are asked to do a firewall's role and also integrate with AV and anti spam. Ideally they should also be capable of reading minds.
I could go on.
Exim is probably not the most beautiful example of modern security practice but it is actively developed by people who do give a shit and are trying to keep something that no one will ever allow to go away working, as best they can. RFC822 (etc, int al, ad nauseam) can never be considered a modern communication technique that will ever lend itself to secure programming practices. Email is never going to be "secure" by worrying about what language an MTA is written in and I think you might have forgotten the worst part of the security circus here: The end user.
You can call out the MTA as much as you like but your Go or Rust jobbie will still deliver an email that my Financial Controller clicks on and dumps my bank account.
Nobody should be using email in 2021 (discuss ... 8)
qmail is written in C, and it has never had a serious security hole that I am aware of. Not all C code is unsafe.
You make it sound like it ended the Internet or something. One could also argue (with only similar level of hyperbole) that it was sendmail which made the Internet a success. Obviously the truth is in between, but lets give credit where credit is due. Sendmail served us well in its time. It's not inherently the fault of its developers, that the Internet evolved to a much darker place over time.
Can you suggest good options? If I want to run a MTA on my Debian box, what should I use in 2021?
For just getting mail off the system to a central hub: dma or ssmtp.
https://www.opensmtpd.org/security.html
In the past I ran a perl-based MTA, qpsmtpd, which was actually free of issues for the time I read it. That project was mothballed in favour of a node.js alternative (haraka). Of course both of these cheat by offloading delivery to something else - they're just the network layer, but very flexibly so.
Nobody should be installing an MTA by default in 2021.
Thanks to Debian and Ubuntu most probably? Default MTA and people don’t stray from defaults! Not sure the reason why it was chosen was appropriate. About 8-bit MIME clean-ness, no?
dpkg-reconfigure exim4-config to configure most common MTA use-cases and no Bat book to consume.
Note also that someone has actually bothered to do an assessment and published results. Does your preferred MTA enjoy that sort of attention?
Anybody using some general mitigations for exim, like running in chroot or in containers? How to set up such thing on CentOS?
https://security-tracker.debian.org/tracker/source-package/e...
Please remember to update your mailservers.