Bug 168661

Summary: CVE-2005-3044 lost fput could lead to DoS
Product: Red Hat Enterprise Linux 3 Reporter: Mark J. Cox <mjc>
Component: kernelAssignee: Ernie Petrides <petrides>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: high Docs Contact:
Priority: medium    
Version: 3.0CC: jparadis, lwang, peterm, petrides, sct, security-response-team
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: reported=20050914,source=vendorsec,public=20050909,impact=important
Fixed In Version: RHSA-2006-0140 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-01-19 16:00:03 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:
Bug Depends On:    
Bug Blocks: 168424    

Comment 2 Jim Paradis 2005-09-19 19:02:35 UTC
Can we characterize the severity of this issue?  The referenced fix has been
made upstream in 2.6 but not 2.4, and to do so would require backporting
fget_light()/fput_light().  I wonder if this is too invasive for a late
update... adding sct to cc list for his opinion.

Comment 3 Stephen Tweedie 2005-09-19 20:28:00 UTC
It's worse than just a missing fput().  The 2.4 code does:

	struct file *file = fget(fd);
	struct tty_struct *real_tty;

	if (!fd)
		return -EBADF;

It's checking fd for != 0 instead of file.  So it's (a) failing to operate
correctly if fd == 0 (which is a perfectly legal fd), and is (b) failing to
detect when fget() returns NULL. 

The fix is simple and localised.  There is no need at all to back-port
fget/fput_light() --- those are optimisations available only in 2.6.  For 2.4,
just use fget()/fput().

Comment 7 Ernie Petrides 2005-10-18 06:28:42 UTC
Fix posted for internal review on 17-Oct-2005.

Comment 8 Ernie Petrides 2005-10-20 05:46:03 UTC
A fix for this problem has just been committed to the RHEL3 U7
patch pool this evening (in kernel version 2.4.21-37.6.EL).


Comment 10 Ernie Petrides 2006-01-11 23:33:31 UTC
A fix for this problem has also been committed to the RHEL3 E7
patch pool this evening (in kernel version 2.4.21-37.0.1.EL).


Comment 12 Red Hat Bugzilla 2006-01-19 16:00:04 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2006-0140.html