Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2314766pxb; Mon, 19 Apr 2021 02:44:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznjbvuoIBREsZ49k1mF+O+8hB4UOZk00ORRp9vUT51Z7Uqfi9lkhcEFHUPAZEElLEMaykJ X-Received: by 2002:aa7:9806:0:b029:253:e613:4ada with SMTP id e6-20020aa798060000b0290253e6134adamr18983391pfl.65.1618825476317; Mon, 19 Apr 2021 02:44:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618825476; cv=none; d=google.com; s=arc-20160816; b=Pe9ecYaWyyQJutNwiSxxdKE4CpsYFDKu5VxcL8XYHxFv44CAqzcGTjUJorh+x4lhdM RovXSQc/QDpCcIbHDa2oHn5lChQnuvE18W3qfGKP0zZHW6ZPdqVOoFKeRUnpD+XxbPMf K3oeqo0fZKLmxNllimBZ1h8SP9yn3IakO7aH9jvOwze6ajqLHDRuyvgEUvZ/8+AtdH2c PjgTZYeBvEy4qMjonBgsMw52wMpULa4/fIchflKulznHPeHOJy2t8us94OfEdMA/XD+K Dm9mDr20uNEaZjofBXGQxA4Kke3smB4b8q6hUiEzI6fTTVtuxdDaucAWHkmRkb6UsU2E 2lAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=5hEAKW4iWFa+USstysB5tOBW8HzTKZWfxo7ADRmj7wg=; b=BhOKDQ21ZKL88fY07Yo75UOgG32yqQtlz6MrgABZltVWX/G8WdoAlF1cAyAuULTTam MS79HIGZ86LNVJ5U0moWPSpFzwN4gfrAE3m6b7bFKMaTvgt59Q5YI+O8NJJrNlYVGyod /UtjsAivNlO6A9bFG1p/yLw+TEEs6c+y/KPL3WddrmK13YiRQKC0MKQhcn6mUyMgy/Qz fNytGnSlVJWn1EbDiqVTduWS48ma7AYua0Z8FiRDO/0hMCk9krMR6/rySW5JKKghPkXc ISrOmes3dP5g0NYdlUALQcZ6DwklU8HNz695O2ebZ8zifTJZvBwd+EXOLp4PBlaya1Zj INmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=owVh6mDa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cp14si18066240plb.386.2021.04.19.02.44.23; Mon, 19 Apr 2021 02:44:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=owVh6mDa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237487AbhDSJoA (ORCPT + 99 others); Mon, 19 Apr 2021 05:44:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231940AbhDSJn6 (ORCPT ); Mon, 19 Apr 2021 05:43:58 -0400 Received: from mail-yb1-xb2c.google.com (mail-yb1-xb2c.google.com [IPv6:2607:f8b0:4864:20::b2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 692B6C061760 for ; Mon, 19 Apr 2021 02:43:27 -0700 (PDT) Received: by mail-yb1-xb2c.google.com with SMTP id v72so17275216ybe.11 for ; Mon, 19 Apr 2021 02:43:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5hEAKW4iWFa+USstysB5tOBW8HzTKZWfxo7ADRmj7wg=; b=owVh6mDaIHLJm+OB/qUJsaVBKrp4P2SnV1talcOgO7MAXS27Nj/QhBD0+MLd11xMlZ upZEMWu4Ycj7YgTwk7dEPegp7la99Ka155uH0n72eB3aU/pWEAnlE+aX7Ky17PeNRMm7 IeyVcT+TBRlnzqMuKS0YuiurLomF4s98dB7Y42CdNDEDU82igJ91e8pHiU9jwNwtVk8m 2z7XTMGrXhBK8XhjGt4E2EB/UbYtc/Kmti6JjHd+PlEAre0AkJPK4qxh9imam1X8ecmT G4Q39znlzTdi0RX/gxz1Wikke9/+aJTj6ICLea2HKvB5aVcMTmvW8SWk34QG/+RJGDtl CSTg== 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=5hEAKW4iWFa+USstysB5tOBW8HzTKZWfxo7ADRmj7wg=; b=GjJ+tjmwXo89buv/yILD64jQedQNAJmfTGuXC+LtR3yw/+dDKZ0FYolqFDU91Ia1Lw MuvxL2RCvCb241HF/CPWy/PoYcpqEk9jCV2Y0xBWuOBe/EtYw1kp+3NQ4QgyFtBTGHy1 4rNRfmkfNHMCPu2vTUZZ3zm0huQ/ntbV2PxV5E9WC/goqVSQcE+AoYy1IBOKTbuU5MAF PHmxXww1EO5DIPTQk347ZmufARQB6vjn7wxx5Y9ECQifYjzQi8YpZlIuEXR9+E62J1Gw lnUcHNDW/y6nVetBk0o8+3SoycBDyz5P/KGMzprRtMpo6fh32eQ4I4AvEDDieQXTwzoR /xaA== X-Gm-Message-State: AOAM530vaGIN9/HOYQGPW8wcn2sPIKcbl6eQiQ7txOR/nKmuWqv4dmuR TLxdciiVQSLvGr4HHfP4b6KojplkH+9CGbdeTvCr2w== X-Received: by 2002:a25:4244:: with SMTP id p65mr15973709yba.452.1618825406298; Mon, 19 Apr 2021 02:43:26 -0700 (PDT) MIME-Version: 1.0 References: <02917697-4CE2-4BBE-BF47-31F58BC89025@hxcore.ol> <52098fa9-2feb-08ae-c24f-1e696076c3b9@gmail.com> <20210417072744.GB14109@1wt.eu> <20210417075030.GA14265@1wt.eu> <78d776a9-4299-ff4e-8ca2-096ec5c02d05@bluematt.me> <20210418043933.GB18896@1wt.eu> <9e2966be-d210-edf9-4f3c-5681f0d07c5f@bluematt.me> In-Reply-To: <9e2966be-d210-edf9-4f3c-5681f0d07c5f@bluematt.me> From: Eric Dumazet Date: Mon, 19 Apr 2021 11:43:15 +0200 Message-ID: Subject: Re: PROBLEM: DoS Attack on Fragment Cache To: Matt Corallo Cc: Willy Tarreau , Keyu Man , David Ahern , Florian Westphal , David Miller , Hideaki YOSHIFUJI , David Ahern , Jakub Kicinski , netdev , LKML , Zhiyun Qian Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Apr 18, 2021 at 4:31 PM Matt Corallo wrote: > > Should the default, though, be so low? If someone is still using a old modem they can crank up the sysctl, it does seem > like such things are pretty rare these days :). Its rather trivial to, without any kind of attack, hit 1Mbps of lost > fragments in today's networks, at which point all fragments are dropped. After all, I submitted the patch to "scratch my > own itch" :). Again, even if you increase the values by 1000x, it is trivial for an attacker to use all the memory you allowed. And allowing a significant portion of memory to be eaten like that might cause OOM on hosts where jobs are consuming all physical memory. It is a sysctl, I changed things so that one could really reserve/use 16GB of memory if she/he is desperate about frags. > > Matt > > On 4/18/21 00:39, Willy Tarreau wrote: > > I do agree that we shouldn't keep them that long nowadays, we can't go > > too low without risking to break some slow transmission stacks (SLIP/PPP > > over modems for example).