Visit our newest sister site!
Hundreds of free aircraft flight manuals
Civilian • Historical • Military • Declassified • FREE!

TUCoPS :: Unix :: General :: ciach011.txt

Sendmail Group Permissions Vulnerability


                       The U.S. Department of Energy
                    Computer Incident Advisory Capability
                           ___  __ __    _     ___
                          /       |     /_\   /
                          \___  __|__  /   \  \___

                             INFORMATION BULLETIN

                    sendmail Group Permissions Vulnerability

December 10, 1996 15:00 GMT                                        Number H-11
PROBLEM:       A security problem has been identified in sendmail affecting
               version 8.
PLATFORM:      All platforms running sendmail version 8.
DAMAGE:        This vulnerability may allow local users to run programs with
               group permissions of other users.
SOLUTION:      Install sendmail 8.8.4 as soon as possible. For sites that can
               not install sendmail 8.8.4, apply the workaround described
VULNERABILITY  This vulnerability requires group writable files to be
ASSESSMENT:    available on the same file system as a file that the attacker
               can convince sendmail to trust.

[ Start of AUSCERT Advisory ]

AA-96.15                        AUSCERT Advisory
                     sendmail Group Permissions Vulnerability
                                3 December 1996

Last Revised: --

AUSCERT has received information of a security problem in sendmail
affecting version 8.  This vulnerability may allow local users to run
programs with group permissions of other users.  This vulnerability
requires group writable files to be available on the same file system as
a file that the attacker can convince sendmail to trust.

AUSCERT recommends that sites take the steps outlined in Section 3
as soon as possible.

1.  Description

    When delivering mail to a program listed in a .forward or :include: file,
    that program is run with the group permissions possessed by the owner
    of that .forward or :include: file.  The owner of the file is used to
    initialize the list of group permissions that are in force when the
    program is run.  This list is determined by scanning the /etc/group

    It is possible to attain group permissions you should not have by
    linking to a file that is owned by someone else, but on which you
    have group write permissions.  By changing that file you can acquire
    the group permissions of the owner of that file.

2.  Impact

    An attacker can gain group permissions of another user, if the
    attacked user has a file that is group writable by the attacker on
    the same filesystem as either (a) the attacker's home directory, or
    (b) a :include: file that is referenced directly from the aliases
    file and is in a directory writable by the attacker.  The first
    (.forward) attack only works against root.  N.B.: this attack does
    not give you root "owner" permissions, but does give you access to
    the groups that list root in /etc/group.

3.  Workarounds/Solution

    AUSCERT recommends that sendmail 8.8.4 be installed as soon as possible
    (see Section 3.1).  For sites that can not install sendmail 8.8.4,
    apply the workaround described in Section 3.2.

3.1 Upgrade to sendmail 8.8.4.

    Eric Allman has released sendmail 8.8.4 which fixes this
    vulnerability.  There is no patch for any version of sendmail prior
    to 8.8.0.  Sites are encouraged to upgrade to sendmail 8.8.4 as soon
    as possible.

    The current version of sendmail is available from:

    The MD5 checksum for this distribution is:

        MD5 (sendmail.8.8.4.patch) = bb0f24abdb1416748b0c7a9f9315fa59
        MD5 (sendmail.8.8.4.tar.Z) = 0b4e4d09c75733ab63dde1cb6a52c615
        MD5 (sendmail.8.8.4.tar.gz) = 64ce6393a6968a0dc7c6652dace127b0

3.2 Workaround

    Eric Allman, the author of sendmail, has provided the following

    Set the UnsafeGroupWrites option in the file.  This option
    tells sendmail that group-writable files should not be considered safe
    for mailing to programs or files. This causes sendmail to refuse to
    run any programs referenced from group-writable files.  Setting this
    option is a good idea in any case, but may require that your users
    tighten permissions on their .forward files and :include: files.

    The command "find <filesystem> -user root -type f -perm -020 -print"
    will print the names of all files owned by root that are group
    writable on a given <filesystem>.

    In addition, group memberships should be audited regularly.  Users
    should not be in groups without a specific need.  In particular,
    root generally does not need to be listed in most groups.

    As a policy matter, root should have a umask of (at least) 022 so that
    group writable files are made consciously.  Also, the aliases file
    should not reference :include: files in writable directories.

4.  Additional Measures

    This section describes some additional measures for increasing the
    security of sendmail.  These measures are unrelated to the
    vulnerability described in this advisory but should be followed.
    Sites must apply the Workarounds/Solution described in Section 3 first,
    and then optionally apply the additional measures described in this

