Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1146842ybc; Tue, 12 Nov 2019 15:16:50 -0800 (PST) X-Google-Smtp-Source: APXvYqwXap6NFit66j6FksddFXeQ70tTV50eSy2VY0JAi5kZdEf9XpYno1IlRh3+33FvkmgKBPkH X-Received: by 2002:a17:906:1be9:: with SMTP id t9mr31067735ejg.10.1573600609973; Tue, 12 Nov 2019 15:16:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573600609; cv=none; d=google.com; s=arc-20160816; b=Ls205mSc5Y2l3ndLH27oVGefiS33vSrO1uiVdrsVK73NxuDqb1hMpTJm2gHJdLTojp h6QWJHRpJfDgfurSlbyEbBHZSMiV+eZwGB+BxgroOOZYUryeeKKzbC54vRpxuA0dk1Ho udAwcB2q86ZrDFu63lLD/RAmjuKRBBu2axa3Wul7XLenFMlUXziHw4l38RSW78woYwBy Nyf5vuKJck7g4d5f1xzB04ncT3il2Hu0szdxycwLLYHvLIyeYtFS0z4ML7re41+6cOxW cCoYCznXQsBLDIFaxWgI/hwG+HocKK9148PSmWSDdm2BTbb8DAGJsPhMUowCKz0R3WK3 lCcA== 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=q/7zKomDvwvoQVmplaYbzXQkEiXPJRscqerdxI0XpvE=; b=qTXwbCQ8z5cXvNlS+sjJ3q2xLOGVZOTqxk8FLEo+QvVtOWoXl1LBz4OnWtDDmSJaT9 HcExqSvL+CZFIp/jFGdmurkls3ewzt9ZWKt8/g5VayNPTtlpyPThauMH4EX9bcHLqnuT wpeEb5mnKpRVKN/DNZUSxq7taaOfVz69Unyvm/T8/fGPtbZ6ANN6ck8EFs33PRLAO636 puEMY+b15cVEz/x+fCUMj0Snls+Zy35frDFcPkN97pF5QxZ9NHLWCfGEEcgGZrtfpxr8 eE2YGh0SmSc9wTYVDnrEQdy57E8adMO5r47fOqLIJgaheNYewaC9ejje5/z2tXCXG45W +xNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gMuZpNu2; 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 f11si1429ejr.10.2019.11.12.15.16.25; Tue, 12 Nov 2019 15:16:49 -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=gMuZpNu2; 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 S1727241AbfKLXPT (ORCPT + 99 others); Tue, 12 Nov 2019 18:15:19 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:37995 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727221AbfKLXPS (ORCPT ); Tue, 12 Nov 2019 18:15:18 -0500 Received: by mail-pg1-f194.google.com with SMTP id 15so17645pgh.5 for ; Tue, 12 Nov 2019 15:15:17 -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=q/7zKomDvwvoQVmplaYbzXQkEiXPJRscqerdxI0XpvE=; b=gMuZpNu2ZWWW1U1Djp24A57ML3WMX9pxLpjzy9vcatjVYek6YJx07FQmY8w0YIjtWk npdddXUg54q759/2mZ1xUDLqAY/tN+mCvK2bLXfWZscdZbUFsmPrJ8mGS42dXbUexSqn FLkNDOuNubyqmyvpl7RPVvVrXPThIpjdJPxl8= 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=q/7zKomDvwvoQVmplaYbzXQkEiXPJRscqerdxI0XpvE=; b=b95X35scxJ8EeYcvEJy+VNqF1z2mvFM/ATqKvVeYCClrlJAAtCaq2VYmTZEteg4OYw Wb0/iVrzd5pFntkRwxKf2U0wHY5kXuYHGl4H/QiefKP6JEjho91nhUvJUIFrfy1hZi3U iLb/jLwW6A55vmYsXa45094RPYpm+S091FVcZV6ziX2/FaHrDqOirKVIkMRDM8BqjrGq fCdcASxveG5wpep8PsaUE2rZCiFpqXvjgkilsRcCxKqk/hUPesIByMFLqJHelXLnBmC8 BAmUM3dDlOnJBrDd2IPBbknNGmCyITYJp7owCKvu1MahqA2UDNvsLxUgRbp1zBvqsi75 +6Xg== X-Gm-Message-State: APjAAAUS7w2oyiJ46x8owA512Of43g4YLn8FgINZYMjQN2D3oaA57BHG rVucCX1gTm5nYhk2iHvt+WnbiA== X-Received: by 2002:a17:90a:3b0d:: with SMTP id d13mr473073pjc.86.1573600517339; Tue, 12 Nov 2019 15:15:17 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id l74sm172205pje.29.2019.11.12.15.15.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2019 15:15:16 -0800 (PST) Date: Tue, 12 Nov 2019 15:15:15 -0800 From: Kees Cook To: "Theodore Y. Ts'o" Cc: Topi Miettinen , 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: <201911121514.DA3BEED0@keescook> References: <74a91362-247c-c749-5200-7bdce704ed9e@gmail.com> <20191103175648.GA4603@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191103175648.GA4603@mit.edu> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Nov 03, 2019 at 12:56:48PM -0500, 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? Generally speaking, they're there to provide some sense of boundary between uid 0 and the kernel proper. I think it's correct to not allow weakening of these permissions (which is the current state: no change at all). -- Kees Cook