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=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 C217CC43465 for ; Fri, 18 Sep 2020 21:35:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8152323730 for ; Fri, 18 Sep 2020 21:35:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Qm/FmtT5" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726396AbgIRVfP (ORCPT ); Fri, 18 Sep 2020 17:35:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726187AbgIRVfP (ORCPT ); Fri, 18 Sep 2020 17:35:15 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 007E6C0613CF for ; Fri, 18 Sep 2020 14:35:14 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id t7so3852441pjd.3 for ; Fri, 18 Sep 2020 14:35:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=OsXO9Vng0uZ8zdPlCQEPUkvMN685QAvewZuZv3id6Vk=; b=Qm/FmtT5Dnyrxf4BCgQpgqbDw7sS/zTtWsVgCPYD/Z8fGcfQ5xbRlGReuouD+SHCd9 dZJK4vmeSlLB9LbvCFrufdgXKAOEcR0Sj+Z6M4GjiMmOMsAqZazgwvwTj14O7ZQgEo98 fFyktTytinUg2oHTwmTXsDyGhM3irl/3gs0Oc= 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:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=OsXO9Vng0uZ8zdPlCQEPUkvMN685QAvewZuZv3id6Vk=; b=l7Aw/Pba+TXMLjHPEx3rAUiVdYzugt2MocUxDABsz3s/5sV0V2Mf2zJ802nbFubyaI +EeoOxXdrsssy6ZUIgjI0ZqVFa4oUERXejhvQG37+6kc1q0Yv1Jr9gSb3JCHnN5/HlXr orhYsJj8qhbzgDP8kBPc2L2vkNMlbjdleqf0JiB2fJjFwPaOohBMYiK3RIaKkpvXLWi/ N2FHL2EN62z68zLODrYrRZJ+HpSN7IdxZO6SzbBRo9R54nlrEcA1cF/kF7ZWkYYAwYls g0ZYtiV6yQmsxG3vwVNfAqlZty0p8sJStwzJ3K3ptTo2oN8+6iTlJVZdb5hzM2+KxdMe ZUWw== X-Gm-Message-State: AOAM533zC9cgsApVMn3h6R/7vedn3JS7fpy7rm9BLpUCl43veW0Zb3XC 1hzYBD/Whj+sjqvwKNWDnYOTeg== X-Google-Smtp-Source: ABdhPJyK4NrndRd3u8+tWx5b+nRCti5n/xaxbJJsCKhy+21AIJjWUWUQo+BNLBjVu3tDwrR5itradw== X-Received: by 2002:a17:90a:156:: with SMTP id z22mr14965929pje.140.1600464914535; Fri, 18 Sep 2020 14:35:14 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id f19sm4097785pfj.25.2020.09.18.14.35.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Sep 2020 14:35:13 -0700 (PDT) Date: Fri, 18 Sep 2020 14:35:12 -0700 From: Kees Cook To: John Wood Cc: kernel-hardening@lists.openwall.com, Jann Horn , 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, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-security-module@vger.kernel.org Subject: Re: [RFC PATCH 6/6] security/fbfam: Mitigate a fork brute force attack Message-ID: <202009181433.EAF237C36@keescook> References: <20200910202107.3799376-1-keescook@chromium.org> <20200910202107.3799376-7-keescook@chromium.org> <202009101649.2A0BF95@keescook> <20200918152116.GB3229@ubuntu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200918152116.GB3229@ubuntu> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 18, 2020 at 06:02:16PM +0200, John Wood wrote: > On Thu, Sep 10, 2020 at 04:56:19PM -0700, Kees Cook wrote: > > On Thu, Sep 10, 2020 at 01:21:07PM -0700, Kees Cook wrote: > > > + pr_warn("fbfam: Offending process with PID %d killed\n", > > > + p->pid); > > > > I'd make this ratelimited (along with Jann's suggestions). > > Sorry, but I don't understand what you mean with "make this ratelimited". > A clarification would be greatly appreciated. Ah! Yes, sorry for not being more clear. There are ratelimit helpers for the pr_*() family of functions, e.g.: pr_warn_ratelimited("brute: Offending process with PID... -- Kees Cook