Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3394972ybk; Tue, 19 May 2020 03:40:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJ+RAif1T/vUo67PquuqmRGSTc5WbyrQLLSUiATLLIQ+okTU6AdpLuyMAdxC4RzpkcKavC X-Received: by 2002:a05:6402:2035:: with SMTP id ay21mr16464214edb.279.1589884810786; Tue, 19 May 2020 03:40:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589884810; cv=none; d=google.com; s=arc-20160816; b=lWuou4pn4syrZCHTY0T4REmnvfT95d5YWW7iny7KHcva9bvQcYaC1lIQFvQWgoGZqc kVh1nJao6pphmQVtJdn3W4Bq/afzDS3DqNzcsVLlMtLd2/NDbzi9lxPRt/PvD9AN9qYb me9zXYtJhezxtCtnFmduRUYeGkXcJkbsVlffKX3A/5i2FkT2mffd877HdhC4EHM6Hh+e i4UR6I3CUvbQ5cfXD21Fp6bgGpmankNXK5L9dm2zIfNfaZjK3QZo80JRVFF0lw3FDOhp I9+mFT2vyHQupeQX2VmfuA4Hm1hPcBpuMCnwzWCyLq5GqNqlazzJaukXL6dahh6E4l7K WRrA== 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; bh=KsffZ/cZH496KTqa3L0Hr31bba5WiN+c7Ehp/mFUNbA=; b=mQLbTj7pc1yhYxQUTh9pRvdIEMsvwu0176zxy02hCtEbFLMZKmB7wMHiIBSft7L+5K Z0Th3XYwht05RemfrlM8GhXnPG0dswv/88rq3/a1LmrX9oY3ayilMvj4K99qOgGIAKsb oCtM+2TadwZyTkcgLu21WM8rLqxIm55feWJfklXE133I9ewN0E0xY9WWUDA7ebZ6X9gm p3zL7+puTL6+iboXPylryUQQHAkxvZhp8iRE6YCUXIp2qEJol8tRPNVF3A1Dpp2i35vk 1QPfLA7Fxb+U1E9bwIPp9F0jS+oPWAZ7O+EhMOBMAyk1+hHhJ5HnUlEHCxO2xJM6fXxC DXag== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t10si7646703edq.435.2020.05.19.03.39.47; Tue, 19 May 2020 03:40: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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728647AbgESKfT (ORCPT + 99 others); Tue, 19 May 2020 06:35:19 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:41840 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725911AbgESKfS (ORCPT ); Tue, 19 May 2020 06:35:18 -0400 Received: from ip5f5af183.dynamic.kabel-deutschland.de ([95.90.241.131] helo=wittgenstein) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jazaa-0003Tv-Ci; Tue, 19 May 2020 10:35:12 +0000 Date: Tue, 19 May 2020 12:35:11 +0200 From: Christian Brauner To: Aleksa Sarai Cc: Jann Horn , Kees Cook , Tycho Andersen , Sargun Dhillon , Matt Denton , Chris Palmer , Jeffrey Vander Stoep , Linux Containers , Linux API , kernel list Subject: Re: seccomp feature development Message-ID: <20200519103511.2kbnpio5b3bcrvoo@wittgenstein> References: <202005181120.971232B7B@keescook> <20200519024846.b6dr5cjojnuetuyb@yavin.dot.cyphar.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200519024846.b6dr5cjojnuetuyb@yavin.dot.cyphar.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 19, 2020 at 12:48:46PM +1000, Aleksa Sarai wrote: > On 2020-05-19, Jann Horn wrote: > > On Mon, May 18, 2020 at 11:05 PM Kees Cook wrote: > > > ## deep argument inspection > > > > > > Background: seccomp users would like to write filters that traverse > > > the user pointers passed into many syscalls, but seccomp can't do this > > > dereference for a variety of reasons (mostly involving race conditions and > > > rearchitecting the entire kernel syscall and copy_from_user() code flows). > > > > Also, other than for syscall entry, it might be worth thinking about > > whether we want to have a special hook into seccomp for io_uring. > > io_uring is growing support for more and more syscalls, including > > things like openat2, connect, sendmsg, splice and so on, and that list > > is probably just going to grow in the future. If people start wanting > > to use io_uring in software with seccomp filters, it might be > > necessary to come up with some mechanism to prevent io_uring from > > permitting access to almost everything else... > > > > Probably not a big priority for now, but something to keep in mind for > > the future. > > Indeed. Quite a few people have raised concerns about io_uring and its > debug-ability, but I agree that another less-commonly-mentioned concern > should be how you restrict io_uring(2) from doing operations you've > disallowed through seccomp. Though obviously user_notif shouldn't be > allowed. :D As soon as you switch kernels to an io_uring supported kernel while maintaing a blacklist without updating all your seccomp filters you're currently hosed (Yes, blacklists aren't great but they have their uses.). Christian