by aquabeagle on 1/28/20, 11:41 PM with 83 comments
by Panino on 1/29/20, 3:08 AM
Is Qualys getting paid for this excellent work, and if so, by who?
Is there a plan to do a serious audit of execle related code in OpenBSD?
As a longtime OpenBSD user, I gotta say that OpenSMTPD is the part of the system I'm least comfortable with from a security standpoint. Too many rewrites, mulligans, CVEs. Very little of the web howtos match the official documentation because there's so much churn, which by itself is a red flag. And even without a logic bug, I'm surprised execle was used at all here. It was unnecessary and naive. I'll be honest, I'm in the middle of transitioning from qmail to OpenSMTPD, and this bug is making me consider notqmail.
This RCE is trivial and super bad.
by brynet on 1/29/20, 12:26 AM
https://man.openbsd.org/syspatch
https://www.openbsd.org/errata66.html#p018_smtpd_tls
https://www.openbsd.org/errata66.html#p019_smtpd_exec
There is also a new portable release of OpenSMTPd - 6.6.2p1: https://www.mail-archive.com/misc@opensmtpd.org/msg04850.htm...
by zaroth on 1/29/20, 1:43 AM
Of course, that’s partly because it’s so damn easy to exploit. Here’s what an exploit email actually looks like;
$ nc 127.0.0.1 25
220 obsd66.example.org ESMTP OpenSMTPD
HELO professor.falken
250 obsd66.example.org Hello professor.falken [127.0.0.1], pleased to meet you
MAIL FROM:<;sleep 66;>
250 2.0.0 O.k
...
That executes “sleep 66” as root.There simply must be a better way to parameterize calls to the MTA that contain remote/attacker provided input than exec’ing a shell. It should not all come down to being “absolutely sure” the input is escaped properly.
by angry_octet on 1/29/20, 4:38 AM
The code seems to go out of its way to avoid using the system() call to shell out, but then does exactly what system() would do.
by thisrod on 1/29/20, 3:30 AM
Mail servers should run as nobody; mail box files are, in fact, world-writable, and their permissions should reflect that. Go ahead, critique the ergonomics of C's conditional expression syntax. But first, consider that this security model for a room full of terminals in the 1970s, where permission to accept connections on port 25 is also permission to format the hard disk, is totally nuts for a network-connected computer in the 2020s.
by fao_ on 1/29/20, 1:57 AM
by kelnos on 1/29/20, 12:43 AM
by codezero on 1/29/20, 12:18 AM
by Hello71 on 1/29/20, 1:33 AM
perl -00 -ne exit
unfortunately, the first line afterwards is also eaten. this is easily remedied by inserting one junk line though instead of a slide.by tene on 1/29/20, 5:57 PM
I don't mean this sarcastically; I'm genuinely curious about the motivations. The only thing I can come up with is that it's slightly more annoying to free an array of strings than it is to free a single string in C. Is that plausibly the only motivation to involve a shell here?
by carlhjerpe on 1/29/20, 11:17 AM
by brian_herman on 1/29/20, 2:15 AM
by LeonM on 1/29/20, 12:15 AM
First with the user authentication vulns [0], now this.
For those running OpenBSD boxes: the patch is available through syspatch, but you may need to change /etc/updateurl to an official OpenBSD CDN, since the patch is still fresh and not yet distributed to all mirrors.
by _wldu on 1/29/20, 12:25 AM