Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 232211 - double free memory corruption in smbfs
Summary: double free memory corruption in smbfs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel
Version: 4.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Jeff Layton
QA Contact: Martin Jenner
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-03-14 12:36 UTC by Vasily Averin
Modified: 2008-01-09 17:29 UTC (History)
3 users (show)

Fixed In Version: RHBA-2007-0791
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-11-15 16:21:50 UTC


Attachments (Terms of Use)
smbfs double free memory corruption fix (deleted)
2007-03-14 12:36 UTC, Vasily Averin
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0791 normal SHIPPED_LIVE Updated kernel packages available for Red Hat Enterprise Linux 4 Update 6 2007-11-14 18:25:55 UTC

Description Vasily Averin 2007-03-14 12:36:58 UTC
SWsoft Virtuozzo/OpenVZ Linux kernel team has discovered double free memory
corruption in smbfs.

Smbfs allocates rq_trans2buffer to handle server's multi transaction2 response
messages. As struct smb_request may be reused, rq_trans2buffer is freed before
each new request. However if last servers's response is not multi but single
trans2 message then new rq_trans2buffer is not allocated but last smb_rput still
tries to free it again.
To prevent this issue rq_trans2buffer pointer should be set to NULL after kfree

Comment 1 Vasily Averin 2007-03-14 12:36:58 UTC
Created attachment 150030 [details]
smbfs double free memory corruption fix

Comment 2 Jeff Layton 2007-05-07 15:41:08 UTC
Thanks, patch looks sane. I'll plan to propose it for inclusion...


Comment 4 RHEL Product and Program Management 2007-05-07 16:21:44 UTC
This request was evaluated by Red Hat Kernel Team for inclusion in a Red
Hat Enterprise Linux maintenance release, and has moved to bugzilla 
status POST.

Comment 5 Jason Baron 2007-06-22 14:26:27 UTC
committed in stream U6 build 55.11. A test kernel with this patch is available
from http://people.redhat.com/~jbaron/rhel4/


Comment 8 errata-xmlrpc 2007-11-15 16:21:50 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/RHBA-2007-0791.html



Note You need to log in before you can comment on or make changes to this bug.