Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp187546rdb; Fri, 5 Jan 2024 06:52:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IEyCLKKrVem5vztuz0opqlIVM4hnCN8aeOIyc50cgiflofR3uYT6W7nFT2TWjfM0kPnGfu7 X-Received: by 2002:ac2:4c18:0:b0:50e:6b38:9e0b with SMTP id t24-20020ac24c18000000b0050e6b389e0bmr797462lfq.73.1704466360917; Fri, 05 Jan 2024 06:52:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704466360; cv=none; d=google.com; s=arc-20160816; b=F7J6UVT1jqK40lLJtdL4zS1YRF+D+8BytzBRUM3k849p7Rc3O9yehFXnpqIAX/8N9h oeFErn2smmviEzkyAwYw0cIsLmXqyov9t/g7I5u4trWW5UpYdsZ/8n88dACu+0iXYf3U DUdb47f3WTTs9wPEJVohHXpObd/ARyaLs5pSF5v75V+RGGZGCxEWNHdVV5VIZVOvBvic 8SL57Ahf9Vp1jzr0xFRUC+dH1GI4H0knNAWhfqcoldGhCV/aT6qOcnTAzIe3malYbh1P A6vXjkYW1l4ciWcufb9wAmhCoyBasdhVP/EIwmRPmewLS+ZUaP87GJgIuJjgbbpbEPix ICrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=96QxMD2/uzSjfYXlD+HiWCgYGOHYLzMvGcx5dmU4D5Q=; fh=GFDteNvWH48WIeYSyIa1pRgmjPKpIvAKJ1z6/l73JxA=; b=jEIQXJA34Pa34un2LtBMIEeGs0bbwCQwPQyiBnRD83PDtEcoSByQ/4J03PgC2KBQsx QkcDwzYIbYrFDh1iYkhHMdVVWeY9mpMCWj8parBE9SMin6lqs98J1D2LE0d0/rqPkPrQ GhW/SKNibE0Tp6Gqlxqhrm/Ir/Lv7TxZMdJiG9zE46id8ZwqbdrGK6JUTDVOslO1PQOq YoDCUH8bP4NHbmwPS/3w4V2jM9eN0AVlY53K4SJEiCSehioHFc2Q5MV0EUq+7vSPvglK PC5z2eKde7m+JiD1FWmBXdVIvfstWsL5FUiRrFyZPNO4t+BFt5XS3iLEB9jXQ6+LSVzG RlHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mit.edu header.s=outgoing header.b=EFlKDgrG; spf=pass (google.com: domain of linux-kernel+bounces-17968-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17968-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mit.edu Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id s15-20020a05640217cf00b005559a32fb08si675131edy.103.2024.01.05.06.52.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 06:52:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17968-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@mit.edu header.s=outgoing header.b=EFlKDgrG; spf=pass (google.com: domain of linux-kernel+bounces-17968-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17968-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mit.edu Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0D4FD1F24003 for ; Fri, 5 Jan 2024 14:51:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 278912E405; Fri, 5 Jan 2024 14:50:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mit.edu header.i=@mit.edu header.b="EFlKDgrG" X-Original-To: linux-kernel@vger.kernel.org Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92E452D78C for ; Fri, 5 Jan 2024 14:50:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mit.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mit.edu Received: from cwcc.thunk.org (pool-173-48-102-117.bstnma.fios.verizon.net [173.48.102.117]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 405EniVh013879 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 5 Jan 2024 09:49:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1704466190; bh=96QxMD2/uzSjfYXlD+HiWCgYGOHYLzMvGcx5dmU4D5Q=; h=Date:From:Subject:Message-ID:MIME-Version:Content-Type; b=EFlKDgrGJ6Vw6By+GICPZ//aLgNbSy8l+v2ymqqwG7UcVHMsFKkeSDG+gB6334Rxl Q88V4YxJ2hQZ32POiWYzRYQtYJZ4mknnlgEE3fSOl3UL81S8HuQTL8Hs5AdlhUoLRA g3MelcFWO2lh7Bj+gTzHmEkdQ3fsuF0cTfgrqAxPstLXIrSFNwiib2Oc8b6DtwncUn /2CAF726LZHGkfiZTZm17nimUyBdKfnIRSE6gwBbZabp5AUaG9K+wsDcLN79xS9CKW HHpvKwZl1/O24IgQOQVviPb/KrgPjJ/Bnv5WfA8dUUFBk2sEy3XKiS3i8abQl0BD56 eKAXm1Gfw+RKw== Received: by cwcc.thunk.org (Postfix, from userid 15806) id 91F3415C0276; Fri, 5 Jan 2024 09:49:44 -0500 (EST) Date: Fri, 5 Jan 2024 09:49:44 -0500 From: "Theodore Ts'o" To: Jingzi Meng Cc: gregkh@linuxfoundation.org, gpiccoli@igalia.com, john.ogness@linutronix.de, keescook@chromium.org, linux-hardening@vger.kernel.org, linux-kernel@vger.kernel.org, pmladek@suse.com, rostedt@goodmis.org, senozhatsky@chromium.org, tony.luck@intel.com Subject: Re: [PATCH] cap_syslog: remove CAP_SYS_ADMIN when dmesg_restrict Message-ID: <20240105144944.GA246367@mit.edu> References: <2024010306-tweezers-skinhead-083e@gregkh> <20240105062007.26965-1-mengjingzi@iie.ac.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240105062007.26965-1-mengjingzi@iie.ac.cn> On Fri, Jan 05, 2024 at 02:20:07PM +0800, Jingzi Meng wrote: > CAP_SYSLOG was separated from CAP_SYS_ADMIN and introduced in Linux > 2.6.37 (2010-11). For a long time, certain syslog actions required > CAP_SYS_ADMIN or CAP_SYSLOG. Maybe it’s time to officially remove > CAP_SYS_ADMIN for more fine-grained control. > > CAP_SYS_ADMIN was once removed but added back for backwards > compatibility reasons. In commit 38ef4c2e437d ("syslog: check cap_syslog > when dmesg_restrict") (2010-12), CAP_SYS_ADMIN was no longer needed. And > in commit ee24aebffb75 ("cap_syslog: accept CAP_SYS_ADMIN for now") > (2011-02), it was accepted again. Since then, CAP_SYS_ADMIN has been > preserved. > > Now that almost 13 years have passed, the legacy application may have > had enough time to be updated. What testing have you done to make sure that this is OK? "May have had enough time"? That's not very reassuring? Also, note that we can't actually reuse the bit position of CAP_SYS_ADMIN since it's likely that there may be pre-existing capability masks that are still using that position. So there isn't all that much upside in trying to retire CAP_SYS_ADMIN --- if you as a system administrator think it's not too course, then just don't use it. It's unclear to me what goal you have in trying to mess with the capability definitions? Perhaps it might be useful if you were to explicitly state your goals in these proposals? Thanks, - Ted