Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2686130pxj; Sun, 23 May 2021 07:46:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzehGBOXxisZZUGzFFVSjfoZKM0jHPbWxJ+Lo/m48L6DZL62tn2e7hOzCiyGqmmVcP2q32p X-Received: by 2002:a17:906:90c9:: with SMTP id v9mr18717323ejw.102.1621781180731; Sun, 23 May 2021 07:46:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621781180; cv=none; d=google.com; s=arc-20160816; b=aar2tMFQAz8nudSWGKPCHWtMxVR0udXTkeH4KpfTZhQ6yaPlfCAzNBVTHEYv+f6U7E qUO0ByGwBAm/syfMESP8+7cqZh8ahM6BLGlyjvF6OLqqc8CRZNXVKY0hsBCT2L1Nb47T DpGEj2T6h+X5fxybyNVejFHjyGzbd0xrzfgSjlLZr5uKBkFM3/FWB42+Fj2wREr7FSnT MtVgAJ4h+YrZ0kWtlb25+pMV0Fee9eOxPjodDtAAlJ/HZyXfRpggRpxCJCqlMMQyXU0j pgs+Bc5Vw6lBQGdInqECk94i5/RlQWCh5UU8DAEn56gTH2PO22TV763wtrHDlGDYO9Ik v0Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=/ECotoPfscJZOFkxIca6nUnxOokoDisaPusUA4ZaHLU=; b=DK2w4KMdmYcVz3s02gwuuu31RZ1J6ddsGBPpSLXKtS1O6o29eVBBFovaDsYWvkCPJ+ Gp5coldEaXYRTgq4F+GkPDdmfWzNxADNUo0oyTifA5SVfAR68cVbvj+8kd6xzIoBqOU6 leexZd+D/UjBbg9sAHysiJGi9pbZDkuHB3j79LjDbwxobTD/ApNa6ItDA/CTMCyrsAan g12t7uDF5QgCW2jGgydCjLSYYxcbVbzbI678CZ8eqX+VEuxjux0E2mTD/1EIJM9iqqBk 0EkuRHqC13g4GtCsPOMLYr1NK70f+H6vE5uuCKdTv2OwCxMM5JwN9yH6v2vNR+mzyt2T jKMA== 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 m16si9821729edq.371.2021.05.23.07.45.55; Sun, 23 May 2021 07:46:20 -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; 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 S231804AbhEWOop (ORCPT + 99 others); Sun, 23 May 2021 10:44:45 -0400 Received: from mga07.intel.com ([134.134.136.100]:13160 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231769AbhEWOoo (ORCPT ); Sun, 23 May 2021 10:44:44 -0400 IronPort-SDR: jdm/FwnGmhZLDcP85XdDkYMrNeuO5BGf7FwDxU63MQVUANEdgn1b+ai82sT0zRCPJDw7fOUc1j L8BphR2hkIHw== X-IronPort-AV: E=McAfee;i="6200,9189,9993"; a="265682215" X-IronPort-AV: E=Sophos;i="5.82,319,1613462400"; d="scan'208";a="265682215" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2021 07:43:17 -0700 IronPort-SDR: bfbTjY++YiuW1i/hCo9WvS45EoK6nkaGMtHPqopj5Sn8M4xVAdmJRzzA8WZN2lrgwLabxiTnlf q4zxKzbNOtFg== X-IronPort-AV: E=Sophos;i="5.82,319,1613462400"; d="scan'208";a="613834401" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.252.135.25]) ([10.252.135.25]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2021 07:43:17 -0700 Subject: Re: [PATCH v7 0/7] Fork brute force attack mitigation To: John Wood Cc: Kees Cook , Jann Horn , Jonathan Corbet , James Morris , "Serge E. Hallyn" , Shuah Khan , valdis.kletnieks@vt.edu, Greg Kroah-Hartman , Randy Dunlap , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-hardening@vger.kernel.org, kernel-hardening@lists.openwall.com References: <20210521172414.69456-1-john.wood@gmx.com> <19903478-52e0-3829-0515-3e17669108f7@linux.intel.com> <20210523073124.GA3762@ubuntu> From: Andi Kleen Message-ID: <3d4ddd55-4f42-3ef7-dd68-a9f2bc33ba4b@linux.intel.com> Date: Sun, 23 May 2021 07:43:16 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: <20210523073124.GA3762@ubuntu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/23/2021 12:31 AM, John Wood wrote: > Hi, > > On Fri, May 21, 2021 at 11:02:14AM -0700, Andi Kleen wrote: >>> Moreover, I think this solves another problem pointed out by Andi Kleen >>> during the v5 review [2] related to the possibility that a supervisor >>> respawns processes killed by the Brute LSM. He suggested adding some way so >>> a supervisor can know that a process has been killed by Brute and then >>> decide to respawn or not. So, now, the supervisor can read the brute xattr >>> of one executable and know if it is blocked by Brute and why (using the >>> statistical data). >> It looks better now, Thank. >> >> One potential problem is that the supervisor might see the executable >> directly, but run it through some wrapper. In fact I suspect that will be >> fairly common with complex daemons. So it couldn't directly look at the >> xattr. Might be useful to also pass this information through the wait* >> chain, so that the supervisor can directly collect it. That would need some >> extension to these system calls. >> > Could something like this help? (not tested) This works even when someone further down the chain died? Assuming it does, for SIGCHLD it seems reasonable. I'm not fully sure how it will interact with cgroup release tracking though, that might need more research (my understanding is that modern supervisors often use cgroups) -Andi