Live data from Hacker News

15 years later: remote code execution in qmail

qualys.com

11–20 of 164 posts

Re: 15 years later: remote code execution in qmail

#11
post #9
post #4

Do we know if they have applied for the $500 bug bounty from DJB?

My guess is that he'd never accept it. He originally didn't allow people to distribute qmail with changes; this is squarely a Debian issue.

What did Debian change to introduce this vulnerability?

Re: 15 years later: remote code execution in qmail

#12
post #9
post #4

Do we know if they have applied for the $500 bug bounty from DJB?

My guess is that he'd never accept it. He originally didn't allow people to distribute qmail with changes; this is squarely a Debian issue.

If he takes that stance than it will cast doubt on everything else he has done. If there is a footgun on the wall, by the end it must go off, and chaining "non-exploitable" bugs together is routine stuff for hackers.

Re: 15 years later: remote code execution in qmail

#13
post #4

Do we know if they have applied for the $500 bug bounty from DJB?

Yeah, it was denied.

About our new discovery, Daniel J. Bernstein issues the following statement:

    "https://cr.yp.to/qmail/guarantee.html has for many years mentioned
    qmail's assumption that allocated array lengths fit comfortably into
    32 bits. I run each qmail service under softlimit -m12345678, and I
    recommend the same for other installations."
And from his "guarantee"

In May 2005, Georgi Guninski claimed that some potential 64-bit portability problems allowed a ``remote exploit in qmail-smtpd.'' This claim is denied. Nobody gives gigabytes of memory to each qmail-smtpd process, so there is no problem with qmail's assumption that allocated array lengths fit comfortably into 32 bits.

Under mitigations they list:

As recommended by Daniel J. Bernstein, qmail can be protected against all three 2005 CVEs by placing a low, configurable memory limit (a "softlimit") in the startup scripts of all qmail services.

Alternatively:

qmail can be protected against the RCE (Remote Code Execution) by configuring the file "control/databytes", which contains the maximum size of a mail message (this file does not exist by default, and qmail is therefore remotely exploitable in its default configuration).

Unfortunately, this does not protect qmail against the LPE (Local Privilege Escalation), because the file "control/databytes" is used exclusively by qmail-smtpd.

Alternatively:

- an updated version of qmail-verify will be available at https://free.acrconsulting.co.uk/email/qmail-verify.html after the Coordinated Release Date;

- the developers of notqmail (https://notqmail.org/) have written their own patches for the three 2005 CVEs and have started to systematically fix all integer overflows and signedness errors in qmail.

Re: 15 years later: remote code execution in qmail

#14

Serious question: Was there a legitimate reason they didn't patch this stuff when it was first discovered?

It's not "they", it's Daniel J. Bernstein. That's the reason :) (If you don't know: he is a top cryptographer that can amazingly correct code. However, he also has a very big ego...)

I just found this on Wikipedia where he raised his bug bounty and at the same time cited these "unexploitable" bugs

https://en.wikipedia.org/wiki/Qmail#Security_reward_and_Geor...

Re: 15 years later: remote code execution in qmail

#15
post #4

Do we know if they have applied for the $500 bug bounty from DJB?

Yeah, it was denied. About our new discovery, Daniel J. Bernstein issues the following statement: "https://cr.yp.to/qmail/guarantee.html has for many years mentioned qmail's assumption that allocated array lengths fit comfortably into 32 bits. I run each qmail service under softlimit -m12345678, and I recommend the same for other installations." And from his "guarantee" In May 2005, Georgi Guninski claimed that some…

So the app is vulnerable by default, yet the author is claiming this doesn't matter, because he instructs how to run it in a safe way?

Correct, or am I oversimplifying/missing something?

Re: 15 years later: remote code execution in qmail

#16
post #9

Earlier quoted context omitted.

My guess is that he'd never accept it. He originally didn't allow people to distribute qmail with changes; this is squarely a Debian issue.

What did Debian change to introduce this vulnerability?

Nothing, per se. But they don't set up softlimits or message size limits by default, both of which you should definitely do... it's just that the values you put in are specific to your situation.

Re: 15 years later: remote code execution in qmail

#17
post #9
post #4

Do we know if they have applied for the $500 bug bounty from DJB?

My guess is that he'd never accept it. He originally didn't allow people to distribute qmail with changes; this is squarely a Debian issue.

When you say "this is squarely a Debian issue", do you mean "in his opinion", or that you agree?

Re: 15 years later: remote code execution in qmail

#18
post #15

Earlier quoted context omitted.

Yeah, it was denied. About our new discovery, Daniel J. Bernstein issues the following statement: "https://cr.yp.to/qmail/guarantee.html has for many years mentioned qmail's assumption that allocated array lengths fit comfortably into 32 bits. I run each qmail service under softlimit -m12345678, and I recommend the same for other installations." And from his "guarantee" In May 2005, Georgi Guninski claimed that some…

So the app is vulnerable by default, yet the author is claiming this doesn't matter, because he instructs how to run it in a safe way? Correct, or am I oversimplifying/missing something?

Maybe add a reference to how ElasticSearch (or some other new-pop tech) catches heck for the same?

Re: 15 years later: remote code execution in qmail

#19
post #12
post #9

Earlier quoted context omitted.

My guess is that he'd never accept it. He originally didn't allow people to distribute qmail with changes; this is squarely a Debian issue.

If he takes that stance than it will cast doubt on everything else he has done. If there is a footgun on the wall, by the end it must go off, and chaining "non-exploitable" bugs together is routine stuff for hackers.

the grown-ups moved to postfix a long time ago

Re: 15 years later: remote code execution in qmail

#20

Serious question: Was there a legitimate reason they didn't patch this stuff when it was first discovered?

It's not "they", it's Daniel J. Bernstein. That's the reason :) (If you don't know: he is a top cryptographer that can amazingly correct code. However, he also has a very big ego...)

qmail was essentially unmaintained for a long time, people were distributing patches to it, but there were no upstream releases.

(Similar story with djbdns/tinydns.)

"Recently" he released his code with new licenses, so that people could finally start distributing updated versions, rather than the previous approach where lots of people were sharing conflicting patches for various features (e.g. IPv6 support for AAAA records in tinydns.)

Post reply on HN