Bug 738391 (CVE-2011-3481)

Summary: CVE-2011-3481 cyrus-imapd: NULL pointer dereference via crafted References header in email
Product: [Other] Security Response Reporter: Vincent Danen <vdanen>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: mhlavink, vanmeeuwen+fedora
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-01 17:06:23 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: 741698, 741699, 741700, 741701, 741702, 833885, 844263    
Bug Blocks: 738399    
Attachments:
Description Flags
fix backported for RHEL5 version of cyrus-imapd
none
updated patch none

Description Vincent Danen 2011-09-14 17:18:25 UTC
Common Vulnerabilities and Exposures assigned an identifier CVE-2011-3481 to
the following vulnerability:

Name: CVE-2011-3481
URL: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-3481
Assigned: 20110914
Reference: http://bugzilla.cyrusimap.org/show_bug.cgi?id=2772
Reference: http://bugzilla.cyrusimap.org/show_bug.cgi?id=3463
Reference: http://git.cyrusimap.org/cyrus-imapd/commit/?id=6e776956a1a9dfa58eacdd0ddd52644009eac9e5

The index_get_ids function in index.c in imapd in Cyrus IMAP Server
before 2.4.11, when server-side threading is enabled, allows remote
attackers to cause a denial of service (NULL pointer dereference and
daemon crash) via a crafted References header in an e-mail message.

Comment 3 Michal Hlavinka 2011-09-21 15:23:53 UTC
Created attachment 524231 [details]
fix backported for RHEL5 version of cyrus-imapd

> Reproduced on RHEL4 too, fix verified on RHEL6. Upstream patch
> will need to be re-worked for cyrus versions in RHEL5 and older.
> Michal, can you look?

attached

Comment 4 Tomas Hoger 2011-09-23 11:16:20 UTC
Is it safe to modify headers buffer passed to the index_get_ids?  My concern was that upstream patch was only touching copy.

Comment 5 Michal Hlavinka 2011-09-23 13:37:11 UTC
Created attachment 524618 [details]
updated patch

> Is it safe to modify headers buffer passed to the index_get_ids?  My concern
> was that upstream patch was only touching copy.

As far as I know, it should be safe in 2.3.7, but using a copy is safer especially considering possible future fixes. I've updated patch, so it uses a copy too as can be found in rhel6 version of cyrus-imapd

Comment 7 errata-xmlrpc 2011-12-01 16:46:09 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 4
  Red Hat Enterprise Linux 5
  Red Hat Enterprise Linux 6

Via RHSA-2011:1508 https://rhn.redhat.com/errata/RHSA-2011-1508.html