Bug 816642 - Resource leak in mdadm found by Coverity
Summary: Resource leak in mdadm found by Coverity
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: mdadm
Version: 6.3
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Jes Sorensen
QA Contact: Red Hat Kernel QE team
Depends On:
TreeView+ depends on / blocked
Reported: 2012-04-26 15:17 UTC by Pavel Raiskup
Modified: 2012-10-09 13:03 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2012-10-09 13:03:03 UTC
Target Upstream Version:

Attachments (Terms of Use)
List of added defects in mdadm-3.2.3-7 (1.78 KB, text/plain)
2012-04-26 15:18 UTC, Pavel Raiskup
no flags Details
List of all defects in mdadm-3.2.3-7 (57.72 KB, text/plain)
2012-04-26 15:21 UTC, Pavel Raiskup
no flags Details

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

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

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

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

  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).


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

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

Thanks for reporting these!


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.



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