Bug 845644 - procmail header recovery bug
procmail header recovery bug
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: procmail (Show other bugs)
6.3
All Unspecified
unspecified Severity high
: rc
: ---
Assigned To: Jaroslav Škarvada
qe-baseos-daemons
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-03 13:34 EDT by Kelsey Cummings
Modified: 2012-08-03 15:12 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-03 15:12:35 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Kelsey Cummings 2012-08-03 13:34:16 EDT
Description of problem:
Procmail is supposed to recover and use the original header if a header filter fails.  However, due to this bug only the first character of the original header is recovered and available to subsequent recipes and/or delivery. 


Version-Release number of selected component (if applicable):
3.22-25.1


How reproducible:
100%

Steps to Reproduce:

:0fw                                                                                                                                                               
|/usr/bin/false                                                                                                                                                    

Results in:

procmail: Executing "/usr/bin/false"
procmail: Program failure (1) of "/usr/bin/false"
procmail: Rescue of unfiltered data succeeded

And the data is properly recovered as expected.

:0fhw                                                                                                                                                              
|/usr/bin/false                                                                                                                                                    

Results in:

procmail: Executing "/usr/bin/false"
procmail: Program failure (1) of "/usr/bin/false"
procmail: Rescue of unfiltered data succeeded

Only the first character of the headers is actually recovered. 

Additional info:
Already reported to and fixed in FreeBSD a couple years ago.
http://www.freebsd.org/cgi/cvsweb.cgi/ports/mail/procmail/files/patch-src%3Amailfold.c

My original patch used 

readdyn(&new,&dfilled,tobesent);

but the freebsd patch to

readdyn(&new,&dfilled,thebody-themail.p);

Also seems to work fine, not sure which is More Correct.
Comment 2 Kelsey Cummings 2012-08-03 14:49:09 EDT
!#$%#$%  sorry!

Bug already fixed in RHEL, brought in by procmail_3.22-8.debian.patch
Comment 3 Jaroslav Škarvada 2012-08-03 15:12:35 EDT
Closing per comment 2.

Note You need to log in before you can comment on or make changes to this bug.