Bug 1205161

Summary: Memleak detected by valgrind in krb5 after LocalAuth plugin API was added
Product: Red Hat Enterprise Linux 6 Reporter: Patrik Kis <pkis>
Component: krb5Assignee: Robbie Harwood <rharwood>
Status: CLOSED ERRATA QA Contact: Patrik Kis <pkis>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.8CC: dpal, jplans, mkosek, nalin, rharwood, salmy
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: krb5-1.10.3-46.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-11 01:00:59 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 Patrik Kis 2015-03-24 11:05:01 UTC
Description of problem:
The fix of bug 1170272 introduced a regression. We've agreed with devel that the issue is no that serious and the fix can be postponed to rhel-6.8.

Version-Release number of selected component (if applicable):
krb5-libs-1.10.3-34.el6

How reproducible:
always

Steps to Reproduce:
[root@rhel60 ~]# rpm -q krb5-libs
krb5-libs-1.10.3-34.el6.x86_64
# kinit alice
Password for alice: 
#
# cat > gss.supp
{
krb5_matchpathcon
Memcheck:Leak
...
fun:matchpathcon
...
}
#
# valgrind --suppressions=gss.supp --leak-check=yes gss-server -once -verbose host
==18821== Memcheck, a memory error detector
==18821== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==18821== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==18821== Command: gss-server -once -verbose host
==18821== 
starting...
Received token (size=620): 
60 82 02 68 06 09 2a 86 48 86 f7 12 01 02 02 01 
... snip ...
3c b3 
Received message: "Test Message Goes Here"
NOOP token
==18821== 
==18821== HEAP SUMMARY:
==18821==     in use at exit: 528 bytes in 11 blocks
==18821==   total heap usage: 4,333 allocs, 4,322 frees, 509,322 bytes allocated
==18821== 
==18821== 440 (56 direct, 384 indirect) bytes in 1 blocks are definitely lost in loss record 6 of 6
==18821==    at 0x4C267BB: calloc (vg_replace_malloc.c:593)
==18821==    by 0x50FB35D: load_localauth_modules (k5-int.h:2797)
==18821==    by 0x50FB5FE: krb5_aname_to_localname (localauth.c:437)
==18821==    by 0x4E506CA: krb5_gss_localname (gssapi_krb5.c:761)
==18821==    by 0x4E4A87A: gss_localname (gssd_pname_to_uid.c:169)
==18821==    by 0x10A59E: sign_server (gss-server.c:894)
==18821==    by 0x10AA3A: main (gss-server.c:640)
==18821== 
==18821== LEAK SUMMARY:
==18821==    definitely lost: 56 bytes in 1 blocks
==18821==    indirectly lost: 384 bytes in 6 blocks
==18821==      possibly lost: 0 bytes in 0 blocks
==18821==    still reachable: 88 bytes in 4 blocks
==18821==         suppressed: 0 bytes in 0 blocks
==18821== Reachable blocks (those to which a pointer was found) are not shown.
==18821== To see them, rerun with: --leak-check=full --show-reachable=yes
==18821== 
==18821== For counts of detected and suppressed errors, rerun with: -v
==18821== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 8 from 6)
#
Actual results:


Expected results:


Additional info:

Comment 7 errata-xmlrpc 2016-05-11 01:00:59 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/RHBA-2016-0945.html