Re: [Masque] TTL and infinite QUIC-proxy loops

Alex Chernyakhovsky <achernya@google.com> Wed, 15 November 2023 17:01 UTC

Return-Path: <achernya@google.com>
X-Original-To: masque@ietfa.amsl.com
Delivered-To: masque@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6D797C14CF1C for <masque@ietfa.amsl.com>; Wed, 15 Nov 2023 09:01:33 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -17.606
X-Spam-Level:
X-Spam-Status: No, score=-17.606 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, HTML_MESSAGE=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=google.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id omCgk2sAUgOY for <masque@ietfa.amsl.com>; Wed, 15 Nov 2023 09:01:29 -0800 (PST)
Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9197AC14CEE3 for <masque@ietf.org>; Wed, 15 Nov 2023 09:01:29 -0800 (PST)
Received: by mail-qk1-x72c.google.com with SMTP id af79cd13be357-7789cc5c8ccso93034085a.0 for <masque@ietf.org>; Wed, 15 Nov 2023 09:01:29 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1700067688; x=1700672488; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=iHnD5IiW4XlNmkC2TGGRoQM9PtZwPNkShRSPJ2TJkw8=; b=X++uBCEtqLvPwSrH1mGMu0JMBp4zUISIzD7sNpXKkObQiUUhLgrBzi4H2pO0Ont2AB HDiR5CDGeq5VUQRsaNQVhZ4ddMT5qG5m7yh4dl6qH+8jIDE2I6URPsU32IMz7DBSTN2B QrQYrXXmaXoofGRH5GmT401Jae19L3KbuREjpT8RDwkQc84Dlkjf6OOXvgxbFQhTBP/R G57m7LesMOPo4NIUw2uuZJ0yEv8WmiEAv6vP6QscUTrUgEgKa+IyhOKqlYtN/1JrPd6s bULytFvDTxBSClVcPSk2Kr24HxmkoxuapWvJtuWMCGVkeFFfBQ9eytB94AyuQpjee4wm ILew==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700067688; x=1700672488; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=iHnD5IiW4XlNmkC2TGGRoQM9PtZwPNkShRSPJ2TJkw8=; b=QGT00Yl3mLOPCYNV71FP7j8FtyCTlu6oO6mJ/+SrvxKXoQa176QL5xBEeHCs05HxE+ TC0z8058YiRioig208x5klSn9FMYfbNpG9mtl6E56zP2w0Diczpu2V3QlWinAgqj+D87 SpEvwGyTINVhIy4ovHPkY7rQKx9meGabh7Nm1VT7PVWK0RQmxAqLkPlw/fA5yd+7erCp yGG9h46eOab9FkcSjVNodAseDuGoZSOKVFWP8/G2xUfdPv0tkDkra9iOQ4r565Xv9YmB KeBjOzZVwJbbGIhvn1nUuTYw8mZHMEUXOylqVWVRU5I0q/0t/5oHRa2hijgaPgpAofQd jQgg==
X-Gm-Message-State: AOJu0YwOJZh37G37qSqXx6qeoazPiK80urkdbxUQ1ObcW1u8E0OsalV4 EzenFiqyXIk/qtwCgeP9TQxwQndSome8d/NbaDuubw==
X-Google-Smtp-Source: AGHT+IGy5AcwKjiIPSn3UY7jjIo9NNW7DEaq+6OnMKarWY/eztAsPFrTMMyleS2nC3hnlRAInkSDHSBVInd0HGg2CnM=
X-Received: by 2002:a05:620a:c45:b0:773:fa62:39fe with SMTP id u5-20020a05620a0c4500b00773fa6239femr9087968qki.1.1700067688308; Wed, 15 Nov 2023 09:01:28 -0800 (PST)
MIME-Version: 1.0
References: <CAM4esxRt5nua=ftxaDn4N_L3jQigJpkOH6LCqDrK1h1qwhVHwA@mail.gmail.com>
In-Reply-To: <CAM4esxRt5nua=ftxaDn4N_L3jQigJpkOH6LCqDrK1h1qwhVHwA@mail.gmail.com>
From: Alex Chernyakhovsky <achernya@google.com>
Date: Wed, 15 Nov 2023 12:01:12 -0500
Message-ID: <CAHbWFkTsY8=YoBei2y4dgm1A3CgyNg_EsnrT67yf-3sWkUCZ_w@mail.gmail.com>
To: Martin Duke <martin.h.duke@gmail.com>
Cc: MASQUE <masque@ietf.org>, Ted Hardie <ted.ietf@gmail.com>
Content-Type: multipart/alternative; boundary="000000000000a875fb060a33da53"
Archived-At: <https://mailarchive.ietf.org/arch/msg/masque/FW8ONJyMQsUPVMsr2oH-gJMjqRs>
Subject: Re: [Masque] TTL and infinite QUIC-proxy loops
X-BeenThere: masque@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Multiplexed Application Substrate over QUIC Encryption <masque.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/masque>, <mailto:masque-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/masque/>
List-Post: <mailto:masque@ietf.org>
List-Help: <mailto:masque-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/masque>, <mailto:masque-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 15 Nov 2023 17:01:33 -0000

On Wed, Nov 15, 2023 at 11:54 AM Martin Duke <martin.h.duke@gmail.com>
wrote:

> (Looking forward to not having to say "with no hats" in 4 months).
>
> In my presentation in Prague on infinite quic-proxy loops, I dismissed the
> idea that simply decrementing the TTL was a sufficient mitigation for
> infinite loops caused by a misbehaving client, because 256 hops is still a
> lot. In response, Ted suggested that we could use a lower limit.
>
> Thankfully, we did not try to further design this at the mic.
>
> But, thinking about it some more, Ted's suggestion could mean two things:
>
> (1) Use the IP TTL field: "When receiving a packet from the target, a
> proxy MUST set the TTL on the forwarded packet's IP header to a value lower
> than the TTL value of the incoming IP header. Furthermore, the TTL value
> MUST be no larger than N".
>
> Clearly, for some value of N the mitigation would be sufficient. I have
> not checked if this in some way violates the rules about IP TTL. I also
> wonder if a hard limit is sufficiently permissive for legitimate but long
> paths.
>
> (2) There is some sort of MASQUE field that counts down the number of
> proxy hops. I cannot see how this can work, as (a) these are packets from
> the target, which is not going to add MASQUE-specific stuff; (b) by design,
> proxies do not know if targets are also MASQUE proxies; and (c) by design,
> proxies to do not know if clients are MASQUE proxies.
>
> *****
>
> I do not object to decrementing the IP TTL field by one in forwarded mode,
> though I think that is an insufficient mitigation for this attack. If
> anyone has a better-thought out design to enforce a limit, or thinks that
> 256 hops is just fine, I would appreciate their input.
>
This is what I assumed we were talking about on the previous thread on the
list, and what my suggestion of TTL decrementing was based on.

>
> Martin
> --
> Masque mailing list
> Masque@ietf.org
> https://www.ietf.org/mailman/listinfo/masque
>