Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3130329ybx; Sun, 3 Nov 2019 11:25:51 -0800 (PST) X-Google-Smtp-Source: APXvYqyLdZA4UuWT2a9AEn/g/pc2vuykrnMWEfzoKiN7M21RTXotTnSyAM35ZSuv/1cyorOZyQG4 X-Received: by 2002:aa7:d64e:: with SMTP id v14mr7259358edr.18.1572809151853; Sun, 03 Nov 2019 11:25:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572809151; cv=none; d=google.com; s=arc-20160816; b=WVu7yDeTrdkEgi7ZJ+zzbwaxuj6aEA7NvQd3bdqYKpVRy+MGwB4ngTjr9m23UrLm/y ORfYmf48EtNesNo5OZMwvISXaIl3YnVckN5TTH38FubGHgGI8avnHOiPdrulw6VO8YpW OKX5ssyfQvj47EQ5gV0lL1Qb8qxZDMhMik1bYIH5A2rk06asn4AW4XxbmZ51NboX64Aw GmFmwkKHy8Xs/pEUxBismsDHeAXiovIradtf938fUpt8vwS+9RmbDWZnTpFIKxUWewlO ayr5SA3iCVzzzno7lOIbv+lhyLmY/Bo4tit4alJPdT2nsGk5zCNl5eYH4/Pz5voysWwR HFKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject:dkim-signature; bh=Cn+TTapRLyVC5hXpBcuynf0UtMJbDzZiiqHnWWqVcxk=; b=GDWb9/FbIUzBrCyEfipnFMKNCzQopb6uz8KswlIOpH2XNTz3eWIPJkAnPtLcffdSOY /0S2inQOz3moNOunnwh/bxiJnKngv2GnrW4tteeI785D27DHx1oUjw85W6OyJeM9CvEC Nk4yowYeJBUKbjhb9I6+7mzLc3RiwEYbytmCoUSD1lGCK/Fva1NBZb2/ezlPJFWOKz5R FgyDMk4dIJnNXbvOvYBdt6s57gdaX750tWo9f7BzKwARXAXu3EhHQXYacLeHkPBpF/GP PX16mHHJC15MpPNZfwopJBHez3kVjxOrt+HSBZC3tfLHDihCXXXHU+2+5uvuk/b1j1BB FgsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XQbAHQUE; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id um11si9872301ejb.263.2019.11.03.11.25.14; Sun, 03 Nov 2019 11:25:51 -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=@gmail.com header.s=20161025 header.b=XQbAHQUE; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728086AbfKCTYc (ORCPT + 99 others); Sun, 3 Nov 2019 14:24:32 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:45407 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727913AbfKCTYc (ORCPT ); Sun, 3 Nov 2019 14:24:32 -0500 Received: by mail-lj1-f194.google.com with SMTP id n21so1640199ljg.12; Sun, 03 Nov 2019 11:24:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=Cn+TTapRLyVC5hXpBcuynf0UtMJbDzZiiqHnWWqVcxk=; b=XQbAHQUEXAph8jh6KhXJIuUOdDoO/EBJecQlBnsil0vmMdvd1uDPNKeSt39/cP+m9I 7C6inMHs5AJMnB8QWk1pstsGIif9Z/W8dK5S7c4fmnhVWiYYkra23J/iRvsY+1NFUVIk ehioaSP3YlJYWK4GQIzsYr9eabziBpMyWyb3cUSze0aq64pyE5ll1IJYFHC+Jg7HcwAv qo76D83s+5ZLfPdNVc/gsH8NkdxTHPYAoVEaGiPkCvM6BuQ+HNLdx3cWyJfRYzFT9U/+ Z7kvmkSBGqGAY/MNfW+S/592BgXuejYp8TRc1TN/dMHReBK4OQVxeTatYr+Fl4ekXBWJ odBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=Cn+TTapRLyVC5hXpBcuynf0UtMJbDzZiiqHnWWqVcxk=; b=RNRIvQhZ68r5955yRht/dkbBDCG55YqHFXfYyxX3xYyW44GpIGSGd1zR7WPbnTMJNK jAKueyEYfcBEZSd/EONzXk/FqXjwoc479wojqRez+ictJh6iv2lCTE94AAyeLx+dfqhc i9oLmGnLZc84x4i+KMP8ODdE9pWX8yVBCU6HiVo60YyiYzzQ6rwn2HYXaT2Yl+aqXkAj 6Lg+aXbi1epfMTZH+9jpyCoG7ISoqcd0vJC+cU/jD9OoBROi7NuXaYT9CQbDOJiPs56N RcmsbWOzDMpIvT65SBjwEuK/tRoI76psBB15s9jKwsw48OPito9Um+eRQZXLxDMYxthS ctfw== X-Gm-Message-State: APjAAAV7p7l70BxvJ1PJTNvDYFfZ/FufxbFWhFVOcPSuJ8EFzf6WtdeP WKmP+kjv/wqYNLvzuLcKAgOuBC7s X-Received: by 2002:a2e:9216:: with SMTP id k22mr4238773ljg.157.1572809069716; Sun, 03 Nov 2019 11:24:29 -0800 (PST) Received: from [192.168.1.36] (88-114-211-119.elisa-laajakaista.fi. [88.114.211.119]) by smtp.gmail.com with ESMTPSA id d28sm5604066lfn.33.2019.11.03.11.24.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 03 Nov 2019 11:24:29 -0800 (PST) Subject: Re: [PATCH] Allow restricting permissions in /proc/sys To: "Theodore Y. Ts'o" Cc: Luis Chamberlain , Kees Cook , Alexey Dobriyan , "linux-kernel@vger.kernel.org" , "open list:FILESYSTEMS (VFS and infrastructure)" References: <74a91362-247c-c749-5200-7bdce704ed9e@gmail.com> <20191103175648.GA4603@mit.edu> From: Topi Miettinen Message-ID: <226c6c2b-df7a-7eb1-e8c5-60fc23998f89@gmail.com> Date: Sun, 3 Nov 2019 21:24:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191103175648.GA4603@mit.edu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3.11.2019 19.56, Theodore Y. Ts'o wrote: > On Sun, Nov 03, 2019 at 04:55:48PM +0200, Topi Miettinen wrote: >> Several items in /proc/sys need not be accessible to unprivileged >> tasks. Let the system administrator change the permissions, but only >> to more restrictive modes than what the sysctl tables allow. >> >> Signed-off-by: Topi Miettinen > > Why should restruct the system administrator from changing the > permissions to one which is more lax than what the sysctl tables? > > The system administrator is already very much trusted. Why should we > take that discretion away from the system administrator? That could make sense, in addition changing UID/GID would allow even more flexibility. The current checks and restrictions which prevent those changes were already present in original code in 2007. I didn't want to change the logic too much. Perhaps loosening the restrictions could be a follow-up patch, as it may give chance to use more of generic proc or fslib code and thus a larger restructuring. -Topi