[tcpm] Handling of malformed options (was: Re: poll for adopting draft-gont-tcp-security)

Fernando Gont <fernando@gont.com.ar> Wed, 01 July 2009 16:38 UTC

Return-Path: <fernando@gont.com.ar>
X-Original-To: tcpm@core3.amsl.com
Delivered-To: tcpm@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id A06F13A682E for <tcpm@core3.amsl.com>; Wed, 1 Jul 2009 09:38:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.767
X-Spam-Level:
X-Spam-Status: No, score=-2.767 tagged_above=-999 required=5 tests=[AWL=0.832, BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wU8s6vjk3doW for <tcpm@core3.amsl.com>; Wed, 1 Jul 2009 09:38:51 -0700 (PDT)
Received: from smtp1.xmundo.net (smtp1.xmundo.net [201.216.232.80]) by core3.amsl.com (Postfix) with ESMTP id 6FB193A67F6 for <tcpm@ietf.org>; Wed, 1 Jul 2009 09:38:50 -0700 (PDT)
Received: from venus.xmundo.net (venus.xmundo.net [201.216.232.56]) by smtp1.xmundo.net (Postfix) with ESMTP id E4F706B661D; Wed, 1 Jul 2009 13:38:19 -0300 (ART)
Received: from [192.168.0.134] (129-130-17-190.fibertel.com.ar [190.17.130.129]) (authenticated bits=0) by venus.xmundo.net (8.14.1/8.14.1) with ESMTP id n61Gc5HY014698; Wed, 1 Jul 2009 13:38:06 -0300
Message-ID: <4A4B90F5.5060300@gont.com.ar>
Date: Wed, 01 Jul 2009 13:38:13 -0300
From: Fernando Gont <fernando@gont.com.ar>
User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
MIME-Version: 1.0
To: Joe Touch <touch@ISI.EDU>
References: <C304DB494AC0C04C87C6A6E2FF5603DB2217B28763@NDJSSCC01.ndc.nasa.gov> <fc0ff13d0906241711k44de4f77u8ec825e1ea151a1e@mail.gmail.com> <4A4317ED.1040905@gont.com.ar> <4A48F60A.7020602@gmail.com> <4A49CA1A.6060702@gont.com.ar> <4A4A2A73.0@isi.edu> <4A4A5019.1080004@gont.com.ar> <4A4A5D02.2000402@isi.edu>
In-Reply-To: <4A4A5D02.2000402@isi.edu>
X-Enigmail-Version: 0.95.7
OpenPGP: id=D076FFF1
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (venus.xmundo.net [201.216.232.56]); Wed, 01 Jul 2009 13:38:16 -0300 (ART)
Cc: Matt Mathis <mathis@psc.edu>, "tcpm-chairs@tools.ietf.org" <tcpm-chairs@tools.ietf.org>, tcpm Extensions WG <tcpm@ietf.org>, Matt Mathis <matt.mathis@gmail.com>
Subject: [tcpm] Handling of malformed options (was: Re: poll for adopting draft-gont-tcp-security)
X-BeenThere: tcpm@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: TCP Maintenance and Minor Extensions Working Group <tcpm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/tcpm>, <mailto:tcpm-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tcpm>
List-Post: <mailto:tcpm@ietf.org>
List-Help: <mailto:tcpm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tcpm>, <mailto:tcpm-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 01 Jul 2009 16:38:52 -0000

Hello, Joe,

>>>> This suggests that extending SACK while still using the same option type
>>>> is not a good idea, or at least not a backwards-compatible one.
>>> ...
>>>
>>> It may also suggest a bug.
>> Where's the bug? The spec says the length field is e.g. 2. If you
>> implement the standard, and receive an option with a length field that
>> is different than 2, how are you supposed to process the option? If you
>> don't know how to process it, it seems sensible to ignore the option.
> 
> OK, since this is supposed to be a security doc, can you explain why you
> take a segment with a mis-formed option and ignore it, even when the
> length - the field that tells you where the next option starts - is
> nonsensical?
> 
> Why don't you drop the segment or send a RST?

draft-gont-tcp-security recommends to silently drop the segment, *NOT*
to silently ignore the option.

>From Section 4.4.1 (page 43) of draft-gont-tcp-security-00:

"  The SACK-permitted option is composed by an option-kind octet (which
   must be 4), and an option-length octet which must be 2.  Therefore,
   the following check should be performed on the option:

   option-length == 2

   If the option does not pass this check, the TCP segment carrying the
   option should be silently dropped."


This should be a clear example that this document is not simply turning
"current implementations" into "advice". i.e., the advice provided
sometimes differs from what many implementations are doing (as in this
case).

Thanks,
-- 
Fernando Gont
e-mail: fernando@gont.com.ar || fgont@acm.org
PGP Fingerprint: 7809 84F5 322E 45C7 F1C9 3945 96EE A9EF D076 FFF1