Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp997256imm; Wed, 17 Oct 2018 11:34:26 -0700 (PDT) X-Google-Smtp-Source: ACcGV622iYRkZ0boxoIETWsJr24PxA0fQT9T+ryNAGCIti8zPbbf0I4jrYaqdxtZK2IlZwdfxozv X-Received: by 2002:a62:2e02:: with SMTP id u2-v6mr28307225pfu.134.1539801266071; Wed, 17 Oct 2018 11:34:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539801266; cv=none; d=google.com; s=arc-20160816; b=AvOq15DGqhmtwUpU4hyTRCJ7kED4BJRBCKjDjVXn3tNCuW0E67NnUoPdcNYlbT/Fd5 jkbHLKKDZ8AujFeqaFLJSwYxReFtTcCxrbfRqseodXyWivwE+6m+ip4VFKbLiv9cGf+B ysz7B4jfzHGExOZvG3mpxVH5qQkTqMg+h2ZGkeqRzWZXnFetJ9CNDiahJql0+pVc3xPF rXct/ZYkMHFLL+QNI+8IGCQzxgdSkmZgjw0EA/QT6uUb4aBT6P864JdmbEkRlns/iKC3 vg0ceDHVw6uVNXQ+qXUn6TqBwT1KLY0/vxXPw+gEEUJqvfQCjfdRzmhKsSFa7VP61q8M HE7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature; bh=BvS6s5e3Ccz2AZdsJrSkBdOPFXjXmL4OCyqgTGSCQiI=; b=Evh09P96mlafUqidP2fsecS88mNIVCp6WdbvIwnUGtJRh6LiojZNYjHm6aT9BZx3Mb 2px+iLZZOSUY4yKQhifBwV621iT3kYjT9Q0/JUF5Sj+EB5oX0GTKsqKCCLomkEWmQjL5 FWed9/NNlEHgFATYecgPfD9J2ZafqS4K9MyFBKM3BjuMC3tTe6E40fFEhY4NkuhBWnms EBDskXnmyliYEeTZ+xTnzR4hkHlFbsEbgGVkvZm/hHxxM8wEz85QK9lWRHiAqONuxolg KbYPTb7wIkrqDXp0aUfpe2P++lq+IWeILwBODTjnD3u/kayBR7mFXPCRiTbhXRR7w8Yh vyIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=LelkQvFm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m21-v6si18800342pgh.167.2018.10.17.11.34.10; Wed, 17 Oct 2018 11:34:26 -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=@chromium.org header.s=google header.b=LelkQvFm; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728282AbeJRC2z (ORCPT + 99 others); Wed, 17 Oct 2018 22:28:55 -0400 Received: from mail-yw1-f65.google.com ([209.85.161.65]:46391 "EHLO mail-yw1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727014AbeJRC2z (ORCPT ); Wed, 17 Oct 2018 22:28:55 -0400 Received: by mail-yw1-f65.google.com with SMTP id j202-v6so10755698ywa.13 for ; Wed, 17 Oct 2018 11:31:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=BvS6s5e3Ccz2AZdsJrSkBdOPFXjXmL4OCyqgTGSCQiI=; b=LelkQvFmubbB5ts6bfTwC09I1W6k4atqyEhZjcDZMfyukkKw8Z5kNQwn//IMXLTB3C N/KucNrL9JvioClfnU0UJX+q4NuQeGcn5BgpcajgZqcm6EB3SeY/uZQIF+f1HuHzfHV8 09aK9XV5FIyEYNUJaOPHVxau4BtgI/xGCiKyM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=BvS6s5e3Ccz2AZdsJrSkBdOPFXjXmL4OCyqgTGSCQiI=; b=V2dZstWxLx34gezy/1FaCqTIJf2c5gEnikwzi8xhDZjnBkc580X26b2yqsHsrzNJ5o sPfzu5kn5bPQKzfYtfSGxzXhyTifMRcOeqdnBYmWL0sSVxUwpZO7eI7A7EFc7Va1etKJ sKoosaDbUvvCt0BWBt4VusGmQPGAzVMcd2gUnFbdjpvBXbQT5Ow99oYf3xN/CtIf6WLh dfVX++OTbRsVIPL11E3bRulOmr9ua5lmKvxYrGs1X/IL7EVw1VpEgmP5JTMAgh+KAN/6 W+y4IU/aZT76nKFvZMpU1A5DkalxjDsrGcAHXabLvR6xTAbambZyKQuYxWh9pWxUW+g5 9Zhg== X-Gm-Message-State: ABuFfohJ+kOU+lUa+88K5cvaNCvM5BIFVFakVFcvtecioB07JGbWSoWZ Gw4dnpAVEkVaLngEDI6gcaI71lqaM3U= X-Received: by 2002:a81:ae04:: with SMTP id m4-v6mr15676808ywh.474.1539801118292; Wed, 17 Oct 2018 11:31:58 -0700 (PDT) Received: from mail-yb1-f182.google.com (mail-yb1-f182.google.com. [209.85.219.182]) by smtp.gmail.com with ESMTPSA id l138-v6sm5674683ywe.50.2018.10.17.11.31.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Oct 2018 11:31:57 -0700 (PDT) Received: by mail-yb1-f182.google.com with SMTP id o8-v6so10778799ybk.13 for ; Wed, 17 Oct 2018 11:31:56 -0700 (PDT) X-Received: by 2002:a25:3617:: with SMTP id d23-v6mr16325360yba.141.1539801116376; Wed, 17 Oct 2018 11:31:56 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:d116:0:0:0:0:0 with HTTP; Wed, 17 Oct 2018 11:31:55 -0700 (PDT) In-Reply-To: References: <20180906152859.7810-1-tycho@tycho.ws> <20180906152859.7810-4-tycho@tycho.ws> From: Kees Cook Date: Wed, 17 Oct 2018 11:31:55 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v6 3/5] seccomp: add a way to get a listener fd from ptrace To: Michael Tirado Cc: Andy Lutomirski , Tycho Andersen , LKML Content-Type: text/plain; charset="UTF-8" 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 12:25 AM, Michael Tirado wrote: > On Thu, Sep 13, 2018 at 12:02 AM Andy Lutomirski wrote: >> >> Or we could have a >> seccomp() mode that adds a filter but only kicks in after execve(). >> >> --Andy > > Hey that's a pretty good idea, then we could block execve in a seccomp > launcher without post-exec cooperation, or that patch I wrote that used > an execve counter which probably should have been through prctl instead. This has come up a few times before, actually. I had a working prototype, but it needed some more shaking-out. I do like the idea of "activate later" filters, though I'd always felt like using execve as the boundary was a bit limiting. I wonder if we could do some kind of external trigger (i.e. the fd passed to the caller) for when to activate... likely the synchronization is a horror show, though, so if execve is "good enough", I'll probably be happy with that. :) -Kees -- Kees Cook Pixel Security