From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5A22C433B4 for ; Sat, 17 Apr 2021 07:50:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A4C14611CC for ; Sat, 17 Apr 2021 07:50:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229888AbhDQHvO (ORCPT ); Sat, 17 Apr 2021 03:51:14 -0400 Received: from wtarreau.pck.nerim.net ([62.212.114.60]:51808 "EHLO 1wt.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235685AbhDQHvM (ORCPT ); Sat, 17 Apr 2021 03:51:12 -0400 Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 13H7oUhZ014279; Sat, 17 Apr 2021 09:50:30 +0200 Date: Sat, 17 Apr 2021 09:50:30 +0200 From: Willy Tarreau To: Keyu Man Cc: Eric Dumazet , David Ahern , Florian Westphal , davem@davemloft.net, yoshfuji@linux-ipv6.org, dsahern@kernel.org, Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Zhiyun Qian Subject: Re: PROBLEM: DoS Attack on Fragment Cache Message-ID: <20210417075030.GA14265@1wt.eu> References: <02917697-4CE2-4BBE-BF47-31F58BC89025@hxcore.ol> <52098fa9-2feb-08ae-c24f-1e696076c3b9@gmail.com> <20210417072744.GB14109@1wt.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Sat, Apr 17, 2021 at 12:42:39AM -0700, Keyu Man wrote: > How about at least allow the existing queue to finish? Currently a tiny new > fragment would potentially invalid all previous fragments by letting them > timeout without allowing the fragments to come in to finish the assembly. Because this is exactly the principle of how attacks are built: reserve resources claiming that you'll send everything so that others can't make use of the resources that are reserved to you. The best solution precisely is *not* to wait for anyone to finish, hence *not* to reserve valuable resources that are unusuable by others. Willy