Re: IPv6 payload length check?

Mark Smith <markzzzsmith@gmail.com> Tue, 04 February 2020 14:13 UTC

Return-Path: <markzzzsmith@gmail.com>
X-Original-To: ipv6@ietfa.amsl.com
Delivered-To: ipv6@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6F4EC12011A for <ipv6@ietfa.amsl.com>; Tue, 4 Feb 2020 06:13:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.497
X-Spam-Level:
X-Spam-Status: No, score=-0.497 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, FROM_LOCAL_NOVOWEL=0.5, HK_RANDOM_ENVFROM=0.001, HK_RANDOM_FROM=0.999, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 tuPrqqllQ_rG for <ipv6@ietfa.amsl.com>; Tue, 4 Feb 2020 06:13:56 -0800 (PST)
Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 650E4120020 for <ipv6@ietf.org>; Tue, 4 Feb 2020 06:13:56 -0800 (PST)
Received: by mail-ot1-x334.google.com with SMTP id j20so8747803otq.3 for <ipv6@ietf.org>; Tue, 04 Feb 2020 06:13:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=03d/suMqqh4wWswn9mSl5RVIjLTjoumHZjV7KCcaKsw=; b=IxxNMS1Ut54EUKUvHmVfg4kIL9nYRupuUviFzf5fiJ9imtmwKjcFIrF6cODg3ZU6P3 4tYq9SrTj+LulsGGzopMt9j9BN2aSLkCeFuH+iNtLvXqkWdjP32+x8GHqCXlwvBMSqgv 7fHZcM+x8QNnuMxkSsaXBK1J5RMTjhnxbi0BX3OtO1bkQTKywO5YJZSpyvGHF0l7ED5a /ytAu2bMta53RPa8YywFdzN2KxqcoczBmOMX3euPgeESerAKEwWplB609XvOXD5TPGEi Fh6hCMwZiVwmYqTSym3wnqArS217cmMzjmvFEg6SGF4T+/nikswKzzWgPy0cE1dEgVwQ yVyQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=03d/suMqqh4wWswn9mSl5RVIjLTjoumHZjV7KCcaKsw=; b=obpuWFX9wvfVWZ/9QoM2o7CRYhsj0kgF+qLkbhy319R0+/3V1O4q7v5nO1Scl8YCji jUCRc0vG6Ue+2iwpMPPN/IRyLYt6rR+MOHMIMogS+AF3CgLvfUOUzkqQ+CRGd28ZI6mm XwVIwgWNCFlnaTggcgk2dQ/cvkS6YHG8zqC3XiIVJrdSQD/E4wNr0QfMnkJyuTrGH2Qo 47cyVuwostdKi0h14NIQp4G3rtRM1IxcHTzdfHVT/Fn9ebSE8Xcr9hOjoY6gx1wSb4tw rSqp8JBC8Y+Vq49mUwi+pCjVElbYmE2UcnooleFZVseWh6H3qZXj4BRty3yUlN2ZFRXN 6FUg==
X-Gm-Message-State: APjAAAWiKVExLRdWtBgUSfSvZsijumnbbSyAxMr7Y0fTmTD7SXigaofu H78rfPg6wenakL0sK5+H4fdOj12EvlgKZs5Khll4uA==
X-Google-Smtp-Source: APXvYqzmpuLPsDteCQMBxiAtYy6/G81DJv4YcQRW8ZVuEtAJ0614i9hrmaX+fd70FnmISgM3AXefrm+Th7pGEsm0YQc=
X-Received: by 2002:a9d:65cb:: with SMTP id z11mr20964935oth.348.1580825635576; Tue, 04 Feb 2020 06:13:55 -0800 (PST)
MIME-Version: 1.0
References: <90342768-7f25-b9dd-eeae-29db6045b40a@intl.att.com> <77f55628-6f9d-d06a-4e38-f84d76e716bb@intl.att.com> <CAMGpriWVN0EGLz5PyeyL5LTo_+A1i+xHCD6kw0E0pCRCcGcY2g@mail.gmail.com> <21c14789-73b8-1347-98bf-9c70c3d31e76@intl.att.com> <CAO42Z2yDrdQBGyk97f3Op7KtRRfXjnYyAV3=qGY4E03+P2L3cw@mail.gmail.com> <2640.1580823909@dooku.sandelman.ca>
In-Reply-To: <2640.1580823909@dooku.sandelman.ca>
From: Mark Smith <markzzzsmith@gmail.com>
Date: Wed, 05 Feb 2020 01:13:43 +1100
Message-ID: <CAO42Z2z-FbQycRehfJivp4_gDiW3dXgLsoA6sKNo5XfYAcRB7Q@mail.gmail.com>
Subject: Re: IPv6 payload length check?
To: Michael Richardson <mcr@sandelman.ca>
Cc: 6man WG <ipv6@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000075df37059dc0a616"
Archived-At: <https://mailarchive.ietf.org/arch/msg/ipv6/UsN8cbFl-htRVUGecRQ-oKm7jgY>
X-BeenThere: ipv6@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "IPv6 Maintenance Working Group \(6man\)" <ipv6.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ipv6>, <mailto:ipv6-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ipv6/>
List-Post: <mailto:ipv6@ietf.org>
List-Help: <mailto:ipv6-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ipv6>, <mailto:ipv6-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 04 Feb 2020 14:13:58 -0000

On Wed, 5 Feb 2020, 00:45 Michael Richardson, <mcr@sandelman.ca> wrote:

>
> Mark Smith <markzzzsmith@gmail.com> wrote:
>     >> Thanks Eric.
>     >>
>     >> In this case the packet is *not* larger than the MTU of the
> outgoing link..
>     >> Rather a packet has been received (or possibly generated locally)
> with an
>     >> IPv6 payload length greater than the link layer frame size.
>     >>
>     >> Probably this packet should not be forwarded.
>     >>
>
>     > It's better to forward it without checking.
>
>     > These packets with this fault are going to be rare. Checking each
> and every
>     > packet for this rare problem at each forwarding hop would impact
> forwarding
>     > performance.
>
>     > The fault with the packet will be detected at the final destination
> and
>     > dealt with there.
>
> Yes, I agree that it will get discarded.  Maybe... Probably?
>

The upper transport layer checksum catches it at the destination because
the transport layer payload has been truncated at the fault point.



> When the hardware sends the packet, will it send it with the correct L2
> frame
> size? (i.e. equal to the L3 packet length)
> If so, what will it put at the end of the packet?
> Will it clear those bytes?


> If it doesn't, then it might send stuff from a previous transmission.
>

Probably. Those bytes cause the transport layer checksum to fail.

That is a potential information leak, which is why you shouldn't trust the
network and you should encrypt at least your transport layer payloads.


> Note that the inverse case, where L3.length < L2.length is also
> interesting,
> because if forwarded according to L2.length, then there is a covert channel
> opportunity.
>

Yes it would be.

Who polices Ethernet padding bytes being all zeros?

Regards,
Mark.


> --
> ]               Never tell me the odds!                 | ipv6 mesh
> networks [
> ]   Michael Richardson, Sandelman Software Works        | network
> architect  [
> ]     mcr@sandelman.ca  http://www.sandelman.ca/        |   ruby on
> rails    [
>
>
>
> --------------------------------------------------------------------
> IETF IPv6 working group mailing list
> ipv6@ietf.org
> Administrative Requests: https://www.ietf.org/mailman/listinfo/ipv6
> --------------------------------------------------------------------
>