Bug 1543268 (CVE-2018-6789)

Summary: CVE-2018-6789 exim: buffer overflow in b64decode() function, possibly leading to remote code execution
Product: [Other] Security Response Reporter: Sam Fowler <sfowler>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: unspecifiedCC: bennie.joubert, dwmw2, eric.eisenhart, jskarvad, scorneli, tremble, wmealing
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-26 12:47:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1543269, 1543270    
Bug Blocks: 1543271    

Description Sam Fowler 2018-02-08 06:08:27 UTC
In Exim 4.90 and earlier, there is a buffer overflow in an utility function, if some pre-conditions are met. Using a handcrafted message, remote code execution seems to be possible.

More information to follow.

Upstream advisory:

https://exim.org/static/doc/security/CVE-2018-6789.txt

Additional References:

https://bugzilla.novell.com/show_bug.cgi?id=1079832
http://seclists.org/oss-sec/2018/q1/133

Comment 1 Sam Fowler 2018-02-08 06:08:48 UTC
Created exim tracking bugs for this issue:

Affects: epel-all [bug 1543269]
Affects: fedora-all [bug 1543270]

Comment 3 Tomas Hoger 2018-02-15 10:30:21 UTC
The issue here is a buffer overflow in the b64decode() function, that seems to be limited to just one byte.  It's triggered when Base64 encoded input to decode does not have proper length (multiple of 4).  Attacker controlled byte is written past of the buffer.

Comment 14 Tomas Hoger 2018-03-21 12:18:58 UTC
Statement:

This issue affects the versions of Exim as shipped in Red Hat Enterprise Linux 5. Red Hat Enterprise Linux 5 is already in the Extended Life Phase of its life cycle and Exim is not on the list of components supported via Red Hat Enterprise Linux 5 Extended Life-cycle Support (ELS) add-on, therefore there's currently no plan to address this issue in Red Hat Enterprise Linux 5. For more information about Red Hat Enterprise Linux 5 life cycle and ELS add-on scope of support, see:

https://access.redhat.com/support/policy/updates/errata/#Extended_Life_Cycle_Phase
https://access.redhat.com/articles/2901071

The Exim mail server is not shipped in Red Hat Enterprise Linux 6 and 7.