Bug 171616

Summary: off by one error handling null
Product: Red Hat Enterprise Linux 4 Reporter: Scott Russell <bugzilla>
Component: cyrus-imapdAssignee: Petr Rockai <prockai>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: jlaska
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0258 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-01 17:14:57 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:    
Bug Blocks: 176344    

Description Scott Russell 2005-10-24 13:31:30 UTC
From the dspam and cyrus mailing list:

Alec H. Peterson wrote:

> Does this patch fix the problem?  Will it be accepted into Cyrus?

Just committed to CVS.

> On Aug 18, 2005, at 15:24, Scott Russell wrote:
>
>> gelle wrote:
>>
>>> We had the same thing.  It's a bug in cyrus (off by one) so when  they read
their own null from the buffer they complain the message  has a null.  We
patched it.  We also sent the patch into cyrus.
>>>
>>
>> Was the patch accepted? I'm not sure when the patch went to the  cyrus folks
but being on the list I don't recall seeing it go by.  I'm curious if this will
make it into future versions of cyrus.
>>
>>
>>> --- cyrus-imapd-2.2.12/imap/spool.c     2004-10-27  16:40:50.000000000 -0400
>>> +++ cyrus-imapd-2.2.12p10/imap/spool.c  2005-05-27  17:25:09.000000000 -0400
>>> @@ -451,9 +455,9 @@
>>>             p[1] = '\n';
>>>             p[2] = '\0';
>>>         }
>>> -       else if (p[0] != '\n' && (strlen(buf) < sizeof(buf)-2)) {
>>> +       else if (p[0] != '\n' && (strlen(buf) < sizeof(buf)-3)) {
>>>             /* line contained a \0 not at the end */
>>>             r = IMAP_MESSAGE_CONTAINSNULL;
>>>             continue;
>>>         }
>>>
>>
>>
>> -- 
>> Scott Russell <lnxgeek.com>
>> IBM Linux Technology Center System Admin
>>
>> ----
>> Cyrus Home Page: http://asg.web.cmu.edu/cyrus
>> Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
>> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
>>
>> !DSPAM:4305019b26714647417383!
>>
>>
>>
>
> ----
> Cyrus Home Page: http://asg.web.cmu.edu/cyrus
> Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
> List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
>


-- 
Kenneth Murchison
Systems Programmer
Carnegie Mellon University
----
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

Comment 2 RHEL Program Management 2006-08-18 17:11:28 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 13 Red Hat Bugzilla 2007-05-01 17:14:57 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0258.html