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=-11.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL 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 A6D0EC43461 for ; Thu, 10 Sep 2020 21:23:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5170B221E2 for ; Thu, 10 Sep 2020 21:23:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Pmbtzx/w" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728199AbgIJVXN (ORCPT ); Thu, 10 Sep 2020 17:23:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728089AbgIJVW1 (ORCPT ); Thu, 10 Sep 2020 17:22:27 -0400 Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A21C8C061756 for ; Thu, 10 Sep 2020 14:22:26 -0700 (PDT) Received: by mail-ej1-x643.google.com with SMTP id u21so10861798eja.2 for ; Thu, 10 Sep 2020 14:22:26 -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=N10c9+tEMvd+V1v5/kjFg7uIplbi+YryLR/t+QNnqsU=; b=Pmbtzx/w5PJRKpuyzWZgUthB5SqsFujhymQl5gJo8f6W3hvApNoms7SWH1Ie3t+Xhv G4BzucZpRgNaCDRkBPiUSWCjEuLpi8agAsdGI/QBUu92rYGZ8Pp3MkAt2a24+m/S5x3B 6epqPgVItTvZ5dHCiaBsFReRRMDht3h8fKCaRGh1IkHnw2lateEx0y9mDjHKtpX8Y8Nz pj8E/O7vvbiRPAFHA3pzg1fCXA5Q5JExBVpXPTHZUF0gtsfus/hcwcxmf9RfgHDwtSxq 1bx0ofN7Nm21fcXiPRlbKh/d5ruR2ePp3ji5Py5uWlztcfvuDu+7GtC29bjR7vEOzNWS NI6g== 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=N10c9+tEMvd+V1v5/kjFg7uIplbi+YryLR/t+QNnqsU=; b=TQnYljPGrcYyxKGu/sNhIjOu2lfA7WvqbaTCRF9MRWH2ndNlVhlUyzivt36v593tzu z9dOsHopgVnaiEQC/jaMXV0uRlGdkOiK8uCyf+lFNHkKLUZ8PHu9qAVaWWELoeDjZuhA a0c4DDCqy0YRzop/h2jg3m98tZ3X+5GCHd35vEsXcPtZAPF5KCCyhfmo4o1lWP5P+t+M RrdUgH5nXzdm85/ZMtAgN58bKwvtDU0Lj9zeW2NllT4mmAQpK+9rzylYMxHkDtczcze0 byArGRFxykQTfP4wbtphri2LskOBC0z2SdmE07i6NzimzHu5+zPGfKUYptQ0SHMAixTM XkHA== X-Gm-Message-State: AOAM533XddVLWeeCmodypvZ0lumIGmAVDjbvT3bYyAH15+vofbMy+Wg2 UknF5zsA0VQaAbPY18WjCtLX9bXQLRsDGtbxpz37lA== X-Google-Smtp-Source: ABdhPJz1ZXFqvRU0UEmWsJMjbaIMk2L+dkrdUn+tEviQSYc6CnuQg/EudEOu/jzT2CS0AbLrfEZiZReKFnSsXFJuWYE= X-Received: by 2002:a17:906:4088:: with SMTP id u8mr11408126ejj.184.1599772945031; Thu, 10 Sep 2020 14:22:25 -0700 (PDT) MIME-Version: 1.0 References: <20200910202107.3799376-1-keescook@chromium.org> <20200910202107.3799376-2-keescook@chromium.org> In-Reply-To: <20200910202107.3799376-2-keescook@chromium.org> From: Jann Horn Date: Thu, 10 Sep 2020 23:21:58 +0200 Message-ID: Subject: Re: [RFC PATCH 1/6] security/fbfam: Add a Kconfig to enable the fbfam feature To: Kees Cook , John Wood Cc: Kernel Hardening , Matthew Wilcox , Jonathan Corbet , Alexander Viro , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Luis Chamberlain , Iurii Zaikin , James Morris , "Serge E. Hallyn" , linux-doc@vger.kernel.org, kernel list , linux-fsdevel , linux-security-module Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 10, 2020 at 10:21 PM Kees Cook wrote: > From: John Wood > > Add a menu entry under "Security options" to enable the "Fork brute > force attack mitigation" feature. [...] > +config FBFAM Please give this a more descriptive name than FBFAM. Some name where, if a random kernel developer sees an "#ifdef" with that name in some random piece of kernel code, they immediately have a rough idea for what kind of feature this is. Perhaps something like THROTTLE_FORK_CRASHES. Or something else that is equally descriptive. > + bool "Fork brute force attack mitigation" > + default n "default n" is superfluous and should AFAIK be omitted. > + help > + This is a user defense that detects any fork brute force attack > + based on the application's crashing rate. When this measure is > + triggered the fork system call is blocked. This help text claims that the mitigation will block fork(), but patch 6/6 actually kills the process hierarchy. 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=-11.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL 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 C3336C43461 for ; Thu, 10 Sep 2020 21:22:44 +0000 (UTC) Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.kernel.org (Postfix) with SMTP id AF411221E2 for ; Thu, 10 Sep 2020 21:22:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Pmbtzx/w" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AF411221E2 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernel-hardening-return-19869-kernel-hardening=archiver.kernel.org@lists.openwall.com Received: (qmail 13810 invoked by uid 550); 10 Sep 2020 21:22:37 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Received: (qmail 13787 invoked from network); 10 Sep 2020 21:22:36 -0000 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=N10c9+tEMvd+V1v5/kjFg7uIplbi+YryLR/t+QNnqsU=; b=Pmbtzx/w5PJRKpuyzWZgUthB5SqsFujhymQl5gJo8f6W3hvApNoms7SWH1Ie3t+Xhv G4BzucZpRgNaCDRkBPiUSWCjEuLpi8agAsdGI/QBUu92rYGZ8Pp3MkAt2a24+m/S5x3B 6epqPgVItTvZ5dHCiaBsFReRRMDht3h8fKCaRGh1IkHnw2lateEx0y9mDjHKtpX8Y8Nz pj8E/O7vvbiRPAFHA3pzg1fCXA5Q5JExBVpXPTHZUF0gtsfus/hcwcxmf9RfgHDwtSxq 1bx0ofN7Nm21fcXiPRlbKh/d5ruR2ePp3ji5Py5uWlztcfvuDu+7GtC29bjR7vEOzNWS NI6g== 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=N10c9+tEMvd+V1v5/kjFg7uIplbi+YryLR/t+QNnqsU=; b=opw4LpolRW07/w/joCnNmKkoawdYUOnRkBlTAb7i10dJ0uEiUkfq3bfWZCxB5BFmDG /vSRFXwY4UH6aVZATJN+ZN47CIG4CLSX2yrQF7gJoKm1FbElOVSlxC98rLLRSXfDeWu2 AIKNjhhhZRvRParR6z/ZDgAsvY3wqQ+OZYH4jHvZpT5ncl28qmwp0mNptMyi87yUwcmP xSyKVcRPRu4AJfTJ6TfKHRL8CMDKrvnXKxHZz8eMhhldI0TS2xoo8a+ZES6zLtTL438F yIxFEzSfcctozRZS6Yg+G176I8dkEWi/vrQn6wG56zGkAUKkdOqnykwuX2aWaUG4/RKo NWig== X-Gm-Message-State: AOAM530cVC6Ref4FHLOphUx0Tzay5UsJVzc+cynWe8G3NibvgfPVq7jL Mm9t78T66bNC6MUef/T8sdpceuEYOegOS7JGW9bE7w== X-Google-Smtp-Source: ABdhPJz1ZXFqvRU0UEmWsJMjbaIMk2L+dkrdUn+tEviQSYc6CnuQg/EudEOu/jzT2CS0AbLrfEZiZReKFnSsXFJuWYE= X-Received: by 2002:a17:906:4088:: with SMTP id u8mr11408126ejj.184.1599772945031; Thu, 10 Sep 2020 14:22:25 -0700 (PDT) MIME-Version: 1.0 References: <20200910202107.3799376-1-keescook@chromium.org> <20200910202107.3799376-2-keescook@chromium.org> In-Reply-To: <20200910202107.3799376-2-keescook@chromium.org> From: Jann Horn Date: Thu, 10 Sep 2020 23:21:58 +0200 Message-ID: Subject: Re: [RFC PATCH 1/6] security/fbfam: Add a Kconfig to enable the fbfam feature To: Kees Cook , John Wood Cc: Kernel Hardening , Matthew Wilcox , Jonathan Corbet , Alexander Viro , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Luis Chamberlain , Iurii Zaikin , James Morris , "Serge E. Hallyn" , linux-doc@vger.kernel.org, kernel list , linux-fsdevel , linux-security-module Content-Type: text/plain; charset="UTF-8" On Thu, Sep 10, 2020 at 10:21 PM Kees Cook wrote: > From: John Wood > > Add a menu entry under "Security options" to enable the "Fork brute > force attack mitigation" feature. [...] > +config FBFAM Please give this a more descriptive name than FBFAM. Some name where, if a random kernel developer sees an "#ifdef" with that name in some random piece of kernel code, they immediately have a rough idea for what kind of feature this is. Perhaps something like THROTTLE_FORK_CRASHES. Or something else that is equally descriptive. > + bool "Fork brute force attack mitigation" > + default n "default n" is superfluous and should AFAIK be omitted. > + help > + This is a user defense that detects any fork brute force attack > + based on the application's crashing rate. When this measure is > + triggered the fork system call is blocked. This help text claims that the mitigation will block fork(), but patch 6/6 actually kills the process hierarchy.