RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 825903 - Coverity scan relevant defects
Summary: Coverity scan relevant defects
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.3
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Alex Jia
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 771022 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-29 03:13 UTC by Alex Jia
Modified: 2012-10-10 02:42 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-10-10 02:42:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
CoverityScan on libvirt-0.9.10-21.el6.x86_64 (36.28 KB, text/plain)
2012-05-29 03:13 UTC, Alex Jia
no flags Details
CoverityScan on libvirt-0.10.0-0rc0.el6.src.rpm (24.91 KB, text/plain)
2012-08-06 05:15 UTC, Alex Jia
no flags Details

Description Alex Jia 2012-05-29 03:13:50 UTC
Created attachment 587302 [details]
CoverityScan on libvirt-0.9.10-21.el6.x86_64

Description of problem:
The bug is used for tracking CoverityScan relevant issues for 6.4 like 6.3.

Version-Release number of selected component (if applicable):
# rpm -q libvirt
libvirt-0.9.10-21.el6.x86_64


How reproducible:
always

Steps to Reproduce:
1.
2.
3.
  
Actual results:
CoverityScan on libvirt-0.9.10-21.el6.x86_64:

Analysis summary report:
------------------------
Files analyzed                 : 249
Total LoC input to cov-analyze : 310106
Functions analyzed             : 7587
Paths analyzed                 : 868953
Defect occurrences found       : 43 Total
                                  6 CHECKED_RETURN
                                 13 DEADCODE
                                  1 EVALUATION_ORDER
                                  1 FORWARD_NULL
                                  1 MISSING_RETURN
                                  2 NEGATIVE_RETURNS
                                  1 NO_EFFECT
                                  3 NULL_RETURNS
                                  1 OVERRUN_STATIC
                                  7 RESOURCE_LEAK
                                  1 RETURN_LOCAL
                                  1 SIZEOF_MISMATCH
                                  3 UNINIT
                                  2 UNUSED_VALUE

Expected results:


Additional info:

Comment 2 Dave Allan 2012-05-29 16:00:28 UTC
Alex, would it be possible for you to file BZs for the specific problems reported by Coverity instead of a single BZ for the entire report?

Comment 3 Alex Jia 2012-05-30 02:21:07 UTC
(In reply to comment #2)
> Alex, would it be possible for you to file BZs for the specific problems
> reported by Coverity instead of a single BZ for the entire report?

Yeah, I'm analysing test report then will pick up some critical issues in here later.

Comment 4 Alex Jia 2012-05-30 10:40:34 UTC
Need to confirm the following issues:

1.
Error: OVERRUN_STATIC:
/builddir/build/BUILD/libvirt-0.9.10/src/locking/lock_driver_sanlock.c:158: overrun-buffer-arg: Overrunning static array ""__LIBVIRT__DISKS__"" of size 19 bytes by passing it to a function which indexes it with argument "48UL" at byte position 47.

2.
Error: SIZEOF_MISMATCH:
/builddir/build/BUILD/libvirt-0.9.10/tools/virsh.c:5316: suspicious_sizeof: Passing argument "8UL /* sizeof (cpumap) */" to function "_vshCalloc" and then casting the return value to "unsigned char *" is suspicious.

3.
Error: UNINIT:
/builddir/build/BUILD/libvirt-0.9.10/src/lxc/lxc_driver.c:1395: var_decl: Declaring variable "fd" without initializer.
/builddir/build/BUILD/libvirt-0.9.10/src/lxc/lxc_driver.c:1443: uninit_use_in_call: Using uninitialized value "fd" when calling "virFileClose".
/builddir/build/BUILD/libvirt-0.9.10/src/util/virfile.c:50: read_parm: Reading a parameter value.

4.
Error: UNINIT:
/builddir/build/BUILD/libvirt-0.9.10/src/lxc/lxc_controller.c:1104: var_decl: Declaring variable "consoles" without initializer.
/builddir/build/BUILD/libvirt-0.9.10/src/lxc/lxc_controller.c:1237: uninit_use: Using uninitialized value "consoles".

Notes, upstream commit f74471de has fixed issue 3 and 4.

For memory leaks and NULL pointer derefing, they should be okay for libvirt.

In addition, I want to open the bug until rhel6.4 release then trace all of Coverity issues into the bug.

Alex

Comment 6 RHEL Program Management 2012-07-10 07:23:13 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 7 RHEL Program Management 2012-07-10 23:51:35 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 12 Alex Jia 2012-08-06 05:13:36 UTC
Coverity scan on libvirt-0.10.0-0rc0:

Analysis summary report:
------------------------
Files analyzed                 : 274
Total LoC input to cov-analyze : 320606
Functions analyzed             : 7882
Paths analyzed                 : 860037
Defect occurrences found       : 38 Total
                                  3 CHECKED_RETURN
                                  6 DEADCODE
                                  6 FORWARD_NULL
                                  2 MISSING_RETURN
                                  3 NEGATIVE_RETURNS
                                  3 NO_EFFECT
                                  1 NULL_RETURNS
                                  1 OVERRUN_STATIC
                                  5 RESOURCE_LEAK
                                  1 RETURN_LOCAL
                                  1 REVERSE_INULL
                                  1 SIZEOF_MISMATCH
                                  3 UNINIT
                                  2 UNUSED_VALUE

For details, please check attachment.

Comment 13 Alex Jia 2012-08-06 05:15:29 UTC
Created attachment 602408 [details]
CoverityScan on libvirt-0.10.0-0rc0.el6.src.rpm

Comment 14 Dave Allan 2012-08-06 15:01:13 UTC
*** Bug 771022 has been marked as a duplicate of this bug. ***

Comment 15 Dave Allan 2012-10-10 01:48:26 UTC
Alex, I'd like to close this BZ and open new BZs for any specific leaks that need to be fixed in 6.4.  Is that ok with you?

Comment 16 Alex Jia 2012-10-10 02:40:19 UTC
(In reply to comment #15)
> Alex, I'd like to close this BZ and open new BZs for any specific leaks that
> need to be fixed in 6.4.  Is that ok with you?

Dave, it's okay for me.

Comment 17 Dave Allan 2012-10-10 02:42:30 UTC
Ok, thanks.


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