Bug 17876 - Session cache (SHMHT) loses SSL Sessions
Summary: Session cache (SHMHT) loses SSL Sessions
Status: CLOSED WONTFIX
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_ssl (show other bugs)
Version: 2.0.44
Hardware: Other other
: P3 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-11 14:07 UTC by Andreas Leimbacher
Modified: 2006-06-04 19:12 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Leimbacher 2003-03-11 14:07:55 UTC
table_insert_kd() fails if the bucket list contains exactly one entry.

The bug causes this bucket content's to be overwritten, even if
keys do not match.

Offending code from ssl_util_table.c:1171, table_insert_kd()

    last_p = NULL;
    for (entry_p = table_p->ta_buckets[bucket];
         (entry_p != NULL) && (entry_p->te_next_p != last_p);
         last_p = entry_p, entry_p = entry_p->te_next_p) {
        if (entry_p->te_key_size == ksize
            && memcmp(ENTRY_KEY_BUF(entry_p), key_buf, ksize) == 0)
            break;
    }


Possible Fixes:

 - Remove "&& (entry_p->te_next_p != last_p)" from loop condition
 - Replace fragment above by
     "&& (entry_p->te_next_p != last_p || last_p != NULL)"
   AND rewrite code at 1180, more changed may be neccessary
      if (entry_p != NULL) {

PS: I found this bug because I'm using util_table for other purposes
Comment 1 Paul Querna 2004-09-19 20:09:13 UTC
SHMHT has been removed from 2.1.  People should using the normal shm session cache.