From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) (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 5140F3A9629 for ; Tue, 12 May 2026 20:10:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778616640; cv=none; b=fwD3SrbAO0ExzjT/+rsmzkQhWW/xeKzoLSJgt4tjb76pMdShRkBigAYqh1W0dv3nyFUZrA783FWi2lDscMeg3NLm25hc8jUPnWA1GCI6quYI5A6JE0pCOeNVgdOt+jR9EJzvgPS0m96tD6VrAK/abilTxgoyJZHeR8rSbqsJenA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778616640; c=relaxed/simple; bh=Nded5YnhlvH7B1W7gdPtOrHJrXkGJgNX6Ulgohu09Qc=; h=Date:Message-ID:MIME-Version:Content-Type:From:To:Cc:Subject: References:In-Reply-To; b=qA3Tcqw5jVFW8b9wJ7ijyUswjhFJMlo+k/p42rFEo1k2q+MWyExHwULkojnsqGoMgAEYNdoXYbuDFTlzri2YGeDIdMrl4OLJ9/+x3W69Ycmpc0OSnd3S0k7q2+HsCrChvtkoL3FxAa1zyf94qU+yh5ADPs6xxteIxcUOj3qZiVA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=paul-moore.com; spf=pass smtp.mailfrom=paul-moore.com; dkim=pass (2048-bit key) header.d=paul-moore.com header.i=@paul-moore.com header.b=dKCgApIf; arc=none smtp.client-ip=209.85.222.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=paul-moore.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=paul-moore.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=paul-moore.com header.i=@paul-moore.com header.b="dKCgApIf" Received: by mail-qk1-f179.google.com with SMTP id af79cd13be357-90f850473f9so16552485a.3 for ; Tue, 12 May 2026 13:10:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore.com; s=google; t=1778616638; x=1779221438; darn=vger.kernel.org; h=in-reply-to:references:subject:cc:to:from:content-transfer-encoding :mime-version:message-id:date:from:to:cc:subject:date:message-id :reply-to; bh=W7VZy+MYmGnp0ISA3F0kBNNHUQXAunrHLeetlXx9KTE=; b=dKCgApIfi93qZuCyD5h5Sy2ALspexefNABDXIxp1SZa3wRcznJ7x+1CQDn6eVDQ8CA ckaxAarxoX5lxdiTtrPamOo5f+7lpfiqeMeKJji9IfSH10YsZ2VjMXP/cUtC60vVLXAv WeCCUxaLKgE22XcaewqmYvRpskXUx1oyEA+KX4ajfp7KbCExyEXPJItwmL2oaR//jlas xRzHg01SmV8cdyhzIeEZKefmQ4jlyhY8TevJ4Ti9ZNInC3cZ5xugsOSi13cxX0AKaqAj rAhMo2VyAq3wAj/hoDmBq810AhlGhrQeOuxzX+Kld1BkcwmThADI4q3cOvDsEfvgPZJS mpBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778616638; x=1779221438; h=in-reply-to:references:subject:cc:to:from:content-transfer-encoding :mime-version:message-id:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=W7VZy+MYmGnp0ISA3F0kBNNHUQXAunrHLeetlXx9KTE=; b=OFUqFCsqYa6il/IkZM7AcdpkUfu32Ynk1zdEv+Zy8N2FoTuz48S7fXFji5wF4mfex5 HivW4DV77cgnZBFrAurtl1MyX/a9jFPcb8CDg3N0gfLCaHk9Dl6dLiULB418nz0GaMTQ mj88rUccB5sU17efQk50onSH273qViaR2TZ9Egqe4qIOsDskhy4ub2zXQLJfzYZAPjCE lFOI01oUsmK0q3GCAhg/MROjstBw8CVQuGteJVP1mXGZTuxtxxHVbom4HGyN1/nuGv/W oOfLx7A2Z2srcMLCYtYFdjsuOc0MJNvetL1Pj01/job6pZWXU8H+6VbrNNjgmAQEyaiZ uo3Q== X-Forwarded-Encrypted: i=1; AFNElJ/AzUFwwsuKYZZftRbU/s49ErUYnsAwQh85av3kNYFnZ+uNsJ/G3v2Ts8fANPXzS+9/0Iz3PBEKgOUyuwU=@vger.kernel.org X-Gm-Message-State: AOJu0Yy4J0GRmKLB/kyN5L7bF7OveGqJgSw83ZtIfJbf2EKGpJn9BTmo xt6Fy7fghAKl6dMbTEICMo0g7jDP+ON9bNeLEbbnfCr34FRD164Ley6bH2nZquUZgA== X-Gm-Gg: Acq92OEZ7xKNHMqiudNWGZKe7XA+HTv2L/l1oFB/dGlAEwGD0HZ5+3BKhiN5UQKQURb KqYs6uOea3WgLExSFeNfS5sDkdwh39WRAs0JHvS2wG8t+gVPdd0hoX9BIxxc8Qc0gwGxGGepoDe +6/lfTn/2+Vq8GNiPd9grRKRRH74BYq1C2Zi6hUD1xB9zdQigfmbrVUEzqF8MgFSb5rmzu3xgkj ogUhk2rFyahCzmKdTDVPQqm8vaYj5xxnR/wlN7ph+Z4u3OhIV/GInDEK4jnlo6py2JFAqELZp4S ltX5BSZLTEBXQmr6hFzysLSxlYOcz6jNxIZoRac8R2h/tp5V7/Zp7yIBMftB4aCoskXyRF9h06j Fj+n1/hNiErmAsyieQmPG43R8NpGY+LfkvfcuIlceqqRbrTeX5yqKL8nd9yr/4dEuVk+38irgQb q9lXIizE2KRc6+2wOhBojY3/IKwqigWRBEtTdcBdv49e78wisdoIkJdRLcyI0x5uah8/xP X-Received: by 2002:a05:620a:2806:b0:8cf:db04:8a39 with SMTP id af79cd13be357-90f8a44765cmr73906785a.37.1778616638311; Tue, 12 May 2026 13:10:38 -0700 (PDT) Received: from localhost (pool-71-126-255-178.bstnma.fios.verizon.net. [71.126.255.178]) by smtp.gmail.com with ESMTPSA id af79cd13be357-90cc338d234sm365224985a.43.2026.05.12.13.10.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 May 2026 13:10:37 -0700 (PDT) Date: Tue, 12 May 2026 16:10:36 -0400 Message-ID: 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 X-Mailer: pstg-pwork:20260512_1604/pstg-lib:20260512_1209/pstg-pwork:20260512_1604 From: Paul Moore To: Sergio Correia , audit@vger.kernel.org, linux-kernel@vger.kernel.org Cc: eparis@redhat.com, rrobaina@redhat.com, Sergio Correia Subject: Re: [PATCH] audit: enforce AUDIT_LOCKED for AUDIT_TRIM and AUDIT_MAKE_EQUIV References: <20260512132859.1305499-1-scorreia@redhat.com> In-Reply-To: <20260512132859.1305499-1-scorreia@redhat.com> On May 12, 2026 Sergio Correia wrote: > > AUDIT_ADD_RULE and AUDIT_DEL_RULE correctly check for AUDIT_LOCKED > and return -EPERM, but AUDIT_TRIM and AUDIT_MAKE_EQUIV do not. This > allows a process with CAP_AUDIT_CONTROL to modify directory tree > watches and equivalence mappings even when the audit configuration > has been locked, undermining the purpose of the lock. > > Add AUDIT_LOCKED checks to both commands. > > Reviewed-by: Ricardo Robaina > Assisted-by: Claude:claude-opus-4-6 > Signed-off-by: Sergio Correia > --- > kernel/audit.c | 4 ++++ > 1 file changed, 4 insertions(+) Merged into audit/stable-7.1 with the expectation of sending it up to Linus later this week, thanks! -- paul-moore.com