Bug 184139 - mailx dies with "panic: temporary file seek" on mailboxes larger than 128MB
mailx dies with "panic: temporary file seek" on mailboxes larger than 128MB
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: mailx (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ivana Varekova
: 184296 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2006-03-06 14:37 EST by Dan Astoorian
Modified: 2007-11-30 17:07 EST (History)
3 users (show)

See Also:
Fixed In Version: RHBA-2006-0687
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-09-27 02:19:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Dan Astoorian 2006-03-06 14:37:47 EST
Description of problem:
Mailx aborts when attempting to display the index for any message which begins
more than 128MB from the start of the file.

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

How reproducible:

Steps to Reproduce:
1. Create a mail folder which is larger than 128MB (134217728 bytes)
2. Append at least one message to this folder
3. Run "mail -f foldername"
4. Issue the command "h$" to attempt to display the last screenful of message
Actual results:
Abort with the error message:
    fseek: Invalid argument
    panic: temporary file seek

Expected results:
Display of the last screenful of message headers.

Additional info:
The bug is caused by an integer overflow.  In def.h, struct message defines
m_block as a (signed) short.  Since m_block represents 4096 bytes, this causes
an overflow at 32768 * 4096 bytes, or 128MB.

Changing "short m_block;" to "long m_block;" in def.h and recompiling appears to
correct the symptom, although I have not tested to determine whether this
introduces any new problems.
Comment 10 Red Hat Bugzilla 2006-09-27 02:19:02 EDT
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.

Comment 11 Ivana Varekova 2006-12-18 08:24:48 EST
*** Bug 184296 has been marked as a duplicate of this bug. ***
Comment 12 Matthew Miller 2007-02-21 16:23:43 EST
I'm a bit confused. That errata is marked as affecting product "Other", and I
can't find the source RPM for it on ftp.redhat.com. Is an update going to be
released for RHEL4?
Comment 13 Radek Bíba 2007-02-22 11:07:44 EST
The source RPM wasn't pushed to ftp.redhat.com for some reason, sorry. It's
there now.

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