Bug 894999 (CVE-2014-3618) - VUL-0: procmail: CVE-2014-3618 procmail: Heap-overflow in procmail's formail utility when processing specially-crafted email headers
Summary: VUL-0: procmail: CVE-2014-3618 procmail: Heap-overflow in procmail's formail ...
Status: RESOLVED FIXED
Alias: CVE-2014-3618
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Major
Target Milestone: ---
Deadline: 2014-09-11
Assignee: Security Team bot
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/105544/
Whiteboard: maint:released:sle10-sp3:58848 maint...
Keywords:
Depends on:
Blocks: 898303
  Show dependency treegraph
 
Reported: 2014-09-04 06:20 UTC by Marcus Meissner
Modified: 2014-10-13 13:00 UTC (History)
5 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
procmail-CVE-2014-3618.mbox (3.51 KB, text/plain)
2014-09-04 06:23 UTC, Marcus Meissner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Meissner 2014-09-04 06:20:35 UTC
via oss-sec/google zero team


From: Tavis Ormandy <taviso@google.com>


I noticed a heap overflow in procmail when parsing addresses with
unbalanced quotes. I encountered this by accident when trying to
organize a large usenet archive, this post to rec.arts.poems causes
formail to crash.

https://groups.google.com/forum/message/raw?msg=alt.arts.poetry.comments/DCuLO3qzovI/CZk15MlfqNkJ

I've attached an mbox for reference.

$ formail -s < mbox > /dev/null
*** Error in `formail': free(): invalid next size (fast): 0x00007f103784a080 ***
Segmentation fault (core dumped)

$ rpm -q procmail
procmail-3.22-33.fc20.x86_64


It looks like the fix is

--- formisc.c 2013-08-04 00:13:33.000000000 -0700
+++ formisc.c 2014-09-03 11:42:25.986002396 -0700
@@ -84,12 +84,11 @@
  case '"':*target++=delim='"';start++;
       }
      ;{ int i;
- do
+ while(*start)
    if((i= *target++= *start++)==delim) /* corresponding delimiter? */
       break;
    else if(i=='\\'&&*start)    /* skip quoted character */
       *target++= *start++;
- while(*start); /* anything? */
       }
      hitspc=2;
    }


Tavis.
Comment 1 Marcus Meissner 2014-09-04 06:23:29 UTC
Created attachment 604929 [details]
procmail-CVE-2014-3618.mbox

reproducer mbox:

$ formail -s < procmail-CVE-2014-3618.mbox > /dev/null 
*** Error in `formail': free(): invalid next size (fast): 0x00000000014451c0 ***
Segmentation fault
$
Comment 2 Swamp Workflow Management 2014-09-04 06:24:23 UTC
An update workflow for this issue was started.
This issue was rated as important.
Please submit fixed packages until 2014-09-11.
When done, reassign the bug to security-team@suse.de.
https://swamp.suse.de/webswamp/wf/58841
Comment 3 SMASH SMASH 2014-09-04 06:25:10 UTC
Affected packages:

SLE-10-SP3-TERADATA: procmail
SLE-11-SP3: procmail
SLE-11-SP3-PRODUCTS: procmail
SLE-11-SP3-UPTU: procmail
Comment 4 Marcus Meissner 2014-09-04 06:25:33 UTC
(please also fix SLE12, factory , 12.3 and 13.1)
Comment 5 Bernhard Wiedemann 2014-09-04 09:00:31 UTC
This is an autogenerated message for OBS integration:
This bug (894999) was mentioned in
https://build.opensuse.org/request/show/247486 Factory / procmail
Comment 7 Bernhard Wiedemann 2014-09-04 11:00:21 UTC
This is an autogenerated message for OBS integration:
This bug (894999) was mentioned in
https://build.opensuse.org/request/show/247491 Factory / procmail
Comment 9 Dr. Werner Fink 2014-09-04 11:23:44 UTC
SR#247491 - Factory
SR#247528 - 12.3
SR#247529 - 13.1

SR#43580  - SLES-12
SR#43602  - SLES-11
SR#43601  - SLES-10
Comment 10 Bernhard Wiedemann 2014-09-04 12:00:44 UTC
This is an autogenerated message for OBS integration:
This bug (894999) was mentioned in
https://build.opensuse.org/request/show/247528 12.3 / procmail
https://build.opensuse.org/request/show/247529 13.1 / procmail
Comment 15 Dr. Werner Fink 2014-09-04 13:38:58 UTC
Fixed
Comment 16 Bernhard Wiedemann 2014-09-04 14:00:24 UTC
This is an autogenerated message for OBS integration:
This bug (894999) was mentioned in
https://build.opensuse.org/request/show/247552 Factory / procmail
https://build.opensuse.org/request/show/247553 12.3 / procmail
https://build.opensuse.org/request/show/247555 13.1 / procmail
Comment 19 Swamp Workflow Management 2014-09-04 22:00:12 UTC
bugbot adjusting priority
Comment 20 Swamp Workflow Management 2014-09-11 07:04:26 UTC
openSUSE-SU-2014:1114-1: An update that fixes one vulnerability is now available.

Category: security (important)
Bug References: 894999
CVE References: CVE-2014-3618
Sources used:
openSUSE 13.1 (src):    procmail-3.22-264.6.1
openSUSE 12.3 (src):    procmail-3.22-260.6.1
Comment 21 Marcus Meissner 2014-09-16 14:07:23 UTC
released
Comment 22 Swamp Workflow Management 2014-09-16 16:04:25 UTC
SUSE-SU-2014:1137-1: An update that fixes one vulnerability is now available.

Category: security (important)
Bug References: 894999
CVE References: CVE-2014-3618
Sources used:
SUSE Linux Enterprise Server 11 SP3 for VMware (src):    procmail-3.22-240.8.1
SUSE Linux Enterprise Server 11 SP3 (src):    procmail-3.22-240.8.1
SUSE Linux Enterprise Desktop 11 SP3 (src):    procmail-3.22-240.8.1
Comment 23 Haral Tsitsivas 2014-09-24 17:57:11 UTC
Can you create a fix for SLES11SP1?
Comment 24 Marcus Meissner 2014-09-24 20:52:47 UTC
we so far have not planned LTSS updates for this problem. you currently could request one as PTF.
Comment 25 Bernhard Wiedemann 2014-10-13 12:00:07 UTC
This is an autogenerated message for OBS integration:
This bug (894999) was mentioned in
https://build.opensuse.org/request/show/255634 13.2 / procmail
Comment 26 Bernhard Wiedemann 2014-10-13 13:00:08 UTC
This is an autogenerated message for OBS integration:
This bug (894999) was mentioned in
https://build.opensuse.org/request/show/255732 13.2 / procmail