Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1139882

Summary: coverity defects found in 1.3.3.x
Product: Red Hat Enterprise Linux 7 Reporter: Noriko Hosoi <nhosoi>
Component: 389-ds-baseAssignee: Noriko Hosoi <nhosoi>
Status: CLOSED ERRATA QA Contact: Viktor Ashirov <vashirov>
Severity: unspecified Docs Contact:
Priority: low    
Version: 7.1CC: amsharma, nhosoi, nkinder, rmeggins
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.3.3.1-10.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 09:36:46 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:

Description Noriko Hosoi 2014-09-09 21:52:51 UTC
Description of problem:

Ticket #47890 - minor memory leaks in utilities
3. Defect type: CLANG_WARNING ¶
1. 389-ds-base-1.2.11.15/ldap/servers/slapd/tools/rsearch/nametable.c:161:5:warning – Potential leak of memory pointed to by 's'
# PR_Close(fd);
# ^~~~~~~~

4. Defect type: CLANG_WARNING
1. 389-ds-base-1.2.11.15/ldap/servers/slapd/tools/migratecred.c:164:8:warning – Potential leak of memory pointed to by 'prefixCred'
# if ( !oldpath || !newpath || !cred )
# ^~~~~~~

Ticket #47892 - coverity defects found in 1.3.3.1
Defect type: FORWARD_NULL

    9. 389-ds-base-1.3.3.1/ldap/servers/plugins/memberof/memberof.c:2079:var_compare_op – Comparing "group_norm_vals" to null implies that "group_norm_vals" might be null.
    11. 389-ds-base-1.3.3.1/ldap/servers/plugins/memberof/memberof.c:2099:var_deref_model – Passing null pointer "group_norm_vals" to function "slapi_valueset_add_value_ext(Slapi_ValueSet *, Slapi_Value const *, unsigned long)", which dereferences it.
    12. 389-ds-base-1.3.3.1/ldap/servers/slapd/valueset.c:896:2:deref_parm_in_call – Function "slapi_valueset_add_attr_valuearray_ext(Slapi_Attr const *, Slapi_ValueSet *, Slapi_Value **, int, unsigned long, int *)" dereferences "vs".
    15. 389-ds-base-1.3.3.1/ldap/servers/slapd/valueset.c:1075:2:deref_parm – Directly dereferencing parameter "vs".

Defect type: COMPILER_WARNING

    2. 389-ds-base-1.3.3.1/lib/libaccess/aclcache.cpp:136:60:warning – deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    2. 389-ds-base-1.3.3.1/lib/base/pool.cpp:411:79:warning – deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    2. 389-ds-base-1.3.3.1/lib/base/pool.cpp:389:77:warning – deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    1. 389-ds-base-1.3.3.1/lib/base/pool.cpp:283:77:warning – deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    2. 389-ds-base-1.3.3.1/lib/base/pool.cpp:262:77:warning – deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    2. 389-ds-base-1.3.3.1/lib/base/pool.cpp:181:82:warning – deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    2. 389-ds-base-1.3.3.1/ldap/servers/slapd/back-ldbm/ldif2ldbm.c:2198:78:warning – 'j' may be used uninitialized in this function [-Wmaybe-uninitialized]

    2. 389-ds-base-1.3.3.1/ldap/servers/plugins/acl/aclparse.c:538:28:warning – 'is_target_to' may be used uninitialized in this function [-Wmaybe-uninitialized]

    2. 389-ds-base-1.3.3.1/ldap/servers/plugins/acl/acl.c:2493:26:warning – 'attrFilterArray' may be used uninitialized in this function [-Wmaybe-uninitialized]

    Defect type: CLANG_WARNING

    1. 389-ds-base-1.3.3.1/ldap/servers/slapd/tools/rsearch/nametable.c:161:5:warning – Potential leak of memory pointed to by 's'
    # PR_Close(fd);
    # ^~~~~~~~

    1. 389-ds-base-1.3.3.1/ldap/servers/slapd/tools/migratecred.c:204:30:warning – Potential leak of memory pointed to by 'pluginpath'
    # libpath[sizeof(libpath)-1] = 0;
    # ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~

    1. 389-ds-base-1.3.3.1/ldap/servers/slapd/tools/migratecred.c:164:8:warning – Potential leak of memory pointed to by 'prefixCred'
    # if ( !oldpath || !newpath || !cred )
    # ^~~~~~~

    1. 389-ds-base-1.3.3.1/ldap/servers/slapd/tools/ldif.c:185:3:warning – Potential leak of memory pointed to by 'buf'
    # free( buf );
    # ^~~~

    1. 389-ds-base-1.3.3.1/ldap/servers/slapd/tools/ldif.c:145:8:warning – Potential leak of memory pointed to by 'val'
    # perror( "ldif_type_and_value" );
    # ^~~~~~

Comment 4 Amita Sharma 2015-01-07 07:54:14 UTC
Thanks Noriko, marking as VERIFIED.

Comment 6 errata-xmlrpc 2015-03-05 09:36:46 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/RHSA-2015-0416.html