From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) (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 AB7363A8723 for ; Tue, 12 May 2026 20:05:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778616342; cv=none; b=TR8/QsPUZuB2vbqThJKjU+L7bUWP7RjKD8heBBAurqr3N51gZwvSzqn1+vb/06M+iTg9ISCvbRIR1yNBnn1N1EFyebvmHrgSyZVoEPLoMycOd9WH2ohPZIYrDhy1vwbVeBdE4uKG8wBGiL9BWr0gFFXB1mSSAZWwE6pvooiitXo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778616342; c=relaxed/simple; bh=x21MTF9Y4cEIrS6RrZtFXGQtdcy/uAij1wPTEZTm0Gg=; h=Date:Message-ID:MIME-Version:Content-Type:From:To:Cc:Subject: References:In-Reply-To; b=TgmMZI9tTMDvzRnO1LzI40u4pjCADOZ37dwn5my/0zviEVKNR4qsbnC7Grwyt9xFo79CRXxEL8xCnw1pl97rtAvIBt/noQTqZtwQkWIJX7BAMQqlfWRpB0LGYIb2VodZ3KXmLyZHLqrySZ3m+VdCw51d4pfJHxxyJdW4HWrC7vI= 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=Zy6hwb7U; arc=none smtp.client-ip=209.85.222.173 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="Zy6hwb7U" Received: by mail-qk1-f173.google.com with SMTP id af79cd13be357-8dbbc6c16b2so768994785a.0 for ; Tue, 12 May 2026 13:05:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore.com; s=google; t=1778616340; x=1779221140; 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=0OPcweLHpHv1ww1JrOpKTjFRPEE/hvU/xx4wF8rBQS0=; b=Zy6hwb7UXVLEeDkxuYtynzw5v55m58fR4PtHL6jRvIwzJ4/3YvjjSGN1LOF3D/6fLi qhCsAoSAa2KtGE/sU6w8CwF1R5oMmaurJp5KbuKrmFDVe3/2zXuEe18eOZoAWWxpu/bt ePRt7afffTAVUNu0jm3KymtLgIxpq5mRcXDDRxD/UnK1KigJJHIaV51sbupZHe39zfIg Ow/QWxR+muYUmouv7Kt3vDtBrInvRdQpS4A5sadcweEc4hp0JEl1eDYZh80vj1nx7HSu DNpUXlxzyeAVs2X+i0X8Iwe38GN9tU2FI95dvNWt4ATtKO7Nnl68423xWupOkRmMnDDD ZrgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778616340; x=1779221140; 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=0OPcweLHpHv1ww1JrOpKTjFRPEE/hvU/xx4wF8rBQS0=; b=G51vaTHmsR6iJjFjQ/AGMg+Ak4UA+cNw1CINJ08k6t4bYQrISShIF5yKGj6p5Y0yJ/ yTHpmcI6YyWvrzIKf0cJPsgVV/oZQ8qi/Kv47PoXCmROSdUre1bgViWkCD7JRuYT0P0M oZX+3AVD+ccUnfGGbmNZnDB+KneJB3Qc7QO2jaWAyk/8gDwPxv49/oEnFZtsRcNtw3TR HGCL+w4xcTftqSX+emEMoltJCpro/paq8vgKH9R7oIjRmO9RARkxrsn9+RcGBBDWyiwi 7lFcKScGLhlzKQp/hiLO4aSoD5zdojtvKZrepAf/JregBm3aLs+BWI9w8NBMPnULfsqP yVwQ== X-Forwarded-Encrypted: i=1; AFNElJ+cZIAlJxAlOMoR0jmFD07HYKL+QYv/5WjNY+ZIKXcSCgvZJ3wFQ5sYhgTDvZxBwctpZrPKQJJs+wJ9O9s=@vger.kernel.org X-Gm-Message-State: AOJu0YyDvuuz+fO9oCkwOIccrSwav/AU5XK3o7h6+iHchj0oYNIQELH1 3cMTIZYAA3Gpt2awC4AkwztjSCAgsgPlV0wkAa/p/Xk1dLS0DpHRjAU1HqDGQPW1Jw== X-Gm-Gg: Acq92OGiqEpMSyKmOheacHKAOxvEpCXkoXygKQ9bEle8NHQdj2TUqJHNnUQawg6eByI G5ePjaFJ1ssppU+kAG1zCzSW5v8Jd6cCSq89BhOKaCHXV7eIgS7GUK75io2+OS9PhaZTR/YrMaU FVO5h5A3fwTk+CwlOGbhOXr4HvFfSFJcUn8rIlnTFEcdzqX2xAZfOuibztbycEodKWH5qVYDxBr Ve/5UJnsUryvVuH2CAzwMZHMTo9nJNA6wTcxVvAT05jgNwzljPxgcN/hhh5Pj3UZkmuu7jAwZf9 XnTL3m19j7SZzcSx5hv5v0yIyYGUXAdCceksnqbydsHInvpQtkZ/MO73ZxfSeBr5RjkHS0s7+0e 8bCr5LFzhBFEDvIjN3Jb6PZ9Fu3lyK5QWqkk2EO0lY8OjBhd9TA3mGyNAmj3EzWuNHq5MXgeJ71 ijzmrEamYIB9922Nqut0Ea5O0mEKo/wB5jYiKQiJCePLRyhmr+Twf0Qts8wwmZaoe5kO6t X-Received: by 2002:a05:620a:e14:b0:8ee:91d6:cd2c with SMTP id af79cd13be357-90cb9b07908mr516560485a.42.1778616339633; Tue, 12 May 2026 13:05:39 -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-90f666b5467sm60726185a.46.2026.05.12.13.05.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 May 2026 13:05:39 -0700 (PDT) Date: Tue, 12 May 2026 16:05:38 -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, sergeh@kernel.org, jmorris@namei.org, rrobaina@redhat.com, Sergio Correia Subject: Re: [PATCH] audit: fix incorrect inheritable capability in CAPSET records References: <20260512132833.1304542-1-scorreia@redhat.com> In-Reply-To: <20260512132833.1304542-1-scorreia@redhat.com> On May 12, 2026 Sergio Correia wrote: > > __audit_log_capset() records the effective capability set into the > inheritable field due to a copy-paste error. Every CAPSET audit > record therefore reports cap_pi (process inheritable) with the value > of cap_effective instead of cap_inheritable. > > This silently corrupts audit data used for compliance and forensic > analysis: an attacker who modifies inheritable capabilities to > prepare for a privilege-escalating exec would have the change masked > in the audit trail. > > The bug has been present since the original introduction of CAPSET > audit records in 2008. > > Fixes: e68b75a027bb ("When the capset syscall is used it is not possible for audit to record the actual capbilities being added/removed. This patch adds a new record type which emits the target pid and the eff, inh, and perm cap sets.") > Reviewed-by: Ricardo Robaina > Assisted-by: Claude:claude-opus-4-6 > Signed-off-by: Sergio Correia > --- > kernel/auditsc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Good work, thanks! I'm merging this into audit/stable-7.1 and will send this up to Linus later this week. -- paul-moore.com