Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1151906ybc; Tue, 12 Nov 2019 15:22:39 -0800 (PST) X-Google-Smtp-Source: APXvYqz0fRZIIJaIZT7591uf4AKfJI33daoAVGolivIb92pfOxNKC5TBGwX8JS9OMidG1NJM+4sx X-Received: by 2002:aa7:dc1a:: with SMTP id b26mr293041edu.139.1573600959481; Tue, 12 Nov 2019 15:22:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573600959; cv=none; d=google.com; s=arc-20160816; b=KvAVQWc7jD2G5Ebdjo+MeZRJfZ2xf0EpEtVw6rjNgNNJoPOsJ32/CdAtKUfXXWcRQX EyJuxinA7EZS8bspM0DTUoc1LBDjc1JHxk+igniTXgz91zxakmB7OQer6Gc39eo/B85y lAXXi3gbn0QpZLzKHwhjfmVPg8K6NR3MTsRgN0SCZ5rFvoAnjKjiMiOhOa3Bk0XaWv7p ENJrJ37ft05irZol5jzwhOpcYwUF93nKYex0HWeP2CQgjFALgaXq/FZlQ+v4WgppU5is 0uNILKVAOpgWJtMGuaOVJhcSLKZAQkhddBFWOC21A7d8RK2qzK0gyePLFIbOkE944vb4 SUbQ== 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=6YV9sWAtldt7QV9Z/E9MQlXJpOYClepPj0qjQfRgXwA=; b=j+SZngrcAUOmZ/iv9pficVVm8QJbBsfyzXjpYF26tFKUPFPx0ZLU/dG/D18vxhi8il XJxgCBBVbwHjKiI0FCs1/C6NZqh3/SuVCztdzY/8g/NvIEsqlKb9qSu5eCURpmftk4Co BQ/pK56d1JsW3LE+pcri4FEdYKotP0qc6P5VNYaae02FToE7c6Byk7v+OqljXg2nKROg Bqvu3Gz8haoA3h+R4sbGoCnnvpw7MyUhRBqzVwXq+kT8N+nGrGl7k5Nc7K7siEokBCqG IPrXW9fPU4OBxLhyeLB/1W1qbAMfEt98YYA5HBgPMXGQq1EbGMPB6jqPIZx+rPgVc7em Z09Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=XGXmNN3Z; 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 jx9si30941ejb.32.2019.11.12.15.22.14; Tue, 12 Nov 2019 15:22:39 -0800 (PST) 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=XGXmNN3Z; 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 S1727074AbfKLXTD (ORCPT + 99 others); Tue, 12 Nov 2019 18:19:03 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:36768 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726932AbfKLXTC (ORCPT ); Tue, 12 Nov 2019 18:19:02 -0500 Received: by mail-pf1-f196.google.com with SMTP id b19so199768pfd.3 for ; Tue, 12 Nov 2019 15:19:02 -0800 (PST) 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=6YV9sWAtldt7QV9Z/E9MQlXJpOYClepPj0qjQfRgXwA=; b=XGXmNN3ZtFcSV8anGunyLg32IAPhkzgurDq12Of06HDlvW+4TU61212ZPbAEkps7J6 7Qa9r1bNn2sil0rw9KEflTbVHGutMm6nju0oQKdhZ8cmhPwwbf3vMV6roozAimYwRasg CIYlbuKg0UiKlJiwToV1Ma+VBoqXB0UZf4iCw= 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=6YV9sWAtldt7QV9Z/E9MQlXJpOYClepPj0qjQfRgXwA=; b=jIKIspk3La7XPTYLPlwgi5zOzumWgRbU0vS1ENo+NUchQ46vc3pET2CZOf25yDA+81 3rFOCfPiFjKGmlOMo2Y9SBs/zEDkycplOiLTc8ghLb6TCFotzNBa3yemmWC8Kcnchxxx IaeUIoyqsoy7iX3/XliAU+gZgVtQ6ybyvkT5oZwlUVrxyHf/O7JR8sovYLYfKGeUB7sl DDJ0EHP+dn30djYJ/6NzHtXiR68bO1IMFpyJG22et81hbmO9UNbyb2b3MDPoxFIrL4W6 2xkBRUqcCESygV/bc9TqbDHaviPA1oH+QfOY/mqiM6Z7KPlyllcpnnYbFaBeaMnb35Qk EWyA== X-Gm-Message-State: APjAAAWu6pw8l4t1N4GIVBMmNDJKGTqz8Dj2VZXbS0OEG51+hLMkQzTp gLBPQORqIvrACTQnj2k09ktJ1g== X-Received: by 2002:a63:f441:: with SMTP id p1mr78629pgk.362.1573600742209; Tue, 12 Nov 2019 15:19:02 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id x192sm42848pfd.96.2019.11.12.15.19.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2019 15:19:01 -0800 (PST) Date: Tue, 12 Nov 2019 15:19:00 -0800 From: Kees Cook To: Topi Miettinen Cc: "Eric W. Biederman" , Luis Chamberlain , Alexey Dobriyan , "linux-kernel@vger.kernel.org" , "open list:FILESYSTEMS (VFS and infrastructure)" Subject: Re: [PATCH] Allow restricting permissions in /proc/sys Message-ID: <201911121517.DC317D5D@keescook> References: <74a91362-247c-c749-5200-7bdce704ed9e@gmail.com> <87d0e8g5f4.fsf@x220.int.ebiederm.org> <87h83jejei.fsf@x220.int.ebiederm.org> <87tv7jciq3.fsf@x220.int.ebiederm.org> <1b0f94ef-ab1c-cb79-dd52-954cf0438af1@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1b0f94ef-ab1c-cb79-dd52-954cf0438af1@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 05, 2019 at 09:35:46AM +0200, Topi Miettinen wrote: > On 5.11.2019 1.41, Eric W. Biederman wrote: > > My sense is that if there is any kind of compelling reason to make > > world-readable values not world-readable, and it doesn't break anything > > (except malicious applications) than a kernel patch is probably the way > > to go. > > With kernel patch, do you propose to change individual sysctls to not > world-readable? That surely would help everybody instead of just those who > care enough to change /proc/sys permissions. I guess it would also be more > effort by an order of magnitude or two to convince each owner of a sysctl to > accept the change. I would think of this as a two-stage process: provide a mechanism to tighten permissions arbitrarily so that it is easier to gather evidence about which could have their default changed in the future. > These code paths have not changed much or at all since the initial version > in 2007, so I suppose the maintenance burden has not been overwhelming. > > By the way, /proc/sys still allows changing the {a,c,m}time. I think those > are not backed anywhere, so they probably suffer from same caching problems > as my first version of the patch. Is a v2 of this patch needed? It wasn't clear to me if the inode modes were incorrectly cached...? -- Kees Cook