should the source not be patched?
how inefficient would collision detection be?
best case it would be a HashSet.contains and the storage for the set
-jason pyeron
On Sun, 29 Dec 2002, Tim Funk wrote:
See this thread for more information:
http://marc.theaimsgroup.com/?l=tomcat-dev&m=104072138429223&w=2
Post by Glenn OlanderYes, it should be rare. We observed it once under heavy system load, but
haven't been
able to reproduce it. For our app however (or any security-sensitive
app), this could have
serious security consequences, so we'd like to ensure it never happens.
Craig, if you're around, I'm guessing the check was removed for
performance reasons?
I verified that there is no check for uniqueness by using my own random
number
generator which always returns the same sequence of bytes.
Any advice on how to enforce uniqueness other than replacing
StandardManager
with a manager of our own?
Note that this issue should be independent of the seeding algorithm.
Regardless of
how the seed is derived, it would still be possible for the random
number generator to produce a session id which matches one which is already
in use, thus effectively giving one user access to another user's session.
- Glenn
Post by Turner, JohnI guess that depends on your definition of "guaranteed". I happened to be
http://w6.metronet.com/~wjm/tomcat/2001/Sep/msg00544.html
According to that (though it is over a year old), Tomcat 4 uses
java.security.SecureRandom to generate session ids. The seeding algorithm
is a combination of things, so I guess its possible that there be identical
session ids, but my guess is it would be unbelievably rare.
John
-----Original Message-----
From: Glenn O
To: Tomcat Users List
Sent: 12/28/02 10:48 PM
Subject: Is session id guaranteed to be unique?
I'm tracking down a problem which only occurs rarely, but has the
symptom that when I attach
data to one session, it appears to mistakenly become attached to another
session. It is almost as if
tomcat is generating two sessions which have the same session id.
I'm looking at the tomcat source for createSession() in
ManagerBase.java, and I notice this code is
}
/*
synchronized (sessions) {
while (sessions.get(sessionId) != null) // Guarantee
uniqueness
sessionId = generateSessionId();
}
*/
session.setId(sessionId);
Does that mean tomcat could occasionally produce duplicate session id's?
--
--
To unsubscribe, e-mail: <mailto:tomcat-user-***@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-***@jakarta.apache.org>
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- -
- Jason Pyeron http://www.pyerotechnics.com -
- Owner & Lead Pyerotechnics Development, Inc. -
- +1 410 808 6646 (c) 500 West University Parkway #1S -
- +1 410 467 2266 (f) Baltimore, Maryland 21210-3253 -
- -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you
have received it in error, purge the message from your system and
notify the sender immediately. Any other use of the email by you
is prohibited.