Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73305 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10581 invoked from network); 19 Mar 2014 18:33:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Mar 2014 18:33:53 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.43 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.215.43 mail-la0-f43.google.com Received: from [209.85.215.43] ([209.85.215.43:42229] helo=mail-la0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DA/C0-05195-013E9235 for ; Wed, 19 Mar 2014 13:33:53 -0500 Received: by mail-la0-f43.google.com with SMTP id e16so6249531lan.16 for ; Wed, 19 Mar 2014 11:33:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=4urQyOQSEQfHY0emtQ16t5egnnca2VhFUlSlvIjec6s=; b=G58V+lvY18tUlxPSet05/QHt9oOq6K5aIJKXDv9omJrJ3umT5nEyI2DGg0x9xIRY1F pwXDQdt/abrfubuzSueeUWnmwiEjdLdhyrH9Mx22WYpou+kNS47dzGEiUKzF/P/uPn38 nXfTEDZlMEnXyP1xVV2jluf/FHcGMCwbb6/xfcHPJD4rHmWB2QMiPTiny/hwUJ6v9OtX 7QwAJbp+ggIBURjoOvfYOU+JSm8aGjK2i749ym9V9xXk14sZL5Ou2VkVGrLeT80rgNVZ XgE+GlmKMiaPCWtVPzNMeae8JCj1mL5qF4W3WDfbgSnekO4+M8wWN4jakvmRy8JU+6kF D5fA== X-Received: by 10.152.218.103 with SMTP id pf7mr2657979lac.40.1395254029711; Wed, 19 Mar 2014 11:33:49 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.205.73 with HTTP; Wed, 19 Mar 2014 11:33:09 -0700 (PDT) In-Reply-To: <20140319111131.GB83863@mail> References: <20140319080229.GA83863@mail> <20140319111131.GB83863@mail> Date: Thu, 20 Mar 2014 03:33:09 +0900 X-Google-Sender-Auth: E6JzbmY5abZ5XzTsuVx3_8Emd4E Message-ID: To: Mateusz Kocielski Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a1136c856cfff9804f4f9e4de Subject: Re: [PHP-DEV] [RFC] [Discussion] Secure session_regenerate_id() From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a1136c856cfff9804f4f9e4de Content-Type: text/plain; charset=UTF-8 Hi Meteusz, On Wed, Mar 19, 2014 at 8:11 PM, Mateusz Kocielski wrote: > > > login and operates as user without HTTPS, then it's not our problem. > > > > > > > Secure attribute does not matter if attacker is stripping HTTPS. > > You're right. But if user runs over transparent stripping proxy, then > managing > session by an attacker is easy (attacker replaces set-cookie from server > to victim with own value, and sends proper session on every user request). > User won't have an idea that something is wrong. Simply, running without > https > in insecure environment is asking for trouble and what you prospose won't > help > in this case. > Security measures are mitigation. HTTPS could be useless. It's the same. > I'm having hard time to explain why "detection" is better for security. > > Surveillance camera does not "prevent" crime, but "identify" who did. > > Surveillance cameras are good for security. > > I agree. But we've got more factors here, it's not a simple tool for > detection > of crimes. If we let "old session" live for x secs, what will happen to > changes done to the old session? How do you want to resolve that? We should > find a balance between complexity and security. > > Currently we have poor mitigation. My proposal provides better mitigation. > BTW, almost all security measures are "mitigation". > > Security measure does not have to "remove risk", but mitigates risk like > > HTTPS. > > Do you agree that HTTPS is security measure, right? > > Yes. > > > > > [...] > > > Problem of immediate old session deletion: > > > > > > Make session ID regeneration unreliable. (Unacceptable) > > > [...] > > > > > > I haven't found single issue in > > > bugs.php.net that session_regenerate_id(TRUE) is a problem to any > user. > > > > > > > Of course, there aren't. session_regenerate_id(FALSE) is the default now > and > > random logout by race condition is hard to be noticed by developers. > > You might be right, I just found [1]. Note the shadowhand's post: > > [...] > I think developers should be aware of the fact that HTTP is a stateless > protocol and work around that fact, not try to "fix" it with hacks that > will, > with all due respect, end up causing more issues than they solve. > [...] > I agree with his/her opinion. HTTP is stateless and we cannot force client to synchronize session ID. I'm proposing better/stricter work around than now. http://forum.kohanaframework.org/discussion/1870/race-conditions-in-session-handling/p1 Thank you for the link. Regards. -- Yasuo Ohgaki yohgaki@ohgaki.net --001a1136c856cfff9804f4f9e4de--