Protect yourself against future threats.
-----BEGIN PGP SIGNED MESSAGE----- =========================================================================== AUSCERT External Security Bulletin Redistribution ESB-2000.275 -- RHSA-2000:066-05 lpr has a format string security bug, LPRng compat issues, and a race cond. 6 October 2000 =========================================================================== AusCERT Security Bulletin Summary --------------------------------- Product: lpr Vendor: Red Hat Operating System: Red Hat Linux Linux Impact: Root Compromise Access Required: Local Ref: ESB-2000.274 - --------------------------BEGIN INCLUDED TEXT-------------------- - --------------------------------------------------------------------- Red Hat, Inc. Security Advisory Synopsis: lpr has a format string security bug, LPRng compat issues, and a race cond. Advisory ID: RHSA-2000:066-05 Issue date: 2000-09-25 Updated on: 2000-10-04 Product: Red Hat Linux Keywords: lpr security lpd LPRng Cross references: N/A - --------------------------------------------------------------------- 1. Topic: lpr has a format string security bug. It also mishandles any extension to the lpd communication protocol, and assumes that the instructions contained in the extension are a file it should try to print. It also has a race condition in the handling of queue interactions that can cause the queue to wedge. Note: Packages indicated in revision -03 and earlier were not signed with the Red Hat GPG key. This has been corrected. 2. Relevant releases/architectures: Red Hat Linux 5.0 - i386, alpha Red Hat Linux 5.1 - i386, alpha, sparc Red Hat Linux 5.2 - i386, alpha, sparc Red Hat Linux 6.0 - i386, alpha, sparc Red Hat Linux 6.1 - i386, alpha, sparc Red Hat Linux 6.2 - i386, alpha, sparc 3. Problem description: The old BSD-based lpr which we shipped with Red Hat Linux 5.x and 6.x has a recently discovered format string bug in its calls to the syslog facility. While we are not aware of any exploits for this issue, it might be possible for a user to gain local root access. For this reason, upgrading to the new lpr is strongly encouraged. Additionally, lpr did not properly handle extensions to the lpd protocol. LPRng, an advanced replacement for lpr included in Red Hat Linux 7, makes use of extensions. The lpr included in Red Hat Linux 6.2 and earlier will not recognize these extensions, and attempt to handle the instructions as if they were a file to be printed. As a result, the lpr system sends out three of the following email messages per print job: Date: Thu, 10 Aug 2000 21:36:32 -0400 From: bin <bin@redhat.com> Reply-To: root@yyyyy.redhat.com To: xxxx@xxxxxx.redhat.com Subject: lp printer job "(stdin)" Your printer job ((stdin)) was not printed because the daemon could not stat the file Additionaly, a race condition exists in the contention for the lock file, making it posible for the queue to get into a wedged state. These problems are now fixed. 4. Solution: For each RPM for your particular architecture, run: rpm -Fvh [filename] where filename is the name of the RPM. Additionally, after upgrading, you will want to restart your "lpd" service by executing the following as root: /etc/rc.d/init.d/lpd restart If you do not need printing at all on your system, we recommend you remove the lpr print system: /etc/rc.d/init.d/lpd stop rpm -e lpr 5. Bug IDs fixed (http://bugzilla.redhat.com/bugzilla for more info): 16032 - LPRng lpd/BSD lpd generate stat errors in LPRng->BSD queue interactions. 11740 - Race condition in locking for LPD 16725 - BSD lpr 0.50-5 Errata Tracking Bug 6. RPMs required: Red Hat Linux 5.2: alpha: ftp://updates.redhat.com/5.2/alpha/lpr-0.50-7.5.x.alpha.rpm sparc: ftp://updates.redhat.com/5.2/sparc/lpr-0.50-7.5.x.sparc.rpm i386: ftp://updates.redhat.com/5.2/i386/lpr-0.50-7.5.x.i386.rpm sources: ftp://updates.redhat.com/5.2/SRPMS/lpr-0.50-7.5.x.src.rpm Red Hat Linux 6.x: alpha: ftp://updates.redhat.com/6.2/alpha/lpr-0.50-7.6.x.alpha.rpm sparc: ftp://updates.redhat.com/6.2/sparc/lpr-0.50-7.6.x.sparc.rpm i386: ftp://updates.redhat.com/6.2/i386/lpr-0.50-7.6.x.i386.rpm sources: ftp://updates.redhat.com/6.2/SRPMS/lpr-0.50-7.6.x.src.rpm 7. Verification: MD5 sum Package Name - -------------------------------------------------------------------------- c4c0311c59fd741507a41ce6705d7b11 5.2/SRPMS/lpr-0.50-7.5.x.src.rpm 3ee5d7ae89389678c48a881ea9f13de3 5.2/alpha/lpr-0.50-7.5.x.alpha.rpm 1a516bb638568f516beda7dd98c8ee1b 5.2/i386/lpr-0.50-7.5.x.i386.rpm 73308d3778f5f9f953c794cecd98dde4 5.2/sparc/lpr-0.50-7.5.x.sparc.rpm 49d59ce8e0347a59a55ae10e142ad709 6.2/SRPMS/lpr-0.50-7.6.x.src.rpm 031b2bb377ec41ca2f1b924a0e92fad6 6.2/alpha/lpr-0.50-7.6.x.alpha.rpm d1576d4478830b78f2368935eb59044a 6.2/i386/lpr-0.50-7.6.x.i386.rpm 031b953bd97f40e5b9f11696ac27c4d5 6.2/sparc/lpr-0.50-7.6.x.sparc.rpm These packages are GPG signed by Red Hat, Inc. for security. Our key is available at: http://www.redhat.com/corp/contact.html You can verify each package with the following command: rpm --checksig <filename> If you only wish to verify that each package has not been corrupted or tampered with, examine only the md5sum with the following command: rpm --checksig --nogpg <filename> 8. References: Thanks go to Chris Evans <chris@scary.beasts.org> for spotting this in the OpenBSD lpr CVS commit logs, and verifying the problem existed for Linux as well. Copyright(c) 2000 Red Hat, Inc. - --------------------------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: http://www.auscert.org.au/Information/advisories.html If you believe that your system has been compromised, contact AusCERT or your representative in FIRST (Forum of Incident Response and Security Teams). 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. -----BEGIN PGP SIGNATURE----- Version: 2.6.3i Charset: noconv Comment: ftp://ftp.auscert.org.au/pub/auscert/AUSCERT_PGP.key iQCVAwUBOlSM6Ch9+71yA2DNAQFfTgP/YpG1mIDzyk9LtogNQ8gaD5JGOd0kl6DO +KC8lgyU8TO/Mc+SX3iU2EXsQ3tTLEWT7ExvqENDbI2bVqu6NxPe3s5dcFoHafbq NXUx93h8a1punC/KUkYNfNvvbxa30BS0NO/dVauaHlgIsoY8Ftsf/+RWuTBexkM0 PPIl9pnzFjU= =Fqm2 -----END PGP SIGNATURE-----