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 1379005 - gssproxy memory leak (localname) in gp_export_creds_linux in src/gp_export.c
Summary: gssproxy memory leak (localname) in gp_export_creds_linux in src/gp_export.c
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gssproxy
Version: 7.4
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: 7.4
Assignee: Robbie Harwood
QA Contact: Abhijeet Kasurde
URL: https://pagure.io/gssproxy/pull-reque...
Whiteboard:
Depends On:
Blocks: 1298243 1399979
TreeView+ depends on / blocked
 
Reported: 2016-09-23 21:58 UTC by Thomas Gardner
Modified: 2020-09-10 09:48 UTC (History)
7 users (show)

Fixed In Version: gssproxy-0.6.2-4.el7
Doc Type: Bug Fix
Doc Text:
Fixed several memory leaks in gssproxy. (Group 1379005, 1379482, 1379616, 1380490 together as a single line item.)
Clone Of:
Environment:
Last Closed: 2017-08-01 20:55:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2033 0 normal SHIPPED_LIVE gssproxy bug fix update 2017-08-01 18:34:35 UTC

Description Thomas Gardner 2016-09-23 21:58:19 UTC
Description of problem:

localname is a local struct variable which contains a pointer and an integer (containing the size of whatever is in the block pointed to by the pointer).  We end up (through a series of calls) allocating memory for that pointer, but never freeing it before the struct containing the pointer to it just disappears ('cause it's a local function) when the function returns.  Here's the valgrind output:

==24113== 37,104 bytes in 4,638 blocks are definitely lost in loss record 76 of 85
==24113==    at 0x4C29BFD: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==24113==    by 0x65F4F7D: UnknownInlinedFun (gssapi_alloc.h:99)
==24113==    by 0x65F4F7D: gssalloc_strdup (gssapi_alloc.h:120)
==24113==    by 0x65F4F7D: krb5_gss_localname (gssapi_krb5.c:768)
==24113==    by 0x65EE4E5: gss_localname (gssd_pname_to_uid.c:173)
==24113==    by 0x40D043: gp_export_creds_linux (gp_export.c:757)
==24113==    by 0x40D043: gp_export_creds_to_gssx_options (gp_export.c:876)
==24113==    by 0x40DEC7: gp_accept_sec_context (gp_rpc_accept_sec_context.c:165)
==24113==    by 0x40ADC0: gp_rpc_execute (gp_rpc_process.c:343)
==24113==    by 0x40ADC0: gp_rpc_process_call (gp_rpc_process.c:400)
==24113==    by 0x4073CB: gp_handle_query (gp_workers.c:447)
==24113==    by 0x4073CB: gp_worker_main (gp_workers.c:401)
==24113==    by 0x6822DC4: start_thread (pthread_create.c:308)
==24113==    by 0x6B2DCEC: clone (clone.S:113)


Version-Release number of selected component (if applicable):

The customer's version is 0.4.1-8.el7_2, but I just downloaded the latest version from brew, and it sure looks like that version has the same bug.

How reproducible:

Customer can easily reproduce it, but it doesn't matter, I found the bug.

Steps to Reproduce:
1.
2.
3.

Actual results:

Memory leaks.

Expected results:

Memory not to leak.

Additional info:

Comment 7 Abhijeet Kasurde 2017-05-22 14:03:49 UTC
Verified using GSSProxy :: gssproxy-0.7.0-3.el7.x86_64

Marking BZ as verified as sanityonly.

Comment 8 errata-xmlrpc 2017-08-01 20:55:26 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://access.redhat.com/errata/RHBA-2017:2033


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