|
![]() ![]() |
CERT® Advisory CA-1996-08 Vulnerabilities in PCNFSDOriginal issue date: April 18, 1996Last revised: December 5, 1997 Updated information for NCR Corporation. A complete revision history is at the end of this file. The CERT Coordination Center has received reports of two vulnerabilities in the pcnfsd program (pcnfsd is also known as rpc.pcnfsd); we have also received reports that these problems are being exploited. These vulnerabilities are present in some vendor-provided versions of pcnfsd and in some publicly available versions. These two vulnerabilities were reported by Avalon Security Research in reports entitled "pcnfsd." If you are using a vendor-supplied version of pcnfsd, please see the vendor information in Section III.A and Appendix A. Until you can install a patch from your vendor for these vulnerabilities, consider using the publicly available version described in Section III.B. If you already use or plan to switch to a public version, we urge you to use the version cited in Section III.B or install the patch described in Section III.C. This patch has already been incorporated into the pcnfsd version described in III.B. There are many different public domain versions of pcnfsd, and we have not analyzed the vulnerability of those versions. We have analyzed and fixed the problems noted in this advisory only in the version described in III.B. We will update this advisory as we receive additional information. Please check advisory files regularly for updates that relate to your site. I. DescriptionThe pcnfsd program (also called rpc.pcnfsd) is an authentication and printing program that runs on a UNIX server. There are many publicly available versions, and several vendors supply their own version.pcnfsd supports a printing model that uses NFS to transfer files from a client to the pcnfsd server. (Note: pcnfsd does *not* provide NFS services.) When a client wants to print a file, it requests the path to a spool directory from the server. The client then writes the necessary files for printing using NFS, and informs the pcnfsd server that the files are ready for printing. pcnfsd creates a subdirectory for each of its clients using the client's hostname, then returns this path name to the client. The returned path name must be exported via to its clients by the NFS server. The NFS server and the pcnfsd server may be two separate machines. The first vulnerability is that pcnfsd, which runs as root, creates the aforementioned directories with mkdir(2) and then changes their mode with chmod(2) to mode 777. If the target directory is replaced with a symbolic link pointing to a restricted file or directory, the mkdir(2) will fail but the chmod(2) will succeed. This means that the target of the symbolic link will be mode 777. Note that pcnfsd must run as root when servicing print requests so that it can assume the identity of the PC user when interacting with UNIX print commands. On some systems, pcnfsd may also have to run as root so it can read restricted files when carrying out authentication tasks. The second vulnerability is that pcnfsd calls the system(3) subroutine as root, and the string passed to system(3) can be influenced by the arguments given in the remote procedure call. Remote users can execute arbitrary commands on the machine where pcnfsd runs. II. ImpactFor the first vulnerability, local users can change the permissions on any file accessible to the local system that the root user can change. For the second vulnerability, remote users can execute arbitrary commands as root on the machine where pcnfsd runs.The impact is that directories can become world writable (mode 777). What this can lead to is bounded by the creativity of the intruder. For example, once the mode of /etc were changed to mode 777, one could then replace the password file, and then go on from there. Exploitation of these vulnerabilities is only part of a larger attack scenario. Once exploited, there are many pathologies that could follow. III. SolutionIf you are using pcnfsd from a vendor, consult the vendor list in Section A. If your vendor is not listed, we recommend that you contact your vendor directly.Until a vendor patch is available, we recommend that you obtain the publicly available version of pcnfsd as described in Section B. This version already has the patch described in Section C. If you are presently using a public version of pcnfsd, we recommend that you either change to the version listed in Section B or apply the patch described in Section C. (The version in Section B already contains this patch.) A. Obtain and install the appropriate patch according to the instructions included with the patch.Below is a list of the vendors who have reported to us as of the date of this advisory. More complete information, is provided in the appendix. We will update the appendix as we receive more information.If your vendor's name is not on this list, please contact the vendor directly.
B. Until you are able to install the appropriate patch, we recommend that you obtain a version of pcnfsd from one of the following locations.This version already has the patch mentioned in Section III.C.ftp://ftp.cert.org/pub/tools/pcnfsd/pcnfsd.93.02.16-cert-dist.tar.Z
MD5 (pcnfsd.93.02.16-cert-dist.tar.Z) = b7af99a07dfcf24b3da3446d073f8649 Build, install, and restart rpc.pcnfsd.
C. A patch is available for the two vulnerabilities described in this advisory.Apply the patch using the GNU patch utility or by hand as necessary. Rebuild, reinstall, and restart rpc.pcnfsd. Set the mode of the top-level pcnfsd spool directory to 755.For example, in the version of pcnfsd cited in Section B, the top level spool directory is /usr/spool/pcnfs. To change this to mode 755, do the following as root:
To prevent any confusion concerning the checksums, please see the file README.pcnfsd.93.02.16-cert. Checksums are also included below: ftp://ftp.cert.org/pub/tools/pcnfsd/README.pcnfsd.93.02.16-cert
ftp://ftp.cert.org/pub/tools/pcnfsd/pcnfsd.93.02.16-cert-dist.tar.Z
Note: When the above file is unpacked, the md5 checksum referenced in the README.pcnfsd.93.02.16-cert matches the following: MD5 (pcnfsd.93.02.16-cert.tar) = 3a33f392d66b166cbc630275d8aba6f7 ftp://ftp.cert.org/pub/tools/pcnfsd/pcnfsd_misc.c-diffs
ftp://ftp.cert.org/pub/tools/pcnfsd/pcnfsd_print.c-diffs
Appendix A: Vendor InformationBelow is information we have received from vendors concerning the vulnerability described in this advisory. If you do not see your vendor's name, please contact the vendor directly for information.Berkeley Software Design, Inc. (BSDI)The problem described in these vulnerabilities is present in all versions of BSD/OS. There is a patch (our patch number U210-007) for our 2.1 version of BSD/OS and associated products available from our patch and ftp servers <patches@BSDI.> or ftp://ftp.BSDI.COM/bsdi/patches/patches-2.1/U210-007Data Design Systems, Inc.The Tandem NonStop Kernel (NSK) system, does NOT contain either of the vulnerabilities cited in the advisory.Digital Equipment CorporationFor updated information, please refer to the Digital Equipment Corporation Vendor Bulletin #96.0383, available inftp://ftp.cert.org/pub/vendors/dec/dec_96.0383 Note: Non-contract/non-warranty customers should contact local Digital
support channels for information
As always, Digital urges you to periodically review your system management and security procedures. Digital will continue to review and enhance the security features of its products and work with customers to maintain and improve the security and integrity of their systems. FreeBSD Inc.There are two seperate ways of upgrading. The patch listed below is a source code patch, and is available from:ftp://ftp.FreeBSD.ORG/pub/FreeBSD/FreeBSD-current/ports/net/pcnfsd/patches/patch-ad
You can also get a FreeBSD "package" (pre-compiled binary) from: ftp://ftp.FreeBSD.ORG/pub/FreeBSD/packages-current/net/pcnfsd-93.02.16.tgz
Hewlett-Packard Company1. The rpc.pcnfsd binary that ships with HP systems contains a vulnerability that could allow a user to change permissions on a restricted file or directory.Hewlett Packard is delivering a set of operating system dependent patches which contain a new version of rpc.pcnfsd. Accompanying each patch is a README file which discusses the general purpose of the patch and describes how to apply it to your system.Recommended solution: Apply one of the following patches based on your system hardware and operating system revision: s300/s400 9.X - PHNE_7371
(rpc.pcnfsd)
The patches described above provide a new version of the rpc.pcnfsd executable which fixes the vulnerability. 2. The rpc.pcnfsd binary that ships with most Unix systems contains a vulnerability that could allow users to execute arbitrary commands on the machine where pcnfsd runs.The rpc.pcnfsd daemon that ships with Hewlett Packard systems does not make the system call that allows this vulnerability. Since HP systems are not vulnerable - there is no fix!To subscribe to automatically receive future NEW HP Security Bulletins please refer to information in ftp://ftp.cert.org/pub/vendors/hp/HP.contact_info
IBM CorporationSee the appropriate release below to determine your action.Until these fixes are applied, pcnfsd should be turned off and commented out in /etc/inetd.conf. WARNING: If the line in /etc/inetd.conf has only one comment character, it will be uncommented (and exploitable) when mknfs is run! The inetd.conf entry must look like the following to remain turned off: ## pcnfsd sunrpc_udp udp wait root /usr/sbin/rpc.pcnfsd pcnfsd 150001 1-2 AIX 3.2 Apply the following fix to your system:
To determine if you have this PTF on your system, run the following
command:
AIX 4.1 Apply the following fix to your system:
To determine if you have this APAR on your system, run the following
command:
Or run the following command:
Your version of bos.net.nfs.client should be 4.1.5.5 or later. Your version of bos.net.nis.server should be 4.1.5.1 or later. AIX 4.2 Apply the following fix to your system:
To determine if you have this APAR on your system, run the following
command:
Or run the following command: lslpp -h bos.net.nfs.client bos.net.nis.server Your version of bos.net.nfs.client should be 4.2.1.1 or later. Your version of bos.net.nis.server should be 4.2.1.3 or later. To Order APARs may be ordered using Electronic Fix Distribution (via FixDist) or from the IBM Support Center. For more information on FixDist, reference http://service.software.ibm.com/aixsupport/ or send e-mail to aixserv@austin.ibm.com with a subject of "FixDist". IBM and AIX are registered trademarks of International Business Machines Corporation. NCR CorporationThe pcnfsd binary that shipped with some older NCR MP-RAS SVR4 releases contains a vulnerability that could allow a user to change permissions on a restricted file or directory.NCR is delivering a set of operating system dependent patches which contain a new version of pcnfsd. Accompanying each patch is a README file which discusses the general purpose of the patch and describes how to apply it to your system. Recommended solution: Apply one of the following patches based on your operating system revision: MP-RAS 2.03.x - PNFS203 (Version after 5/24-96) The patches described above provide a new version of the pcnfsd executable which fixes the vulnerability. NEC CorporationSome systems are vulnerable and patches are available through anonymous FTP from ftp://ftp.meshnet.or.jp in the /pub/48pub/security directory.
For further information contact: UX48-security-support@nec.co.jp . We encourage you contact the vendor directly if you have any questions. NeXT Software, Inc.NEXTSTEP is vulnerable. This will be fixed in the 4.0 release of OpenStep for Mach (aka NEXTSTEP 4.0, due out 2Q96).NovellCERT staff do not know whether Novell's enhanced version of PCNFSD (LWPNFSD) is vulnerable to this problem. We encourage you contact the vendor directly if you have any questions.The Santa Cruz Operation, Inc.Patches for pcnfsd are currently being developed for the following releases:SCO OpenServer 5
These releases, as well as all prior releases, are vulnerable to both issues mentioned in the advisory. Should you not need to use pcnfs, SCO recommends that you not run pcnfsd. This can be done by commenting out pcnfsd in the appropriate script that starts pcnfsd, located in /etc/rc2.d. This CERT advisory will be updated when further patch information is available. Silicon Graphics Corporationpcnfsd was only released for IRIX 5.3 and IRIX 6.2.SGI is producing patch1179 for IRIX 5.3. IRIX 6.2 is not vulnerable. Sun Microsystems, Inc.Sun has made patches available:Solaris 2.4, 2.5 (Sparc) 103095-02
TGV Software, Inc./Cisco Systems, Inc.These vulnerabilities are UNIX-specific and are not present in any version of MultiNet for OpenVMS.The CERT Coordination Center thanks Josh Daymont, Ben G., and Alfred H. of Avalon Security Research for providing information for this advisory. We thank Wolfgang Ley of DFN-CERT for his help in understanding these problems.
This document is available from: http://www.cert.org/advisories/CA-1996-08.html CERT/CC Contact Information
Phone: +1 412-268-7090 (24-hour hotline) Fax: +1 412-268-6989 Postal address: CERT/CC personnel answer the hotline 08:00-17:00 EST(GMT-5) / EDT(GMT-4) Monday through Friday; they are on call for emergencies during other hours, on U.S. holidays, and on weekends. Using encryptionWe strongly urge you to encrypt sensitive information sent by email. Our public PGP key is available from If you prefer to use DES, please call the CERT hotline for more information. Getting security informationCERT publications and other security information are available from our web site
* "CERT" and "CERT Coordination Center" are registered in the U.S. Patent and Trademark Office.
NO WARRANTY Conditions for use, disclaimers, and sponsorship information
Copyright 1996 Carnegie Mellon University. Revision History
Dec. 5, 1997 Appendix A - Added information for NCR Corporation.
Oct. 31, 1997 Updated vendor information for IBM.
Sep. 24, 1997 Updated copyright statement
Apr. 03, 1997 Minor changes: corrected a name in the acknowledgments;
indicated that CERT is now a registered service mark
Aug. 30, 1996 Information previously in the README was inserted into the
advisory.
Appendix B was moved to Sec. III.C. Appendix A - updated IBM URL
in "To Order" section.
Aug. 01, 1996 Appendix A - updated Hewlett-Packard patch information.
July 26, 1996 Appendix A - modified NEC patch information.
July 5, 1996 Appendix A - added pointer to updated vendor information
for Digital Equipment Corporation.
June 26, 1996 Appendix A - updated vendor information for NEC.
Appendix A - added vendor information for Data Design Systems, Inc.
May 8, 1996 Appendix A - added patch information for FreeBSD.
May 6, 1996 Section II -added additional clarification about the impact of
the vulnerability described.
Appendix B - replaced the patch information originally contained
in Appendix B with updated information.
Appendix A - added updates for Digital Equipment Corporation,
Novell, Sun Microsystems, Inc, and
TGV Software, Inc./Cisco Systems, Inc.
Apr. 23, 1996 Appendix A - added information from NEC Corporation.
Apr. 19, 1996 Appendix B - new information on the fix referred to in Appendix
B of the advisory.
|









