Re: [New Issue] CID based attacks

Dmitri Tikhonov <dtikhonov@litespeedtech.com> Tue, 01 December 2020 17:12 UTC

Return-Path: <dtikhonov@litespeedtech.com>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 29F333A13F9 for <quic@ietfa.amsl.com>; Tue, 1 Dec 2020 09:12:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=litespeedtech-com.20150623.gappssmtp.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 YNBtDM5rGH-M for <quic@ietfa.amsl.com>; Tue, 1 Dec 2020 09:12:56 -0800 (PST)
Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) (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 556083A0E26 for <quic@ietf.org>; Tue, 1 Dec 2020 09:12:56 -0800 (PST)
Received: by mail-qk1-x732.google.com with SMTP id d9so1973322qke.8 for <quic@ietf.org>; Tue, 01 Dec 2020 09:12:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=litespeedtech-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=GD/ryqj0Ep6y9EshT2//z2h/7Na5QyjogVDOLUnzVZY=; b=l0c5ZzIjLsdJH4Up42U6ybIhnNdwwDHOWxL8gvl3FBIZM/OAU+KezY+54gJFlhXofY gOdq7HGWhLT0m7p/zHRQ5hQ42apuATo3zC/EP4DKpckGAWKEBgoWXNDu4h+kLUrN4e8G Rgo+zPaFV20n1cKIN+CSvAoTVlfsm7G8f3hLUD8KDJIsOJDIQpO4gTZmI5IzozbLd8Gb Id4m8ReMWhgx8ZsPGkQTjHNcWwWYRFfFDgWsNMxzt2vEW9CRwgfixdsIVUdJ/fB+XSFz rk+WEkYIL6Eg9iKQ/uIv95T7IA7mQO7oMCayf1/P+PdTE0SBlpZopXDQN/p0Ph0WAtyA cl5A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to; bh=GD/ryqj0Ep6y9EshT2//z2h/7Na5QyjogVDOLUnzVZY=; b=geolxQnAjVNV8hCbint6BBopxI6xPoJHaO+p64Kxk/Oa0/028D3bmPJNVPBREwmiMP bWwP6eNxk6X4VEk/s/h+3qxkM86TPhzbHuzCuEo0Gv6wMNoqtJouI67zw4KETQOtmHAk LKGdkG425by9T9gmoas3+7nPxyUmGlUK9nBWec/IpR9/9s7D3aQwVKqQwAh3WbkBy6zV CiTCI5hhj3pFvNhare28lbBCZYCsKw4+DWpKiDV+QYN7AfIlelHTG6TxvnWfNlPwCMRm onij+sxcGgR4yTAuu1QAXHfbmHROD6urdxDjOym6LjP/Riu5LJH+BcghSoPfWaB09LNn yvqg==
X-Gm-Message-State: AOAM531lds6oiLJ/njx6AfK0RrRqP6Vp2ej908/DIO+XGkx8caZKPv4q Nhy/sCeNX/KttkPZSqSYw/U6OBchPstbzw==
X-Google-Smtp-Source: ABdhPJxCtUN2/M6um1u8bQxNdfl21VN4SoPaN4UBfnos2CyHhqnVT/YnHjR78PlIlhc8TA8b6+pRCw==
X-Received: by 2002:a37:77c6:: with SMTP id s189mr3929098qkc.87.1606842774768; Tue, 01 Dec 2020 09:12:54 -0800 (PST)
Received: from okhta (ool-44c1d219.dyn.optonline.net. [68.193.210.25]) by smtp.gmail.com with ESMTPSA id x22sm190810qts.53.2020.12.01.09.12.53 for <quic@ietf.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2020 09:12:53 -0800 (PST)
Date: Tue, 01 Dec 2020 12:12:51 -0500
From: Dmitri Tikhonov <dtikhonov@litespeedtech.com>
To: quic@ietf.org
Subject: Re: [New Issue] CID based attacks
Message-ID: <20201201171251.GC123299@okhta>
Mail-Followup-To: quic@ietf.org
References: <7f6e6106-60d6-8e9d-4566-b5e115099e9b@informatik.hu-berlin.de> <e0e72b88-b9a0-e772-348a-92f23101643b@informatik.hu-berlin.de>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <e0e72b88-b9a0-e772-348a-92f23101643b@informatik.hu-berlin.de>
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/MYabkhBVpRJXwMY-Gpkn5xMd1_4>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 01 Dec 2020 17:12:58 -0000

On Wed, Nov 25, 2020 at 02:29:55PM +0100, Kashyap Thimmaraju wrote:
> I was not part of the mailing list (but I am now :)) when you replied
> so I've had to manually copy your responses. Below I've included the
> person's name and replied to their comments/remarks.
> 
> > Dmitri Tikhonov
> > I ran some experiments myself and I realized that my original guess was
> > incorrect.  lsquic server retires the Initial DCID a short time after
> > handshake succeeds.  When a CID is retired, all incoming packets bearing
> > it are dropped.
> >
> > lsquic keeps CIDs retired for at least 30 seconds and at most forever
> > (old entries are purged opportunistically when new entries are added.)
> 
> Good to know. We did some experiments and it seemed to persist for over a
> day.  However, we did not try to connect with other CIDs so that could
> explain why they remained for so long.

Yes, that's exactly how it happened.  The underlying data structure's FIFO
component drops old entries after some threshold is reached.

> > I looked for guidance in the Transport Draft for how long a CID is to
> > stay retired (both Initial DCID and those retired via the
> > RETIRE_CONNECTION_ID frame), but found none.
> 
> So for lsquic, the problem is about a CID being stuck in the retired state?

Yes: there was no upper limit on the amount of time that a CID was retired.
This has been fixed in lsquic 2.24.4 [1].

Thank you again!

  - Dmitri.
     
1. https://github.com/litespeedtech/lsquic/releases/tag/v2.24.4