Bug 496139 - nmh inc crashes in specific scenario
Summary: nmh inc crashes in specific scenario
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: nmh
Version: 15
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Josh Bressers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-16 20:10 UTC by Ahmon Dancy
Modified: 2012-08-08 12:28 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-07 20:11:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
mbox input file which will result in crash (19.98 KB, text/plain)
2009-04-16 20:10 UTC, Ahmon Dancy
no flags Details

Description Ahmon Dancy 2009-04-16 20:10:58 UTC
Created attachment 339912 [details]
mbox input file which will result in crash

Description of problem:

The 'inc' command segfaults when called with particular arguments and input file.

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

nmh-1.3-1.fc10.x86_64

How reproducible: 100%

Steps to Reproduce:
 1. Save attached file as /tmp/crashes-inc
 2. Run "inc +budtool -file /tmp/crashes-inc -silent"
 
Actual results:

segmentation fault

Expected results:

incorporation of mail from /tmp/crashes-inc into the "budtool" mh folder.

Additional info:

The segfault does not occur is -silent is not specified.

gdb backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x000000000040eae8 in m_getfld (state=3, name=<value optimized out>,
    buf=0x7ffff32af000 "abase maintenance:  7342 MB \n\n\n\nFile history database continuation file /bud/hist/quadra/db.quadra.1.of.m.tmp moved to /bud/hist/quadra/db.quadra.1.of.2\nFile history database continuation file /bud/hi"...,
    bufsz=-4096, iob=0x829ef0) at m_getfld.c:470
470                                 while (*--ep == *--cp)

More information available upon request.

Comment 1 Josh Bressers 2009-05-13 01:16:42 UTC
So I can't get this to crash for me, which is interesting.

(sorry for taking so long to reply to this bug)

Are you setting some default inc options in your .mh_profile file?

Comment 2 Ahmon Dancy 2009-05-13 14:55:24 UTC
My .mh_profile:

Alternate-Mailboxes: dancy, ahmon, dancy, ahmon
Path: Mail
Draft-Folder: +drafts
Folder-Protect: 700
Msg-Protect: 600
Editor: vi
context: context
send: -msgid
Unseen-Sequence: unseen
rmmproc: ../../rmm.sh
forw: -format

For kicks, I made a fresh .mh_profile with just "Path: Mail" in it and the crash persists.

Comment 3 Josh Bressers 2009-05-13 19:06:28 UTC
What happens if you try to inc the message into a new (or different) folder?

Comment 4 Ahmon Dancy 2009-05-13 19:12:40 UTC
Same effect.  Tried +inbox and also made a new empty folder and still got a segfault.

I'll take this opportunity to reemphasize that if I don't use -silent, the crash does not occur.

Comment 5 Bug Zapper 2009-11-18 11:44:41 UTC
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Bug Zapper 2009-12-18 09:15:59 UTC
Fedora 10 changed to end-of-life (EOL) status on 2009-12-17. Fedora 10 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 7 Ahmon Dancy 2011-05-25 18:29:52 UTC
I got hit by this bug again the other day so I thought I'd try to revive discussion on it.  I see that the source code for nmh hasn't changed since F10 so I changed the version of this bug to Fedora 15.

I did a deeper investigation of the issue this time.  I think the problem lies in the loop in m_getfld.c at line 470.  No bounds checking is done on either ep or cp.  If the circumstances are right, ep is predecremented beyond its boundary and the is accessed, resulting in a segfault.

Comment 8 Josh Bressers 2011-06-01 01:05:17 UTC
I'll try to find some time in the near future to reproduce this.

Comment 9 Josh Bressers 2012-01-15 20:39:57 UTC
I never could reproduce this. Can you try the 1.4 update I just added to Bodhi:
https://admin.fedoraproject.org/updates/nmh-1.4-1.fc15

Comment 10 Ahmon Dancy 2012-01-17 19:16:03 UTC
OK.  I'll see what I can do.  It still happens to me from time to time and I still have an mbox file lying around which I can use to readily reproduce it.

Comment 11 Ahmon Dancy 2012-01-17 23:27:28 UTC
I updated from f10 to f11 a short while back and I'm not sure if I've run into the problem since then.  My saved files that formerly triggered the problem no longer do so.  I suppose we can consider this matter closed now.

Comment 12 Ahmon Dancy 2012-01-26 21:34:18 UTC
Notes:  I'm still using f11 and I ran into the problem today (segmentation fault).  I saved a way a copy of the spool file for subsequent testing.  This was nmh-1.3-2.fc11.x86_64.  For kicks, I went over to a f14 machine and issued the same inc command and it succeeded.  That was nmh-1.3-3.fc12.x86_64.  So, for kicks, I built and installed nmh-1.3-3.fc12 on my f11 machine from the source rpm.  It still segfaults.  I'll try nmh-1.4-1.fc15 next.

Comment 13 Ahmon Dancy 2012-01-26 21:38:10 UTC
Built and installed nmh-1.4-1.fc15.src.rpm on f11.  So far so good.

Comment 14 David Levine 2012-07-13 14:25:54 UTC
This was fixed in nmh commit 439d79535278cca4149434a457874addd94fee0f on Fri Dec 26 21:54:19 2008 +0000.  So it should be fixed in nmh 1.4 and beyond.

Comment 15 Fedora End Of Life 2012-08-07 20:11:10 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 16 David Levine 2012-08-08 12:28:06 UTC
Changed status to CLOSED UPSTREAM, per Comment 14.


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