Bug 1011817

Summary: bridge monitor file forgets to close a file
Product: Red Hat Enterprise Linux 6 Reporter: Petr Pisar <ppisar>
Component: iprouteAssignee: Pavel Šimerda (pavlix) <psimerda>
Status: CLOSED ERRATA QA Contact: Jaroslav Aster <jaster>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.5CC: jaster, ksrot, lmiksik, rvokal, salmy, thozza
Target Milestone: rcKeywords: EasyFix, Patch, Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: http://thread.gmane.org/gmane.linux.network/284884
Whiteboard:
Fixed In Version: iproute-2.6.32-42.el6 Doc Type: Bug Fix
Doc Text:
Running the "bridge monitor file" command opened the file, but never closed it. A fix has been applied to close the opened file after loading its content. As a result, the command now closes all opened files as expected.
Story Points: ---
Clone Of:
: 1011818 1011822 (view as bug list) Environment:
Last Closed: 2015-07-22 06:40:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Proposed fix
none
Upstream fix none

Description Petr Pisar 2013-09-25 08:08:56 UTC
Static analysis and valgrind show a memory leak in bridge(8) tool. The reason is a missing fclose(3) call:

> iproute2-2.6.31/bridge/monitor.c:140:leaked_storage – Variable "fp" going out of scope leaks the storage it points to. 

Proposed fix has been submitted to the upstream <http://thread.gmane.org/gmane.linux.network/284884>.

Comment 1 Petr Pisar 2013-09-25 08:09:47 UTC
Created attachment 802634 [details]
Proposed fix

Comment 2 Petr Pisar 2013-10-01 13:55:55 UTC
Patch accepted by upstream as:

commit 101847446e6a5e3ca370e65ebc462584934fce0e
Author: Petr Písař <ppisar>
Date:   Wed Sep 25 09:45:45 2013 +0200

    iproute2: bridge: Close file with bridge monitor file

Comment 3 Petr Pisar 2013-10-01 14:06:06 UTC
Created attachment 805990 [details]
Upstream fix

Comment 12 errata-xmlrpc 2015-07-22 06:40:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-1331.html