AUSCERT External Security Bulletin Redistribution
                  ESB-2000.397 -- CERT Advisory CA-2000-22
                     Input Validation Problems in LPRng
                              14 December 2000


	AusCERT Security Bulletin Summary

Product:                LPRng
Operating System:       BSD
Impact:                 Execute Arbitrary Code/Commands
Access Required:        Remote

Ref:                    ESB-2000.274

- --------------------------BEGIN INCLUDED TEXT--------------------


CERT Advisory CA-2000-22 Input Validation Problems in LPRng

   Original release date: December 12, 2000
   Last updated: --
   Source: CERT/CC

   A complete revision history is at the end of this file.

Systems Affected

     * Systems running unpatched LPRng software


   A popular replacement software package to the BSD lpd printing service
   called LPRng contains at least one software defect, known as a "format
   string vulnerability,"[1] which may allow remote users to execute
   arbitrary code on vulnerable systems.

I. Description

   LPRng, now being packaged in several open-source operating system
   distributions, has a missing format string argument in at least two
   calls to the syslog() function.

   Missing format strings in function calls allow user-supplied arguments
   to be passed to a susceptible *snprintf() function call. Remote users
   with access to the printer port (port 515/tcp) may be able to pass
   format-string parameters that can overwrite arbitrary addresses in the
   printing service's address space. Such overwriting can cause
   segmentation violations leading to denial of printing services or to
   the execution of arbitrary code injected through other means into the
   memory segments of the printer service.

   Sample syslog entries from successful exploitation of this
   vulnerability have been reported, as follows:

Nov 26 10:01:00 foo SERVER[12345]: Dispatch_input: bad request line
XXXXXXXXXXXXXXXXXX%.168u%300$nsecurity.%301 $nsecurity%302$n%.192u%303$n

   This vulnerability has been assigned the identifier CAN-2000-0917 by
   the Common Vulnerabilities and Exposures (CVE) group:


   The CERT/CC has received reports of extensive probing to port 515/tcp.
   In addition, we have received some reports of systems compromised
   using this vulnerability. Tools exploiting this vulnerability have
   been posted to public forums.

II. Impact

   A remote user may be able to execute arbitrary code with elevated

   In addition, the printing service may be disrupted or disabled

III. Solution

Apply a patch from your vendor

   Upgrade to a non-vulnerable version of LPRng (3.6.25), as described in
   the vendor sections below. Alternately, you can obtain the version of
   LPRng which fixes the missing format string at:


Disallow access to printer service ports (typically 515/tcp) using firewall
or packet-filtering technologies

   Blocking access to the vulnerable service will limit your exposure to
   attacks from outside your network perimeter. However, the
   vulnerability would still allow local users to gain privileges they
   normally shouldn't have; in addition, blocking port 515/tcp at a
   network perimeter would still allow any remote user inside the
   perimeter to exploit the vulnerability.

Appendix A. Vendor Information


   Apple has conducted an investigation and determined that Mac OS X
   Public Beta and Mac OS X Server do not use LPRng and are therefore not
   vulnerable to this exploitation.

Caldera OpenLinux

   See CSSA-2000-033.0 "format bug in LPRng" at:


Compaq Computer Corporation

   Compaq Tru64 UNIX S/W is not vulnerable.


   FreeBSD does not include LPRng in the base system. Older versions of
   FreeBSD included a vulnerable version of LPRng in the Ports Collection
   but this was corrected almost 2 months ago, prior to the release of
   FreeBSD 4.2. See FreeBSD Security Advisory 00:56
   rng.asc) for more information.

Hewlett-Packard Company

   This does not apply to HP; HP does not ship LPRng on HP-UX.


   IBM's AIX operating system is not vulnerable to this security exploit.

Microsoft Corporation

   Microsoft doesn't use LPRng in any of its products, so no Microsoft
   products are affected by the vulnerability.


   NetBSD does not include LPRng in the base system; however we do have a
   third-party package of LPRng-3.6.8 which is vulnerable. There's work
   underway to upgrade it to a non-vulnerable version.


   OpenBSD does not ship lprng.


   LPRng Version 3.6.24 and earlier is vulnerable.

   See RHSA-2000:065-04 at:



   IRIX does not contain LPRng support.


   SuSE is not vulnerable. Please see additional comments at:



    1. VU#382365: LPRng can pass user-supplied input as a format string
       parameter to syslog() calls, CERT/CC, 10/06/2000,

   The CERT Coordination Center thanks Chris Evans for his initial report
   on the vulnerability described in this advisory.

   Author: This document was written by Jeffrey S Havrilla. Feedback on
   this advisory is appreciated.

   This document is available from:

CERT/CC Contact Information

   Email: cert@cert.org
          Phone: +1 412-268-7090 (24-hour hotline)
          Fax: +1 412-268-6989
          Postal address:
          CERT Coordination Center
          Software Engineering Institute
          Carnegie Mellon University
          Pittsburgh PA 15213-3890

   CERT personnel answer the hotline 08:00-20: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 encryption

   We 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

Getting security information

   CERT publications and other security information are available from
   our web site


   To subscribe to the CERT mailing list for advisories and bulletins,
   send email to majordomo@cert.org. Please include in the body of your

   subscribe cert-advisory

   * "CERT" and "CERT Coordination Center" are registered in the U.S.
   Patent and Trademark Office.

   Any material furnished by Carnegie Mellon University and the Software
   Engineering Institute is furnished on an "as is" basis. Carnegie
   Mellon University makes no warranties of any kind, either expressed or
   implied as to any matter including, but not limited to, warranty of
   fitness for a particular purpose or merchantability, exclusivity or
   results obtained from use of the material. Carnegie Mellon University
   does not make any warranty of any kind with respect to freedom from
   patent, trademark, or copyright infringement.

   Conditions for use, disclaimers, and sponsorship information

   Copyright 2000 Carnegie Mellon University.

   Revision History
	Dec 12, 2000: Initial Release

Version: PGP for Personal Privacy 5.0
Charset: noconv


- --------------------------END INCLUDED TEXT--------------------

This security bulletin is provided as a service to AusCERT's members.  As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content.  The decision to use any or all of this information is
the responsibility of each user or organisation, and should be done so in
accordance with site policies and procedures.

NOTE: This is only the original release of the security bulletin.  It may
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the original authors to ensure that the information is still current.

Contact information for the authors of the original document is included
in the Security Bulletin above.  If you have any questions or need further
information, please contact them directly.

Previous advisories and external security bulletins can be retrieved from:


If you believe that your system has been compromised, contact AusCERT or
your representative in FIRST (Forum of Incident Response and Security

Internet Email: auscert@auscert.org.au
Facsimile:	(07) 3365 7031
Telephone:	(07) 3365 4417 (International: +61 7 3365 4417)
		AusCERT personnel answer during Queensland business hours
		which are GMT+10:00 (AEST).
		On call after hours for emergencies.

Version: 2.6.3i
Charset: noconv
Comment: ftp://ftp.auscert.org.au/pub/auscert/AUSCERT_PGP.key