Bug 816642

Summary: Resource leak in mdadm found by Coverity
Product: Red Hat Enterprise Linux 6 Reporter: Pavel Raiskup <praiskup>
Component: mdadmAssignee: Jes Sorensen <Jes.Sorensen>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Kernel QE team <kernel-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-09 13:03:03 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
List of added defects in mdadm-3.2.3-7
none
List of all defects in mdadm-3.2.3-7 none

Description Pavel Raiskup 2012-04-26 15:17:03 UTC
Hello,

there was revealed some new defects in mdadm-3.2.3-7 (compared against
mdadm-3.2.3-6).

1. Resource leak on mdadm-3.2.3/super-intel.c:5687

   variable 'dir' is not freed.

2. (low prio) calling 'close(-1);' on mdadm-3.2.3/super-intel.c:4355

   I'm reporting this even if this should be empty operation.  This situation
   may occur eg. on line 4327 when jumping to error (dfd set to negative
   value).

I'm attaching list of added defects in mdadm-3.2.3-7.

Devel:
  Those errors are mentioned just as a warning and it depends on you whether
  they will be fixed.  These defects can be not so dangerous and/or not so
  prioritized to be fixed in 6.3 so feel free to move it to 6.4 or close it as
  a NOTABUG if we don't need to fix these at all.

Quality engineering:
  This issues were found by static analysis tool and we can't provide any
  reproducer for these.  We are able to rescan package once these problems are
  fixed.  Please check these tests as SanityOnly (just check that patches for
  the issues and check if nothing unexpected was added by the commit).  If you
  want to check the new package with Coverity yourself, feel free to use
  covscan tool (https://engineering.redhat.com/trac/CoverityScan/wiki/covscan).

Pavel

Comment 1 Pavel Raiskup 2012-04-26 15:18:31 UTC
Created attachment 580509 [details]
List of added defects in mdadm-3.2.3-7

Comment 2 Pavel Raiskup 2012-04-26 15:21:10 UTC
Created attachment 580510 [details]
List of all defects in mdadm-3.2.3-7

Comment 3 RHEL Program Management 2012-05-03 05:31:08 UTC
Since RHEL 6.3 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 4 Jes Sorensen 2012-05-04 13:43:10 UTC
Hi,

I have pushed patches upstream for these two issues. We may fix the resource
leak in the 6.4 update, I don't think it's serious enough to warrant a 6.3
blocker.

Thanks for reporting these!

Jes

Comment 6 Jes Sorensen 2012-10-09 13:03:03 UTC
The two listed issues have been addressed by the update to mdadm-3.2.5
in RHEL6.4.

Closing

Jes