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 911167 - tkey-gssapi-credential option in /etc/named.conf creates a memory leak
Summary: tkey-gssapi-credential option in /etc/named.conf creates a memory leak
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: bind
Version: 6.4
Hardware: All
OS: Linux
urgent
high
Target Milestone: rc
: ---
Assignee: Tomáš Hozza
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 996955
TreeView+ depends on / blocked
 
Reported: 2013-02-14 14:25 UTC by Petr Spacek
Modified: 2018-12-02 16:41 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
* Due to a missing gss_release_name() call, the BIND DNS server leaked memory when the "tkey-gssapi-credential" option was used in the BIND configuration. This update properly frees all memory in case the "tkey-gssapi-credential" is used, and BIND no longer leaks memory when GSSAPI credentials are used internally by the server for authentication.
Clone Of:
Environment:
Last Closed: 2013-11-14 10:39:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Proposed patch (2.45 KB, patch)
2013-05-24 15:24 UTC, Tomáš Hozza
no flags Details | Diff

Description Petr Spacek 2013-02-14 14:25:00 UTC
Description of problem:
Valgrind reports memory leak if "tkey-gssapi-credential" is used in /etc/named.conf.

Version-Release number of selected component (if applicable):
bind-9.8.2-0.17.rc1.el6.x86_64

How reproducible:
100 %

Steps to Reproduce:
1. Configure tkey-gssapi-credential (e.g. default IPA install with integrated DNS)

2. Run named under valgrind
E.g.:
$ export KRB5_KTNAME=/etc/named.keytab
$ valgrind --leak-check=full named -g -u named

3. Let named to start and then terminate it with CTRL+C or rndc stop


Actual results:
==10844== 63 (16 direct, 47 indirect) bytes in 1 blocks are definitely lost in loss record 14 of 15
==10844==    at 0x4C2677B: calloc (vg_replace_malloc.c:593)
==10844==    by 0x580F2FB: generic_gss_copy_oid_set (gssapi_alloc.h:43)
==10844==    by 0x58129D3: gss_acquire_cred (g_acquire_cred.c:195)
==10844==    by 0x518619D: dst_gssapi_acquirecred (gssapictx.c:306)
==10844==    by 0x155DC2: ns_tkeyctx_fromconfig (tkeyconf.c:114)
==10844==    by 0x14FA18: load_configuration (server.c:4963)
==10844==    by 0x150BB4: run_server (server.c:5381)
==10844==    by 0x60172F7: run (task.c:1012)
==10844==    by 0x6650850: start_thread (pthread_create.c:301)
==10844==    by 0x713A90C: clone (clone.S:115)
==10844== 
==10844== 94 (40 direct, 54 indirect) bytes in 1 blocks are definitely lost in loss record 15 of 15
==10844==    at 0x4C279EE: malloc (vg_replace_malloc.c:270)
==10844==    by 0x5817244: gss_import_name (g_imp_name.c:110)
==10844==    by 0x5186132: dst_gssapi_acquirecred (gssapictx.c:279)
==10844==    by 0x155DC2: ns_tkeyctx_fromconfig (tkeyconf.c:114)
==10844==    by 0x14FA18: load_configuration (server.c:4963)
==10844==    by 0x150BB4: run_server (server.c:5381)
==10844==    by 0x60172F7: run (task.c:1012)
==10844==    by 0x6650850: start_thread (pthread_create.c:301)
==10844==    by 0x713A90C: clone (clone.S:115)



Expected results:
No leaks are present :-)


Additional info:
(I guess!) gss_release_name() call is missing somewhere.

http://www.unix.com/man-page/all/3gss/gss_import_name/

Comment 2 RHEL Program Management 2013-02-20 06:50:03 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 5 Tomáš Hozza 2013-05-24 15:24:31 UTC
Created attachment 752729 [details]
Proposed patch


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