Bug 214213

Summary: Corrupted user-name
Product: Red Hat Enterprise Linux 5 Reporter: Joe Orton <jorton>
Component: mod_auth_kerbAssignee: Joe Orton <jorton>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.0Keywords: Regression
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0517 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-07-05 15:36:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joe Orton 2006-11-06 16:26:15 UTC
+++ This bug was initially created as a clone of Bug #214207 +++

Description of problem:

mod_auth_kerb seems to corrupt the username:

| XXXXXX - ensc@XXXXX [06/Nov/2006:16:55:32 +0100] "GET ...
| XXXXXX - \x02 [06/Nov/2006:16:55:34 +0100]

Logfile shows

| ... using cached name , referer: ...
| ... using cached name o_mini.png, ...

like entries.


This seems to be caused by the -cache patch which does:

|  MK_USER = apr_pstrdup(r->pool, output_token.value);
|  ...
|      rv = apr_pool_userdata_set(r->user, NAMEKEY, NULL, r->connection->pool);
| ----
|      if (apr_pool_userdata_get(&data, NAMEKEY, r->connection->pool) == APR_SUCCESS


When having a multi-request connection, the 'r->pool' might be freed
while the 'r->connection->pool' is still alive and returns corrupted
memory.

I suggest to write

|-  MK_USER = apr_pstrdup(r->pool, output_token.value);
|+  MK_USER = apr_pstrdup(r->connection->pool, output_token.value);

which seems to fix the problem for me.


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

mod_auth_kerb-5.1-3

-- Additional comment from jorton on 2006-11-06 11:11 EST --
Good catch, thanks!

Comment 3 RHEL Program Management 2007-05-23 12:46:20 UTC
Since Keyword Regression exists, this is a blocker,
not an exception.  Cleared exception flag.
Set blocker flag."

Comment 4 Daniel Riek 2007-06-06 13:33:11 UTC
Removing the blocker and requesting FasTrack instead.

Comment 9 Red Hat Bugzilla 2007-07-05 15:36:25 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0517.html