Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2771185pxb; Sun, 28 Feb 2021 12:45:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJzF66ia3XhoDghsa5qikWq517SeBIhbBFI7hA3WHhTF8TPn/xdjFCUJ85XhA2AY/RX65eK6 X-Received: by 2002:a17:906:4410:: with SMTP id x16mr12997111ejo.446.1614545112025; Sun, 28 Feb 2021 12:45:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614545112; cv=none; d=google.com; s=arc-20160816; b=C8n7TKZafVcKQDh8JtkMeoG/04ciK7Tb3E35O8VnjZq39aQ82+XnmVgZsH3L1gE43j SjXRFRvl7CRoyVgUHWUx2pXjNCZMwRa5wE287UpsCPdqNGVKizwKK361/RUCrQ2VXsCB wlTWtqdiIiLLda0jcFw0YeIYJoGkXlbXJEUkP9ezELm4a0dbHrJnolAuui30minDc/x/ 3hNcC7mb1L5/a4ucxKoOFWez80ONe3CPMYIcLu+93d4l0pnXwkb2pw34azJtN1DfU5rn lJY5FDDM55e4YGneqduufOTuHcYEF3gBTbrC6KcAwvfomHvBGy8Txd6pogoK4mTD+/zD hC4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=RbN8Vol7lgylsFk72HlDzj6wN0OFdYAoc17ZQ77/ySQ=; b=Ph7A1ZAwN4NuCquehUt2FNON/jKsZdMsWh+mtgu3BXuAagCC2eAtiKQ5KPwsJsvU56 uK0XmhSMfOljKrOwbn8U8kElNQhLvZFq30h4gnDdokYXBvQ4K7mjQRTlq5CUFTOH27XA qMD9KlfsOddfcER6z8OKa57Od6bOqmgdGyvJPx47IBXRETTRNJKWXoFxjMHM0Gc039RU GqNPjZFJu+gex4eWRIUK6jvIbe5EtH4tKwBfmnKWpsVJEdKyntckjoTv+sTWglkuIihl 3Elm/QNTQpdcz0wQN16hIKfhtZqITB5XNlm63iEzrcTrj35j/N03/UlT0BMIqVzJyheg QGTQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g20si7077514edq.32.2021.02.28.12.44.50; Sun, 28 Feb 2021 12:45:12 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231451AbhB1S6e (ORCPT + 99 others); Sun, 28 Feb 2021 13:58:34 -0500 Received: from mga07.intel.com ([134.134.136.100]:56460 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231308AbhB1S6c (ORCPT ); Sun, 28 Feb 2021 13:58:32 -0500 IronPort-SDR: MfbyOPu0Yx+WHZxJ4WLyRmdzYnfL6K7KwEyugnR/mBM71IAw1+8FcUcZKvjWmFt2up4BPNMavj XluFkyBADXbA== X-IronPort-AV: E=McAfee;i="6000,8403,9909"; a="250344198" X-IronPort-AV: E=Sophos;i="5.81,213,1610438400"; d="scan'208";a="250344198" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2021 10:56:45 -0800 IronPort-SDR: xO1quA5tSkLr7Wa+aYfB/kLKW49fcvhM94c931ze3tJs/vunXvX5r099AOLt2c3f4sxun4b6LN d6gKQrkop9Iw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,213,1610438400"; d="scan'208";a="368370565" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.54.74.11]) by orsmga006.jf.intel.com with ESMTP; 28 Feb 2021 10:56:45 -0800 Received: by tassilo.localdomain (Postfix, from userid 1000) id 7FB5E3015E2; Sun, 28 Feb 2021 10:56:45 -0800 (PST) From: Andi Kleen To: John Wood Cc: Kees Cook , Jann Horn , Randy Dunlap , Jonathan Corbet , James Morris , Shuah Khan , "Serge E. Hallyn" , Greg Kroah-Hartman , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kselftest@vger.kernel.org, kernel-hardening@lists.openwall.com Subject: Re: [PATCH v5 7/8] Documentation: Add documentation for the Brute LSM References: <20210227153013.6747-1-john.wood@gmx.com> <20210227153013.6747-8-john.wood@gmx.com> Date: Sun, 28 Feb 2021 10:56:45 -0800 In-Reply-To: <20210227153013.6747-8-john.wood@gmx.com> (John Wood's message of "Sat, 27 Feb 2021 16:30:12 +0100") Message-ID: <878s78dnrm.fsf@linux.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org John Wood writes: > + > +To detect a brute force attack it is necessary that the statistics shared by all > +the fork hierarchy processes be updated in every fatal crash and the most > +important data to update is the application crash period. So I haven't really followed the discussion and also not completely read the patches (so apologies if that was already explained or is documented somewhere else). But what I'm missing here is some indication how much memory these statistics can use up and how are they limited. How much is the worst case extra memory consumption? If there is no limit how is DoS prevented? If there is a limit, there likely needs to be a way to throw out information, and so the attack would just shift to forcing the kernel to throw out this information before retrying. e.g. if the data is hold for the parent shell: restart the parent shell all the time. e.g. if the data is hold for the sshd daemon used to log in: Somehow cause sshd to respawn to discard the statistics. Do I miss something here? How is that mitigated? Instead of discussing all the low level tedious details of the statistics it would be better to focus on these "high level" problems here. -Andi