Use-after-free error in Exim - CVE-2017-16943

 

Use-after-free error in Exim - CVE-2017-16943

Published: November 28, 2017 / Updated: February 5, 2018


Vulnerability identifier: #VU9427
CSH Severity: High
CVSS v4: 9.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2017-16943
CWE-ID: CWE-416
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to execute arbitrary code on the target system.

The weakness exists due to a use-after-free memory error in the ESMTP CHUNKING extension within the receive_msg() function in receive.c. A remote attacker can connect to the SMTP service, send a specially crafted BDAT command, trigger memory corruption and execute arbitrary code on the target system.

Successful exploitation of the vulnerability may result in system compromise.

Affected software

Exim
Arch Linux
Debian Linux
Amazon Linux AMI
Gentoo Linux
Fedora
Ubuntu
Opensuse
exim (Alpine package)
exim

How to mitigate CVE-2017-16943

Update to version 4.90.

The vendor has described a workaround:

".. in the main section of your Exim configuration, set:

chunking_advertise_hosts =

This disables advertising the ESMTP CHUNKING extension, making the BDAT verb unavailable and avoids letting an attacker apply the logic."


exim (Alpine package) - addressed in versions 4.89-r7, 4.89.1-r0
exim - addressed in versions 4.89-3.el6, 4.89-3.el7, 4.89-4.el6, 4.89-4.el7, 4.89-6.fc26, 4.89-6.fc27, 4.89-7.fc26, 4.89-7.fc27

External References

Related Security Bulletins