search menu icon-carat-right cmu-wordmark

CERT Coordination Center

HP-UX "rexec" command vulnerable to buffer overflow when supplied overly long command line argument to "-l" option

Vulnerability Note VU#322540

Original Release Date: 2003-05-28 | Last Revised: 2003-07-25


A buffer overflow vulnerability in the rexec program supplied in some versions of the HP-UX operating system could allow local users to gain privileged access.


The rexec program allows local users to execute commands on remote servers. rexec calls the rexec subroutine to act as a client for the remote host's rexecd server.

The rexec program includes a "-l" command-line option that allows an alternate login name to be specified on the remote host. The rexec program supplied with some versions of the HP-UX operating systems contains a buffer overflow in the handling of the username argument passed to the "-l" option. An overly long username causes the rexec program to segmentation fault and could allow a local attacker to execute commands of their choosing on the local system. Since the rexec program is normally setuid to root, these commands would be executed with root privileges.


On systems running vulnerable versions of HP-UX where the rexec program is setuid to user root, local users may be able to execute code as root,thereby compromising the system.


Hewlett-Packard has released software patches and workaround information for this vulnerability. Please see the vendor information section of this document for more details.


Sites may wish to consider removing the setuid permissions from the rexec client program on systems that do not require its use.

Vendor Information


Hewlett-Packard Company Affected

Updated:  July 25, 2003



Vendor Statement

Document ID:  HPSBUX0304-257
Date Loaded:  20030722
     Title:  SSRT3496 Potential Security Vulnerability in rexec

Hash: SHA1

**REVISED 01**
Originally issued: 29 April 2003
Last revised: 22 July 2003
SSRT3496 Potential Security Vulnerability in rexec

NOTICE: There are no restrictions for distribution of this
Bulletin provided that it remains complete and intact.

The information in the following Security Bulletin should be
acted upon as soon as possible.  Hewlett-Packard Company will
not be liable for any consequences to any customer resulting
from customer's failure to fully implement instructions in this
Security Bulletin as soon as possible.

PROBLEM: Potential buffer overflow in rexec(1)

IMPACT: Potential increase in privilege.

PLATFORM: HP-UX B.10.20, B.11.00, and B.11.04.

SOLUTION: B.10.20 - install PHCO_26158 or subsequent.
         B.11.00 - install PHCO_24723 or subsequent.
-->      B.11.04 - install PHCO_29190 or subsequent.


AVAILABILITY: All patches are available.

CHANGE SUMMARY: Rev.01 - Added PHCO_26158.
                        Added PHCO_29190.
                        Added AFFECTED VERSIONS section.
A. Background

    The SSRT thanks Davide Del Vecchio for
   reporting this potential vulnerability to HP.

    HP Tru64 UNIX is not vulnerable to this reported problem.

--> The following is a list by HP-UX revision of
--> affected filesets and the fileset revision or
--> patch containing the fix.  To determine if a
--> system has an affected version, search the
--> output of "swlist -a revision -l fileset"
--> for an affected fileset, then determine if
--> a fixed revision or the applicable patch is
--> installed.
--> HP-UX B.11.04
--> =============
--> OS-Core.C-MIN
--> fix: PHCO_29190 or subsequent
--> HP-UX B.11.00
--> =============
--> OS-Core.C-MIN
--> fix: PHCO_24723 or subsequent
--> HP-UX B.10.20
--> =============
--> OS-Core.C-MIN
--> fix: PHCO_26158 or subsequent

 B. Recommended solution

**REVISED 01**
-->B.11.04 - Install PHCO_29190 or subsequent.
   B.11.00 - Install PHCO_24723 or subsequent.  PHCO_24723 has
             been superseded.  To find the recommended
             superseding patch and the latest superseding patch,
             search the technical knowledge base on
             for "PHCO_24723".
-->B.10.20 - Install PHCO_26158.

 C. To subscribe to automatically receive future NEW HP Security
   Bulletins from the HP IT Resource Center via electronic
   mail, do the following:

    Use your browser to get to the HP IT Resource Center page

    Use the 'Login' tab at the left side of the screen to login
   using your ID and password.  Use your existing login or the
   "Register" button at the left to create a login, in order to
   gain access to many areas of the ITRC.  Remember to save the
   User ID assigned to you, and your password.

    In the left most frame select "Maintenance and Support".

    Under the "Notifications" section (near the bottom of
   the page), select "Support Information Digests".

    To -subscribe- to future HP Security Bulletins or other
   Technical Digests, click the check box (in the left column)
   for the appropriate digest and then click the "Update
   Subscriptions" button at the bottom of the page.


    To -review- bulletins already released, select the link
   (in the middle column) for the appropriate digest.

    NOTE: Using your itrc account security bulletins can be
         found here:

    To -gain access- to the Security Patch Matrix, select
   the link for "The Security Bulletins Archive".  (near the
   bottom of the page)  Once in the archive the third link is
   to the current Security Patch Matrix. Updated daily, this
   matrix categorizes security patches by platform/OS release,
   and by bulletin topic.  Security Patch Check completely
   automates the process of reviewing the patch matrix for
   11.XX systems.  Please note that installing the patches
   listed in the Security Patch Matrix will completely
   implement a security bulletin _only_ if the MANUAL ACTIONS
   field specifies "No."

    The Security Patch Check tool can verify that a security
   bulletin has been implemented on HP-UX 11.XX systems providing
   that the fix is completely implemented in a patch with no
   manual actions required.  The Security Patch Check tool cannot
   verify fixes implemented via a product upgrade.

    For information on the Security Patch Check tool, see:

    The security patch matrix is also available via anonymous

    On the "Support Information Digest Main" page:
   click on the "HP Security Bulletin Archive".

    The PGP key used to sign this bulletin is available from
   several PGP Public Key servers.  The key identification
   information is:

      HP Security Response Team (Security Bulletin signing only)
      Fingerprint =
        6002 6019 BFC1 BC62 F079 862E E01F 3AFC 2D2A 7D59

    If you have problems locating the key please write to  Please note that this key is
   for signing bulletins only and is not the key returned
   by sending 'get key' to

 D. To report new security vulnerabilities, send email to

    Please encrypt any exploit information using the
   security-alert PGP key, available from your local key
   server, or by sending a message with a -subject- (not body)
   of 'get key' (no quotes) to


(c)Copyright 2003 Hewlett-Packard Company
Hewlett-Packard Company shall not be liable for technical or
editorial errors or omissions contained herein. The information
in this document is subject to change without notice.
Hewlett-Packard Company and the names of HP products referenced
herein are trademarks and/or service marks of Hewlett-Packard
Company.  Other product and company names mentioned herein may be
trademarks and/or service marks of their respective owners.


Version: PGP Personal Security 7.0.3

-----End of Document ID:  HPSBUX0304-257--------------------------------------

Vendor Information

The vendor has not provided us with any further information regarding this vulnerability.


The CERT/CC has no additional comments at this time.

If you have feedback, comments, or additional information about this vulnerability, please send us email.

CVSS Metrics

Group Score Vector



Thanks to Davide Del Vecchio for reporting this vulnerability.

This document was written by Chad R Dougherty.

Other Information

CVE IDs: None
Severity Metric: 14.43
Date Public: 2003-04-29
Date First Published: 2003-05-28
Date Last Updated: 2003-07-25 19:58 UTC
Document Revision: 13

Sponsored by CISA.