[hybi] Masking of Control Frames that have a zero length payload.

"Len Holgate" <len.holgate@gmail.com> Wed, 22 June 2011 08:19 UTC

Return-Path: <len.holgate@gmail.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BE79B21F8485 for <hybi@ietfa.amsl.com>; Wed, 22 Jun 2011 01:19:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level:
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7w2jkpAmMF9F for <hybi@ietfa.amsl.com>; Wed, 22 Jun 2011 01:19:29 -0700 (PDT)
Received: from mail-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by ietfa.amsl.com (Postfix) with ESMTP id EF81521F8483 for <hybi@ietf.org>; Wed, 22 Jun 2011 01:19:28 -0700 (PDT)
Received: by fxm15 with SMTP id 15so501099fxm.31 for <hybi@ietf.org>; Wed, 22 Jun 2011 01:19:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:subject:date:message-id:mime-version :content-type:content-transfer-encoding:x-mailer:thread-index :x-mimeole; bh=IbEgWIf9ioE7/YxyI6oaJyvqJ0wjezHDyy1aAkXAZlU=; b=XSazyx4gAAOS7BdYP78ZE/05A4PviL6zpl0NV4lO3BuBENuz28J046GSfQZQRWAhvu /Q3pUEc0OcXHXnjna9Kt0sp40O9LQ2v0ky7NAmIFHFiyrGyzTp15WinXsgJw2KgioUUi 2kToV36ZTrYafoa5Oc5AgeHuHCBsis0eA7yfY=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:mime-version:content-type :content-transfer-encoding:x-mailer:thread-index:x-mimeole; b=MXawsAcN14RDF/3uNNmWMimo22zg4M1z5LZc9onzoGa6OWv3PC1kSeH1HGUnMxcl6C Qx14x9zKztnKBVBbE9KHsVhy+VXQNdG5+5CEg2PoTvJb4tEGGG309MOyylW9wq4w22/U gHRp9VroPKbVisRGG2HE+UnZBOSsNx/eRmMjk=
Received: by 10.223.6.11 with SMTP id 11mr491526fax.100.1308730767991; Wed, 22 Jun 2011 01:19:27 -0700 (PDT)
Received: from Venus (cpc7-glfd6-2-0-cust20.6-2.cable.virginmedia.com [86.27.227.21]) by mx.google.com with ESMTPS id r10sm163413fah.2.2011.06.22.01.19.26 (version=SSLv3 cipher=OTHER); Wed, 22 Jun 2011 01:19:27 -0700 (PDT)
From: "Len Holgate" <len.holgate@gmail.com>
To: <hybi@ietf.org>
Date: Wed, 22 Jun 2011 09:19:24 +0100
Message-ID: <018501cc30b5$1939e460$0a00a8c0@Venus>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
Thread-Index: AcwwtRgNrQapyP4iQXS63kCCaiIeJA==
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3664
Subject: [hybi] Masking of Control Frames that have a zero length payload.
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Jun 2011 08:19:29 -0000

Hi,

I haven't been able to find a previous discussion on this list about this
point, forgive me if it's already been covered.

4.3 Client-to-Server Masking 

States that "The client MUST mask all frames sent to the server."

4.5 Control Frames 

States that "All control frames MUST have a payload length of 125 bytes or
less..."

4.5.1 Close

States that "The Close frame MAY contain a body (the "application data"
portion of the frame)

Which implies to me that control frames with a zero length payload may exist
but if these are sent from client to server then these MUST still be masked,
which results in the inclusion of a masking key which is not used for
anything and simply increases the length of the frame for no reason.

Perhaps the inclusion of the rationale behind client to server masking would
clear this up - including the masking key when no data needs to be masked
makes the control frame unique and unpredictable and perhaps this is the
reason, but at present it's unclear as to why the above is desirable.

Len