Re: [kitten] New Version Notification for draft-kaduk-kitten-gss-loop-02.txt (fwd)

mrex@sap.com (Martin Rex) Sat, 18 January 2014 01:01 UTC

Return-Path: <mrex@sap.com>
X-Original-To: kitten@ietfa.amsl.com
Delivered-To: kitten@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 55B9C1AD66B for <kitten@ietfa.amsl.com>; Fri, 17 Jan 2014 17:01:26 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.552
X-Spam-Level:
X-Spam-Status: No, score=-6.552 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_HI=-5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1RemV2iTEVfU for <kitten@ietfa.amsl.com>; Fri, 17 Jan 2014 17:01:25 -0800 (PST)
Received: from smtpde01.sap-ag.de (smtpde01.sap-ag.de [155.56.68.170]) by ietfa.amsl.com (Postfix) with ESMTP id F38891ACCDF for <kitten@ietf.org>; Fri, 17 Jan 2014 17:01:24 -0800 (PST)
Received: from mail05.wdf.sap.corp by smtpde01.sap-ag.de (26) with ESMTP id s0I11Bw7014188 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 18 Jan 2014 02:01:11 +0100 (MET)
In-Reply-To: <52D99B63.3040005@mit.edu>
To: Greg Hudson <ghudson@MIT.EDU>
Date: Sat, 18 Jan 2014 02:01:11 +0100
X-Mailer: ELM [version 2.4ME+ PL125 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="US-ASCII"
Message-Id: <20140118010111.326F31ABB3@ld9781.wdf.sap.corp>
From: mrex@sap.com
X-SAP: out
Cc: kitten@ietf.org
Subject: Re: [kitten] New Version Notification for draft-kaduk-kitten-gss-loop-02.txt (fwd)
X-BeenThere: kitten@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: mrex@sap.com
List-Id: Common Authentication Technologies - Next Generation <kitten.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/kitten>, <mailto:kitten-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/kitten/>
List-Post: <mailto:kitten@ietf.org>
List-Help: <mailto:kitten-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/kitten>, <mailto:kitten-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 18 Jan 2014 01:01:26 -0000

Greg Hudson wrote:
> 
>> Finally, the C sample code has a comment (in two places, actually):
>> /* It is safe to call gss_release_buffer twice on the same buffer. */
>> This could potentially be misleading, as I believe our conclusion was
>> that 2743/2744 do not explicitly require this to be safe.  However, we
>> believe that it is safe in all known implementations, and that an
>> implementation where it was not safe would be very difficult to use
>> correctly.  Is it reasonable to leave this comment in place under the
>> reasoning that it is describing the assumptions made by the sample code
>> (as opposed to describing the behavior mandated by the specification)?
> 
> I think it's reasonable to retroactively standardize this behavior of
> gss_release_buffer, if it's a property of every implementation we're
> aware of.

I hadn't notice this strange comment about gss_release_buffer() before,
and I'm voilently opposed, please remove that misleading comment.

None of the GSS-API calls makes any kind of promise that calling
it twice would be safe.  Actually, if you look at how the C-Bindings
were designed, just the opposite has to be assumed.

The convention to pass the pointers (and gss_buffer_desc) by reference
to the release function, so that the function could zero out the
references/pointers to resources that were allocated by the library
appears specifically designed to make it less likely that a program
will crash when calling a function twice -- _provided_ that it passes
the _original_ reference to the release function (which can then be zeroed),
rather than a mere copy of it (which could not possibly protect from
being called again with other non-zero copies of the original).


The only thing that a release function can be expected to recognize
and handle safely is being called with an already zero-ed handle
or already-zeroed value pointer in gss_buffer_desc.

-Martin