Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1454360ybm; Sat, 30 May 2020 09:19:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+hAXYtcSjyqYckKur+vYUjbWlMi22tWXIGfdD8wdLt9dIAoYlFDhzcnffUCmGgU+kIq4a X-Received: by 2002:a17:906:1917:: with SMTP id a23mr6827445eje.181.1590855550265; Sat, 30 May 2020 09:19:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590855550; cv=none; d=google.com; s=arc-20160816; b=QtQWjnL0nrumrT60I9OFbVV9DXzMHiz4g6FmNmjsxZGvo45bh/s3qchlx3Dg0GAg+V W5kkS2aYR2sMNfmjkYHg6pGgyuA3jADi8Ve7ZfHTv4TrAEjeMEbXSKLSmPEoGJZU8NlV 3+NnxzJAhyfbYal8MXIGofvUN3YcB8ZdCR4NQuF3IxC0u2wvmuCXQbHJXcviJRNimJdF rAmJy74AwsOS8iZwM5L478O+n1DrubnR9Up3Bu8owuk9QeN5I5GXllYm7FkLVFBs6Lip d8JMPMiSL2PxQJ6pQ9C9xUU1370mn53D/tap3i7IsF+PjAVUe70t3qvzXXh8x2ltIRn2 jdmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=1mMCBOJ9xlSs04aJtX5nG/zBArlwzRItgMFXRdNse4Q=; b=eO4n1WyK7EkAKcuQafBaFdCeTYCISkMhGrpLQgLVlLK9pjK7m+3NVr76ewSBgbdnC2 S0AYTT51vAGxDXUe99kotByTwoiUVXzo5mt9fdB9ISunOpWODFuqJusQD7qYQd/3vYnZ NlM2kAAh5x4dlQChCD/d38Jv3tPaBOlcabfCr9XhClhAOoQZPG0PN8R1nlDp3u6Bukib TBX9zwEiP7XfDR/hJ9A7uNNoPGze4W8i5LJFpU02P57ngwLgM8fmE9J+yfbnXgAMGZnv B5fzKpgzZ98Z6yLaqWDEJ82vdWnMb2zgRZ6T6mQ+RW/Fy4ky/ctGG7lf5d1RRpwXmswP 2b/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="Ldmbb0t/"; 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 j16si7633046ejy.558.2020.05.30.09.18.47; Sat, 30 May 2020 09:19:10 -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="Ldmbb0t/"; 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 S1729038AbgE3QOy (ORCPT + 99 others); Sat, 30 May 2020 12:14:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728797AbgE3QOx (ORCPT ); Sat, 30 May 2020 12:14:53 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E83AC03E969 for ; Sat, 30 May 2020 09:14:53 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id v24so411656plo.6 for ; Sat, 30 May 2020 09:14:53 -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=1mMCBOJ9xlSs04aJtX5nG/zBArlwzRItgMFXRdNse4Q=; b=Ldmbb0t/hm9FKTfMQcWfFbocbn/wE6YMJBSuHLGLExSNELGaIkXeKC0sMS5xIUJLue FPUt2ivoeJSpEYqXEAwaf239OuUNgs8RqzdTV0PzY4K8St3W3XCXAGh4KTPBzFRAMWJu 2nHXFRpmCV7GliRyzRDdqLgwCTJhjsoaEv4BE= 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=1mMCBOJ9xlSs04aJtX5nG/zBArlwzRItgMFXRdNse4Q=; b=rt3L4/rPw6w8pli6lbamV2a+WMxywOw7LECOttXBsmNGaXHD//NiAr5lvLncdbSBeh T/kVGEN0/aVwmEnPWnl7GZOk/apGCLw7lOy0vP2pdblmd6kMLbVLJcph1kqjASWT70YL RP/QMlxoS0xKdcs1cWy2KaNCzmdS7vmFKoeXKGGrv7LOLN+D4o/xgz6HLiZf6yflKtwx 9OhEn6k/Z0M4H7leTP2MupC4gJttwhoeDxlfBaJoYdv/jY7dpsYLaXaehkEwzojU/cUx QhXL3nqf2JUY4swIZeE2aFl31ew+xOZqzuaAFKrjEWJRZGsu21Li5rgguWQIaLr4ZSjL Q+8g== X-Gm-Message-State: AOAM533z/2fhClpPDgMW/eh/2MA1MGGD7umXQ06wLh5jKfsFAs/9xsfO ZBgmd7dwNbrC+62eROZHO4y74A== X-Received: by 2002:a17:90b:3650:: with SMTP id nh16mr15078357pjb.135.1590855292927; Sat, 30 May 2020 09:14:52 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id f6sm289949pfe.174.2020.05.30.09.14.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 May 2020 09:14:52 -0700 (PDT) Date: Sat, 30 May 2020 09:14:50 -0700 From: Kees Cook To: Christian Brauner Cc: Sargun Dhillon , containers@lists.linux-foundation.org, cyphar@cyphar.com, jannh@google.com, jeffv@google.com, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, palmer@google.com, rsesek@google.com, tycho@tycho.ws, Matt Denton , Al Viro Subject: Re: [PATCH v2 2/3] seccomp: Introduce addfd ioctl to seccomp user notifier Message-ID: <202005300911.AAE71F1955@keescook> References: <20200528110858.3265-1-sargun@sargun.me> <20200528110858.3265-3-sargun@sargun.me> <202005282345.573B917@keescook> <20200530011054.GA14852@ircssh-2.c.rugged-nimbus-611.internal> <202005291926.E9004B4@keescook> <20200530035817.GA20457@ircssh-2.c.rugged-nimbus-611.internal> <202005292223.1701AB31@keescook> <20200530141329.tjrtrdy66jhqzojy@wittgenstein> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200530141329.tjrtrdy66jhqzojy@wittgenstein> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 30, 2020 at 04:13:29PM +0200, Christian Brauner wrote: > On Fri, May 29, 2020 at 10:47:12PM -0700, Kees Cook wrote: > > Oh hey! Look at scm_detach_fds_compat(). It needs this too. (And it's > > missing the cgroup tracking.) That would fix: > > > > 48a87cc26c13 ("net: netprio: fd passed in SCM_RIGHTS datagram not set correctly") > > d84295067fc7 ("net: net_cls: fd passed in SCM_RIGHTS datagram not set correctly") > > > > So, yes, let's get this fixed up. I'd say first fix the missing sock > > update in the compat path (so it can be CCed stable). Then fix the missing > > send this patch to net. > > > sock update in pidfd_getfd() (so it can be CCed stable), then write the > > send this patch to me. > > > helper with a refactoring of scm_detach_fds(), scm_detach_fds_compat(), > > this would be net-next most likely. > > > and pidfd_getfd(). And then add the addfd seccomp user_notif ioctl cmd. > > If you do this first, I'd suggest you resend the series here after all > this has been merged. We're not in a rush since this won't make it for > the 5.8 merge window anyway. By the time the changes land Kees might've > applied my changes to his tree so you can rebase yours on top of it > relieving Kees from fixing up merge conflicts. > > About your potential net and net-next changes. Just in case you don't > know - otherwise ignore this - please read and treat > https://www.kernel.org/doc/Documentation/networking/netdev-FAQ.txt > as the gospel. Also note, that after this Sunday - assuming Linus > releases - net-next will be closed until the merge window is closed, > i.e. for _at least_ 2 weeks. After the merge window closes you can check > http://vger.kernel.org/~davem/net-next.html > which either has a picture saying "Come In We're Open" or a sign saying > "Sorry, We're Closed". Only send when the first sign is up or the wrath > of Dave might hit you. :) Yeah, timing is awkward here. I was originally thinking it could all just land via seccomp (with appropriate Acks). Hmmm. -- Kees Cook