Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1507891pxk; Fri, 18 Sep 2020 14:39:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLKsx1F6YKfPqCbot1xLyf+cuqWDDI5R8nlFBREfTjdx/Vd8v0GpnhcPDJNOa/OoCUEMvc X-Received: by 2002:a50:a693:: with SMTP id e19mr39892183edc.205.1600465157792; Fri, 18 Sep 2020 14:39:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600465157; cv=none; d=google.com; s=arc-20160816; b=opDvjbEaL/P0WwLDQLPlBqycKgZw6++uPBnxF5Tk0ezaqABKp92QjFOEjGz7Q4V4SE TqceMS6D83SQ0JuFsgvVXRN0HgZWfo9Nfp2rGT7f5UXO7GwaPFzWoLXCDElCSLNI9l8v ffO6ncWocpxJ3rr7iurQPktlUpHrlBaavqQcnCGDdGVsSBJwPrYu8C+gIDUS/KQcUFyv pDUel+6CQMlFN1kvsMFehS5tZRzmaNsz2J6L3FrOhBjtWB9Ze2Bpc87pFjjN87uLgvpT L4nFfsQNxppfz9iU900MhOW/IcuKm+C3925hLDFEuCiU5sXGpaaHGahviZ3Ww95A3iQV TBUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=OsXO9Vng0uZ8zdPlCQEPUkvMN685QAvewZuZv3id6Vk=; b=AjbUMajazl38fsIPSvaWOcI8Op8VJI0HkvkIaxsOCbMb951NU3ZjZBJRHCrSig5WkA PfkGFHAJ/uFA4MuP5405F7YpLcsYguMse8kdoiWUD/H12xGSwPqn0Ypcp81wmwHhjJ39 pycVBO4TsRdSs9+NfaiIRx/vuowuSGvjt3EX8dR5Hh+6nkDV4PC7t4Bs9EXGYtvmCygf 5LaCBaCtKon7iW4/HZxElv8+8bHHnAp35k16PAVXyu00BfrU3ZtOP/wfNtij0LWIZQfs ZyoMsA4WbI6wOcWQSLTE6Z1G9K3jZzReCT4a1Dyl2hrh+MBva3FZOJ6Lgbku8D4TthAB YtGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="Qm/FmtT5"; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s5si3186943edu.65.2020.09.18.14.38.53; Fri, 18 Sep 2020 14:39:17 -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=@chromium.org header.s=google header.b="Qm/FmtT5"; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726393AbgIRVfP (ORCPT + 99 others); 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-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