4.1 Restrict Ability to Mail to Programs

    If the ability to send electronic mail to programs (for example,
    vacation programs) is not required, this feature should be disabled.
    This is achieved by modifying the "Mprog" line in the configuration
    file to mail to "/bin/false" rather than "/bin/sh".  The following
    line in the ".mc" file will achieve this:

	define(`LOCAL_SHELL_PATH', `/bin/false')dnl

    If mailing to programs is required, it is recommended that the sendmail
    restricted shell, smrsh, be used at all times.  This applies to all
    versions of sendmail, including vendor versions.  smrsh is supplied
    with the current version of sendmail and includes documentation and
    installation instructions.

5.  Additional Information

    Sendmail 8.8.4 also fixes a denial of service attack.  If your system
    relies on the TryNullMXList option in order to forward mail to third
    party MX hosts, an attacker can force that option off, thereby causing
    mail to bounce.  As a workaround, you can use the mailertable feature
    to deliver to third party MX hosts regardless of the setting of the
    TryNullMXList option.

AUSCERT thanks Eric Allman for his rapid response to this vulnerability,
and for providing much of the technical content used in this advisory.
AUSCERT also thanks Terry Kyriacopoulos (Interlog Internet Services) and
Dan Bernstein (University of Illinois at Chicago) for their reporting
of these vulnerabilities.

[ End of AUSCERT Advisory ]


CIAC wishes to acknowledge the contributions of AUSCERT and Eric Allman for the
information contained in this bulletin.

CIAC, the Computer Incident Advisory Capability, is the computer
security incident response team for the U.S. Department of Energy
(DOE) and the emergency backup response team for the National
Institutes of Health (NIH). CIAC is located at the Lawrence Livermore
National Laboratory in Livermore, California. CIAC is also a founding
member of FIRST, the Forum of Incident Response and Security Teams, a
global organization established to foster cooperation and coordination
among computer security teams worldwide.

CIAC services are available to DOE, DOE contractors, and the NIH. CIAC
can be contacted at:
    Voice:    +1 510-422-8193
    FAX:      +1 510-423-8002
    STU-III:  +1 510-423-2604

For emergencies and off-hour assistance, DOE, DOE contractor sites,
and the NIH may contact CIAC 24-hours a day. During off hours (5PM -
8AM PST), call the CIAC voice number 510-422-8193 and leave a message,
or call 800-759-7243 (800-SKY-PAGE) to send a Sky Page. CIAC has two
Sky Page PIN numbers, the primary PIN number, 8550070, is for the CIAC
duty person, and the secondary PIN number, 8550074 is for the CIAC
Project Leader.

Previous CIAC notices, anti-virus software, and other information are
available from the CIAC Computer Security Archive.

   World Wide Web:
   Anonymous FTP: (
   Modem access:        +1 (510) 423-4753 (28.8K baud)
                        +1 (510) 423-3331 (28.8K baud)

CIAC has several self-subscribing mailing lists for electronic
1. CIAC-BULLETIN for Advisories, highest priority - time critical
   information and Bulletins, important computer security information;
2. CIAC-NOTES for Notes, a collection of computer security articles;
3. SPI-ANNOUNCE for official news about Security Profile Inspector
   (SPI) software updates, new features, distribution and
4. SPI-NOTES, for discussion of problems and solutions regarding the
   use of SPI products.

Our mailing lists are managed by a public domain software package
called ListProcessor, which ignores E-mail header subject lines. To
subscribe (add yourself) to one of our mailing lists, send the
following request as the E-mail message body, substituting
valid information for LastName FirstName and PhoneNumber when sending

E-mail to
        subscribe list-name LastName, FirstName PhoneNumber
  e.g., subscribe ciac-notes OHara, Scarlett W. 404-555-1212 x36

You will receive an acknowledgment containing address, initial PIN,
and information on how to change either of them, cancel your
subscription, or get help.

PLEASE NOTE: Many users outside of the DOE, ESnet, and NIH computing
communities receive CIAC bulletins.  If you are not part of these
communities, please contact your agency's response team to report
incidents. Your agency's team will coordinate with CIAC. The Forum of
Incident Response and Security Teams (FIRST) is a world-wide
organization. A list of FIRST member organizations and their
constituencies can be obtained via WWW at

This document was prepared as an account of work sponsored by an
agency of the United States Government. Neither the United States
Government nor the University of California nor any of their
employees, makes any warranty, express or implied, or assumes any
legal liability or responsibility for the accuracy, completeness, or
usefulness of any information, apparatus, product, or process
disclosed, or represents that its use would not infringe privately
owned rights. Reference herein to any specific commercial products,
process, or service by trade name, trademark, manufacturer, or
otherwise, does not necessarily constitute or imply its endorsement,
recommendation or favoring by the United States Government or the
University of California. The views and opinions of authors expressed
herein do not necessarily state or reflect those of the United States
Government or the University of California, and shall not be used for
advertising or product endorsement purposes.

LAST 10 CIAC BULLETINS ISSUED (Previous bulletins available from CIAC)

G-48: TCP SYN Flooding and IP Spoofing Attacks
H-01: Vulnerabilities in bash
H-02: SUN's TCP SYN Flooding Solutions
H-03: HP-UX_suid_Vulnerabilities
H-04: HP-UX  Ping Vulnerability
H-05: Internet Hoaxes
H-07: Sendmail SIGHUP-smtpd Vulnerability
H-08: lpr Buffer Overrun Vulnerability
H-09: HP 9000 Access Vulnerability
H-10: HP-UX Security Vulnerabilities (passwd, fpkg2swpkg, newgrp)

RECENT CIAC NOTES ISSUED (Previous Notes available from CIAC)

Notes 07 - 3/29/95     A comprehensive review of SATAN

Notes 08 - 4/4/95      A Courtney update

Notes 09 - 4/24/95     More on the "Good Times" virus urban legend

Notes 10 - 6/16/95     PKZ300B Trojan, Logdaemon/FreeBSD, vulnerability
                       in S/Key, EBOLA Virus Hoax, and Caibua Virus

Notes 11 - 7/31/95     Virus Update, Hats Off to Administrators,
                       America On-Line Virus Scare, SPI 3.2.2 Released,
                       The Die_Hard Virus

Notes 12 - 9/12/95     Securely configuring Public Telnet Services, X
                       Windows, beta release of Merlin, Microsoft Word
                       Macro Viruses, Allegations of Inappropriate Data
                       Collection in Win95

Notes 96-01 - 3/18/96  Java and JavaScript Vulnerabilities, FIRST
                       Conference Announcement, Security and Web Search
                       Engines, Microsoft Word Macro Virus Update

TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2015 AOH