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 1982878 - Coverity Issues Found
Summary: Coverity Issues Found
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: vdo
Version: 8.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: ---
Assignee: sclafani
QA Contact: Filip Suba
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-15 21:38 UTC by Andy Walsh
Modified: 2021-11-10 06:40 UTC (History)
3 users (show)

Fixed In Version: 6.2.5.65
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 19:28:45 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:4359 0 None None None 2021-11-09 19:28:48 UTC

Description Andy Walsh 2021-07-15 21:38:55 UTC
Description of problem:
With the new build, two new coverity issues were discovered.

Error: CPPCHECK_WARNING (CWE-456):
vdo-e6ad32e1769484d59fc059163643a991da0799f9/utils/vdo/user/fileLayer.c:250: error[uninitvar]: Uninitialized variable: layer
#  248|     result = fileExists(layer->name, &exists);
#  249|     if (result != UDS_SUCCESS) {
#  250|->     FREE(layer);
#  251|       return result;
#  252|     }

Error: RESOURCE_LEAK (CWE-772):
vdo-e6ad32e1769484d59fc059163643a991da0799f9/utils/vdo/user/vdo2lvm.c:135: open_fn: Returning handle opened by "open". [Note: The source code implementation of the function has been overridden by a user model.]
vdo-e6ad32e1769484d59fc059163643a991da0799f9/utils/vdo/user/vdo2lvm.c:135: var_assign: Assigning: "fd" = handle returned from "open(fileName, 2178)".
vdo-e6ad32e1769484d59fc059163643a991da0799f9/utils/vdo/user/vdo2lvm.c:147: noescape: Resource "fd" is not freed or pointed-to in "fcntl".
vdo-e6ad32e1769484d59fc059163643a991da0799f9/utils/vdo/user/vdo2lvm.c:150: leaked_handle: Handle variable "fd" going out of scope leaks the handle.
#  148|     if (result != VDO_SUCCESS) {
#  149|       warnx("Unable to clear non-blocking flag for %s", fileName);
#  150|->     return result;
#  151|     }
#  152|   

Per Scliff: neither coverity item is of consequence. The first is a false positive that's trivial to silence, and the second is a genuine file descriptor leak (also trivial to fix) in the lvm conversion tool, which will exit shortly after leaking the descriptor, rendering it moot.

Version-Release number of selected component (if applicable):
vdo-6.2.5.62-14.el8

Actual results:
Coverity Warnings

Expected results:
No Coverity Warnings

Comment 4 Filip Suba 2021-08-16 08:00:37 UTC
Verified with vdo-6.2.5.65-14.el8.

Comment 7 errata-xmlrpc 2021-11-09 19:28:45 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 (kmod-kvdo bug fix and enhancement update), 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://access.redhat.com/errata/RHBA-2021:4359


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