[19016] in Kerberos_V5_Development

home help back first fref pref prev next nref lref last post

Re: About Memory Leak of kinit with pkinit Plugin

daemon@ATHENA.MIT.EDU (Russ Allbery)
Mon Sep 22 12:04:12 2014

From: Russ Allbery <eagle@eyrie.org>
To: Zhou Yang <sherice.911@gmail.com>
In-Reply-To: <CAOn+XxCgwMBNd6pApFO_sk=c8WH7HA+eRNkNrBQXv9fAQMSD6w@mail.gmail.com>
	(Zhou Yang's message of "Mon, 22 Sep 2014 16:17:05 +0800")
Date: Mon, 22 Sep 2014 09:03:55 -0700
Message-ID: <87lhpbd4lw.fsf@hope.eyrie.org>
MIME-Version: 1.0
Cc: krbdev@mit.edu
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: krbdev-bounces@mit.edu

Zhou Yang <sherice.911@gmail.com> writes:

> 2. I also tried to use *valgrind *to locate the problem (both my program
> and standard kinit). And the main report is below:
>         $valgrind kinit *username *(and then type the password)
>                           ...

I use the following suppression file for checking any Kerberos
application, which hides various one-time allocations from MIT or Heimdal
(as well as hiding a few old memory leak bugs, but those were all small,
if I recall correctly, and already fixed in current versions).

This is probably specific to Linux in at least a few respects.

# -*- conf -*-
#
# This is a valgrind suppression file for analysis of test suite results.
#
# Suppress a variety of apparent memory leaks in various Kerberos
# implementations due to one-time instantiation of data, and a few other
# artifacts of the test suite for rra-c-util portability and utility code
# and related software.
#
# The canonical version of this file is maintained in the rra-c-util package,
# which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>.
#
# Written by Russ Allbery <eagle@eyrie.org>
# Copyright 2011, 2012, 2013, 2014
#     The Board of Trustees of the Leland Stanford Junior University
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.

{
   dlopen-dlerror
   Memcheck:Leak
   fun:calloc
   fun:_dlerror_run
}
{
   heimdal-gss-config
   Memcheck:Leak
   fun:*alloc
   ...
   fun:krb5_config_parse_debug
}
{
   heimdal-gss-config-2
   Memcheck:Leak
   fun:*alloc
   fun:_krb5_config_get_entry
}
{
   heimdal-gss-krb5-init
   Memcheck:Leak
   fun:*alloc
   ...
   fun:_gsskrb5_init
}
{
   heimdal-gss-load-mech
   Memcheck:Leak
   fun:*alloc
   ...
   fun:_gss_load_mech
}
{
   heimdal-krb5-init-context-once
   Memcheck:Leak
   fun:*alloc
   ...
   fun:init_context_once
}
{
   heimdal-krb5-reg-plugins-once
   Memcheck:Leak
   fun:*alloc
   ...
   fun:krb5_plugin_register
   fun:reg_def_plugins_once
}
{
   heimdal-krb5-openssl-init
   Memcheck:Leak
   fun:*alloc
   obj:*
   fun:CRYPTO_*alloc
}
{
   mit-gss-ccache
   Memcheck:Leak
   fun:*alloc
   fun:krb5int_setspecific
   fun:kg_set_ccache_name
   fun:gss_krb5int_ccache_name
}
{
   mit-gss-ccache-2
   Memcheck:Leak
   fun:*alloc
   fun:strdup
   fun:kg_set_ccache_name
   fun:gss_krb5int_ccache_name
}
{
   mit-gss-error
   Memcheck:Leak
   fun:*alloc
   ...
   fun:krb5_gss_save_error_string
}
{
   mit-krb5-pkinit-openssl-init
   Memcheck:Leak
   fun:*alloc
   ...
   fun:krb5_init_preauth_context
}
{
   mit-krb5-pkinit-openssl-request
   Memcheck:Leak
   fun:*alloc
   ...
   fun:krb5_preauth_request_context_init
}
{
   mit-krb5-plugin-dirs
   Memcheck:Leak
   fun:calloc
   fun:krb5int_open_plugin_dirs
}
{
   mit-krb5-plugin-dlerror
   Memcheck:Leak
   fun:calloc
   fun:_dlerror_run
   ...
   fun:krb5int_open_plugin
}
{
   mit-krb5-plugin-register
   Memcheck:Leak
   fun:malloc
   fun:strdup
   fun:register_module.isra.1
}

-- 
Russ Allbery (eagle@eyrie.org)              <http://www.eyrie.org/~eagle/>
_______________________________________________
krbdev mailing list             krbdev@mit.edu
https://mailman.mit.edu/mailman/listinfo/krbdev

home help back first fref pref prev next nref lref last post