Bug 239890 (CVE-2007-2683) - CVE-2007-2683 Buffer overflow in mutt's gecos structure handling
Summary: CVE-2007-2683 Buffer overflow in mutt's gecos structure handling
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2007-2683
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL: http://dev.mutt.org/trac/ticket/2885
Whiteboard:
Depends On: 240176 241247 241652 838048
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-05-11 22:44 UTC by Lubomir Kundrak
Modified: 2019-09-29 12:20 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-06-14 12:42:33 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2007:0386 0 normal SHIPPED_LIVE Moderate: mutt security update 2008-01-07 22:02:34 UTC

Description Lubomir Kundrak 2007-05-11 22:44:57 UTC
Description of problem:

An overflow can be caused when mutt tries to expand "&" in real name
gecos field to uppercase login, and real name string length plus login name
length is more than 256 characters.

This can be reached viea two vectors -- at startup, it expands the real name of
the user launching mutt. This is only under control of the user, so to exploit
it he would have to voluntarily malform his real name field, all he'll get
would be to execute code as himself. No security impact here.

Second vector is alias expansion. If mutt user has an alias for a
local user, in form 'alias aliasname username # and thus not "alias aliasname
User Name <username>"' mutt does exactly the same thing for username. It is
questionable how likely is it for a local user to exist in someone's alias file
and have a malicious realname though.

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

mutt-1.4.2.2-5

Steps to Reproduce:

# USERNAME=$(perl -e 'print "a" x 31')
# useradd -c "&&&&&&&&& your-favourite-ascii-shellcode-here" $USERNAME
# echo alias billg $USERNAME >~/.muttrc
# mutt billg
Segmentation fault (core dumped)
#

Comment 1 Lubomir Kundrak 2007-05-11 22:46:40 UTC
As the problematic call is to memmove(), this should be caught by
_FORTIFY_SOURCE=2 on FC and RHEL5, and thus have no security impact
at all there.

Comment 2 Lubomir Kundrak 2007-05-15 16:34:29 UTC
        Doesn't Affect: RHEL2.1
        Affects: RHEL3
        Affects: RHEL4
        Doesn't Affect: RHEL5 (_FORTIFY_SOURCE, impact=none)
        Doesn't Affect: FC5 (_FORTIFY_SOURCE, impact=none)
        Doesn't Affect: FC6 (_FORTIFY_SOURCE, impact=none)

Comment 3 Lubomir Kundrak 2007-05-29 11:45:50 UTC
Not caught by fortify source. I had mistaken.


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