Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp350184rdb; Thu, 1 Feb 2024 10:09:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IFjGWpAH47a1yCdBth3ae1DMsXZ2Zn46e8IOuKh24xRfBt0IuQE2UekPNmi3KMQP5G0I+Zb X-Received: by 2002:a05:6122:4104:b0:4bd:8926:8e15 with SMTP id ce4-20020a056122410400b004bd89268e15mr5396541vkb.0.1706810994011; Thu, 01 Feb 2024 10:09:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706810993; cv=pass; d=google.com; s=arc-20160816; b=c9rYaDQsbihjRT21cwiUSliUVxqDfmCPEXiMSj/4/qTMldMldOtkgoBSAnVaip05HH 7s3jtoqbk5LlZh4a6X43GkH35WwgYOHmfl+tYqGLiQol2qFzsXRMhXeq7IARXxwNUjs6 Dil1iAl2KeIR8Dnb0v14uEmlZXIrokp0SH1wzgEcNfMwmrBXrR2drtbOjj53MDpnYo/L Dzvb7P+vNk4X51h0kWmu11WXbY3BLg3DRacNVemeKPjBjQrriMHlD4me4V0bFDBVWvIi 1O5VVj8b777HV5XWBRyCJMudGJ5Se1qG5tBYiVO5ENh8Yw5JFxQG3qrrAAUd0D1D0WJH lC1A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=mE3jVQhJ2LuQ3qyqaFoSe5QA+s0kLrjmgP5knra8bV8=; fh=WNhkQCoCbBapWv0yNiADXDDV0D3USWeWofJC0qZm17g=; b=XrRLhzHNaPaSCw/zME2ZzFuKl9QSoXp5u/dBc2roTjC/oYxQJJ6WdXUQm0x08dHU8m CHv1DcfFDOuAVVtLp1KAe2IE54cbGQt4RD+fKSXdXoKinu2/dBws6ME5E3qh05KgBIlz Uw+qJqYhFkQg0WRdkJIgbMsIOLkAz8AVX4KwPT3RVaEvhvhKwx2PNstVX9RqSI67Fbc6 IEOrjI8/jzhRBDfekKjHU4F48DVCTKqpkKWt6GkThUBGBM6inEGiLKtNsaFRG1+CoDbu 0uFmUREKAHzOk09HVt0prUkYAO1MHZgyYQV4wVW83mJimNPmd31o9sKNAG7KjnfsbIYG 6k0g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ihIdfvUk; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-48657-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48657-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org X-Forwarded-Encrypted: i=1; AJvYcCUKt/tzdBptGeLNuUK9hUz0B+UHYNVeq7Bb9TUC7jCeCD2H3rAowNNeMz1EcGcv/rCRXktKFtZ5G6xywCdPOebojr6iXdAU35k5Q232uw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id y197-20020a1f7dce000000b004c0091d20afsi74113vkc.134.2024.02.01.10.09.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 10:09:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48657-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ihIdfvUk; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-48657-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48657-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 8D77A1C2876B for ; Thu, 1 Feb 2024 18:09:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F1B74128814; Thu, 1 Feb 2024 18:05:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="ihIdfvUk" Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C2A8E128809 for ; Thu, 1 Feb 2024 18:05:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706810720; cv=none; b=ur5xcUe2YA5rY7ulIN0JHEUBhEqRe8VdpJt0hnozx+U6MyrE0kStRk/7Wqem6NF95F8b1Hs+hhwgw4LM/cW92NE9rYBCruOV5IoYtbkD0dF4Kd1hHtq6t3VTdWDb+tShQITAWBz9x4Qsi11FzcVWhP3eqNGFSdvifvgppJe9A7Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706810720; c=relaxed/simple; bh=6l8JZsAR+iMM8Ctsv7pi3j7qJeBN5dLs+LHJUKfuXaA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=XvDrK0WwGtBbyYhmZDAUNSFlXmMR/vSIUv9wpFNagjHqIbujOCr8XAgK4oxvDaDWt65LJlrUUAFbtxZypMdn5ztL4c03IhLlMQx4NtAbzecZOyWMhYC0zZZvL1iJXQO0GQmO23BDVH/XLm57d+WEJSPM7BkkU/J0oSXjsvcnjes= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=ihIdfvUk; arc=none smtp.client-ip=209.85.214.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1d76671e5a4so9480935ad.0 for ; Thu, 01 Feb 2024 10:05:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1706810718; x=1707415518; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mE3jVQhJ2LuQ3qyqaFoSe5QA+s0kLrjmgP5knra8bV8=; b=ihIdfvUkT/HXuoS2Z4aTIEzTtWi6sxrmDNaSTtWZrK8yARsLzs50tk9HQzP+JPRynW 1Hl+iLZ3Ypv0oQpeUeFf9QvM4pPKkyOJxvlz2BDog1bOGICdFYBaABZkLzTAy210U7d+ ErXwagLJ0KosY+DKAikqvlVcGc05FMu3CBJOo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706810718; x=1707415518; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mE3jVQhJ2LuQ3qyqaFoSe5QA+s0kLrjmgP5knra8bV8=; b=T4FbCYNnd0avN4xgmA3nUkh/20FYXIHIAX2UJ2VUnWWfoJVBpgu3tzOy28s/lQcyjK lBERmdYGqt+oi109A9DWt7lkqDfH91wfeO/DMgX+gnC1/Rpzuo4GGw51xa2ihHpahvin 7FUk/K+vWkaB7ZutVvFbGt90OqwjsYXKZm3HFCBVqGRSX1BBPYiz85dtZ6uSknq1A2jZ CYrs+3AIrfH+Q5Pc5tLuhRoawk+Qg4KkX7kXH3+ekkf3jtW9bKBxc53arXpnxQkQ7nv+ p1KASqgfJZTMdNLqDRScokAYDnbLL6QnFp4LYNn9DJAienH7g2hwtfbCgwIiRsjYVsYa ye9Q== X-Gm-Message-State: AOJu0Yz4vCzPt5RiLMqzPuLtfY2kunUh3egGJSYWLhoULGlGpfrwM5Hy hB6HwZ03D2ynJK4bCJm1YzkWiZNBRbZSXvn9P7t5aCYCdkmS7Hj8hcxE0yTyoA== X-Received: by 2002:a17:903:606:b0:1d9:34f8:ab94 with SMTP id kg6-20020a170903060600b001d934f8ab94mr4268050plb.60.1706810718072; Thu, 01 Feb 2024 10:05:18 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCW2dH89mngLTyNFzU2DuZunjfVaZuYL3r1tIjno9+kqNseg9ctg7YNn24N5q40zOGrmo9zQRJz7mWEKN9N67F7ftXP8w0NGuPmVnPjsL0TeCfzsoSNaP2Wq1LGzsm5xDb4Vlmdo/iD/3A0GXn1vAB/vvItqL0Tf93mV5FV6EFhgsPEOb6N6ZXmynrZlDvEqZaQWkPca08aPmjL5oe1PoJ1quqQ4Iqy+QL3XTTUlcDiYqvloZkSz16Y/iFooR/+cC5UwKkwUF67seCR8fUAXGvgcxo5b7v1KbstqdqPK6CKmC/GBL2YGpycjJo7HybEHFTKK10FWgyTQwPwe70+YsJ2vhUwEexR1C9HG Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id g10-20020a170902c98a00b001d8d56a8b9fsm115624plc.105.2024.02.01.10.05.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 10:05:17 -0800 (PST) From: Kees Cook To: gregkh@linuxfoundation.org, Jingzi Meng Cc: Kees Cook , gpiccoli@igalia.com, john.ogness@linutronix.de, 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 Date: Thu, 1 Feb 2024 10:05:15 -0800 Message-Id: <170681071324.3763781.3300487641248807302.b4-ty@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240105062007.26965-1-mengjingzi@iie.ac.cn> 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-Transfer-Encoding: 8bit On Fri, 05 Jan 2024 14:20:07 +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. > > [...] Applied to for-next/hardening, thanks! [1/1] cap_syslog: remove CAP_SYS_ADMIN when dmesg_restrict https://git.kernel.org/kees/c/09ce61e27db8 Take care, -- Kees Cook