Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp1327428ima; Sun, 21 Oct 2018 09:16:19 -0700 (PDT) X-Google-Smtp-Source: ACcGV63oYAZnggDdUNp7yupsnkYxrNizcwEh8ewnhUsfa1nu2uLtgqAdCuHKqLiKDtaL3e/6xI5m X-Received: by 2002:a65:638a:: with SMTP id h10-v6mr39853322pgv.136.1540138578987; Sun, 21 Oct 2018 09:16:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540138578; cv=none; d=google.com; s=arc-20160816; b=twAfpFgDm5cRGgcjlkNGvccOgQrLJrRQtqnrC0Ty+MDrEjLPcc8+PQ/5a4CYZp1m1V kqEn5wAep9OneEnK0fCEH5OextyARPbHKRAabOsLz6OvZ0IFXpl9tztJvYBNNdS+nz6D uxqxY4htTU8G0r8GmC/Vma1nyRyRnHPs8a031kOAjucT57/wLeEcrbL7zhGGO/6IaqMd Qgau6R8oW2Y8+pbR4U9n1hu51v180KLuyp3f2QcxlzK2OWtlSf7l0WHDXXcFi3kFz8I4 dFVwyavLwwTVjECa8X8sB6dH8UonHDBk8Jcp6CIynxfCPSXHtBir/R9N98uTWd0Ar9h4 RTDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=5MSccZOEqnjhNSGPQZpGq+VkRvsflpd/GtKRNqMBv+c=; b=tUiK/sMbXe4zQXz9e7f0/Yy3jvUyOvFs8XR60Lrr+DZef/KRSM5T9dtnFmNByE+YmY t95HlMu19TmoqWLh3Baw0ld11ykP6hwrUEqcN6/51luAfIt7CuuowMn8/6mrAJQu+3Pz 7I0xEQy95nd8+9LCuZsKbYaOActmWdT2UPQjm6s7czhqI2Mcsrz7N3vmFJx3UgHYfhL7 qnjONSA1zN62DMOqF8juz6pMktV2Be1lAvUtvaOkACETzKOyvnmnE5r1w8y04P3LMt4p oP8g6AG8Z3+Ypg1y5vLMaWr16QsE8xAajPmeDcrylCCuX5823T7PIAfHpTVJ4zY8fzvj /RFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tycho-ws.20150623.gappssmtp.com header.s=20150623 header.b=fQWYY3pn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u18-v6si30812579pgl.59.2018.10.21.09.16.01; Sun, 21 Oct 2018 09:16:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@tycho-ws.20150623.gappssmtp.com header.s=20150623 header.b=fQWYY3pn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727819AbeJVAPf (ORCPT + 99 others); Sun, 21 Oct 2018 20:15:35 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:40002 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727408AbeJVAPf (ORCPT ); Sun, 21 Oct 2018 20:15:35 -0400 Received: by mail-wr1-f65.google.com with SMTP id d2-v6so42269239wro.7 for ; Sun, 21 Oct 2018 09:00:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tycho-ws.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=5MSccZOEqnjhNSGPQZpGq+VkRvsflpd/GtKRNqMBv+c=; b=fQWYY3pntG1FgTWwxDLCGWNgpifXxy61XwIDqvyCbdanmpy4dwInjO22FkHxCy/5Vi /EcVZ3XWzyfsikXx1X50zPfnHkSuubnSKjT5dg/hCmp1vap0b9ehDzAHDiDM3xRQUNow S1pp4KAtCsHW8GP/jOxibxsnJmR5/oYo/txZ//ATRbgYrm888g+2+0ccMtXow5kl4RO9 D9I2h62AxNy024Ub5ctryDjbZneSNPrkyd2ggs1VJ+GbxFY7N+Kc61mYxTTMSEsgz9R4 DBJbNUuLr3DSaAN6QBbx1NExZDelzbp5bavRmct56CFKfb8uDg2I/BPdZB8VpubLl2Rg 8hWQ== 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:user-agent; bh=5MSccZOEqnjhNSGPQZpGq+VkRvsflpd/GtKRNqMBv+c=; b=AofKy8Bwip1ewgW888JRFN8kdrl6e47NZWjgwyzKZO2NRMLN8cFaeirZHk3sEKRNBe btHKVxit+0i9Zcbm+5Egujd6CO0lIxmGBK6NTc3zLCDi4dWAgEfsBEmpn5LqN+C2S8mc lPioAIZGPL7djdhBwgnPX9rmJ2pULwHLTJkRCWOS2Tfv4SQgeVuh7KDyoOYKafFDbKxq oUvZQtkamM0xbkpyl8VHsT31Ogte8ALIw+WRdPDYBsEHghbEVuTfd7/DEChR/1KupQ5Q H7K/iM6JR0Vv2brLry/AucAHm4g6l8P6hegR5KqNyMdYvhV5Ty3DyrScQ0xe5Ylp+uLo vbFw== X-Gm-Message-State: AGRZ1gLkkY3D8r3uRHPoZ12meltcTTE5CjzurrOIqHL2VXMh8KE5m/To fVzxuLT78jYmoEhIiZWA9PK43FTR1kq4dw== X-Received: by 2002:adf:df11:: with SMTP id y17-v6mr14237516wrl.58.1540137648041; Sun, 21 Oct 2018 09:00:48 -0700 (PDT) Received: from cisco ([109.144.219.53]) by smtp.gmail.com with ESMTPSA id 90-v6sm43785083wrg.86.2018.10.21.09.00.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 21 Oct 2018 09:00:46 -0700 (PDT) Date: Sun, 21 Oct 2018 17:00:45 +0100 From: Tycho Andersen To: Michael Tirado Cc: LKML , Kees Cook , Andy Lutomirski Subject: Re: [PATCH v6 3/5] seccomp: add a way to get a listener fd from ptrace Message-ID: <20181021160045.GA25202@cisco> References: <20180906152859.7810-1-tycho@tycho.ws> <20180906152859.7810-4-tycho@tycho.ws> <20181017150022.GA7544@cisco> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 17, 2018 at 06:15:47PM +0000, Michael Tirado wrote: > Tycho, Sorry for the duplicate, I forgot to CC the list :( > > On Wed, Oct 17, 2018 at 3:00 PM Tycho Andersen wrote: > > > > > > That's one of the use cases, but there are a large number of others. I > > discuss a few in patch 1: > > https://www.spinics.net/lists/linux-containers/msg33956.html > > > > Thanks this is making more sense to me now. > > I haven't been keeping up with the list and just did a bunch > of reading. It seems that stackable LSM's are making some real > progress now, and I wonder if those patches are merged would > using a stacked security module approach be worth exploring if > it provides the same or greater flexibility, and assuming all > syscalls of interest can be hooked somehow? Sorry, I somehow just noticed that this was a duplicate and the one I replied to was the off-list one. Anyway, no, I don't think that'll work. The LSM code right now can't do anything besides refuse an access, and that's a very specific design constraint of it. In particular, it can't mutate any task state or anything. What we want in this series is basically the equivalent of SECCOMP_RET_TRACE, without having to involve ptrace (for a variety of reasons, mostly that applications want to use ptrace for their own things). So seccomp seems like the most natural fit. Tycho