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 BB2ECC8C7 for ; Fri, 11 Oct 2024 01:20:54 +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=1728609656; cv=none; b=ADROxdijQWDNWaXuHuee6cNX4opUkrWSKS5tfqz6faBtn2c0vik2R/VnEL2OJKpXTSKdPIZ8sB63ZJ4PcZGPlHz5HZr8AgMCZ8dzRqt7/CekZwi6cL2+OoUekHAuBRk9w3Zc+l7XUhPdME85r5jiFyYoIXqrcNzFQNAuO4achbE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728609656; c=relaxed/simple; bh=J86F7ed2RT/zbDTY0+kRdaTBCoGcZk0+nMD5IAWs8Sg=; h=Date:Message-ID:MIME-Version:Content-Type:From:To:Cc:Subject: References:In-Reply-To; b=ClljWQe8N3ifgXBXylY3cPmyrTlmfYK26vXU67vpUrI1OS0OErlcMn57wAwJJDp0RRU/DFdC/NqDGeEKPQercAIm13N+due7j18kW2owL7aWJpBVLP7es/kq7JWvxT5nhoD/lG8MJhBDzRhg9m5sHNE9pct8nguz4MFZdfJ9zUQ= 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=WDyTdPCg; 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="WDyTdPCg" Received: by mail-qk1-f173.google.com with SMTP id af79cd13be357-7afcf9f3c96so147996585a.1 for ; Thu, 10 Oct 2024 18:20:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore.com; s=google; t=1728609654; x=1729214454; 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=eIiCQI9CBnA2xpryLIp9qGO7nsfK27rCMlDOpUtgb4s=; b=WDyTdPCgraeqYTt7M+8bPd38vqtzwxYszswMBFI0zkQIP7SWxDr5bnu84setloM3gu J9lv0qgujJvhfEApub6LH0bU/33cm3cB2ikeoWBZAlNeaVi7bfyVpILBx45RM87lUnnW Cqls/X89EhK2+7n5YaTfxzoXnn6SLsOEtRLtk6obQN3fLejPQLDXHC2AB/zqhO4g4cz8 1YUZHuPO8ObAKSUJDgyHvXBIcU6k0+WcQdU6LL6SFk4eY5XzysjhSYSX1w1LVa2gb2OT soYIGQl4NEoInNFmhykq0BG2xnBC/aYBE1aBXkkvJVVPo8rkybJCiLemYAzoMP4j0Rxg AJlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728609654; x=1729214454; h=in-reply-to:references:subject:cc:to:from:content-transfer-encoding :mime-version:message-id:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=eIiCQI9CBnA2xpryLIp9qGO7nsfK27rCMlDOpUtgb4s=; b=I6TGegcJE8DnAShg6pA3y6vsOkqwKX8aV0/FHpzI/v3EeMvDhkpWW8Ya3xpu/FmVYJ RKnSVbyUGfFljJfuvp2POqrk1+UylZXDUQXbxqAQJb+oWHD9uZph0vXvj5aauv2GiPPU HO4kAr6QmJFhY9ACW30WFewEvKkCl3SuuJiw0DF/9vzuQk+Z0uEHprc6qxwLKTYX/AJD TpEWzpCX1DtPnzCykBrelEckv8IzMRnwTIrvP6NlmNZYShsNOVM1xrvHNWN7FKPEQkYM uePN2XbELuo4dRl8VmdY8QbpkeC9VxmsIfAqlIEEGr+ezDQj1IcOw0ayrJhEN1SaXszM 9jZA== X-Forwarded-Encrypted: i=1; AJvYcCUeJtR6ylKjN54UfePrkeFIjqZCAm5oRt3rSCtqPMoVfrUAl0ZDOgc44uw+D46fxg62X9XnCQ==@vger.kernel.org X-Gm-Message-State: AOJu0YxnPyeTLtCtqimLqUBum+0/q6AMXD0MinPtrg3W8XyZpnNEKgEI RHgO0+STJBw59cvAzP2HE0RMzYQcGVzTSjUS6Kyo/RsX82ILWh8a3loylDORJQ== X-Google-Smtp-Source: AGHT+IEbxunoS+zDqrd+m3js/aSOeihIlUwdEL4xLbaY1TX77dBsJbM5oDghN1hUr2RgEyIZ1k4zXQ== X-Received: by 2002:a05:620a:28cc:b0:7a9:c8f3:999c with SMTP id af79cd13be357-7b11a364686mr199609785a.5.1728609653748; Thu, 10 Oct 2024 18:20:53 -0700 (PDT) Received: from localhost ([70.22.175.108]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7b11c0a8902sm2964985a.31.2024.10.10.18.20.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2024 18:20:53 -0700 (PDT) Date: Thu, 10 Oct 2024 21:20:52 -0400 Message-ID: Precedence: bulk X-Mailing-List: audit@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Paul Moore To: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= , Christian Brauner Cc: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= , linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-security-module@vger.kernel.org, audit@vger.kernel.org, Mimi Zohar , Roberto Sassu , Dmitry Kasatkin , Eric Snowberg Subject: Re: [PATCH RFC v1 4/7] integrity: Fix inode numbers in audit records References: <20241010152649.849254-4-mic@digikod.net> In-Reply-To: <20241010152649.849254-4-mic@digikod.net> On Oct 10, 2024 =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= wrote: > > Use the new inode_get_ino() helper to log the user space's view of > inode's numbers instead of the private kernel values. > > Cc: Mimi Zohar > Cc: Roberto Sassu > Cc: Dmitry Kasatkin > Cc: Eric Snowberg > Signed-off-by: Mickaël Salaün > --- > security/integrity/integrity_audit.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Should we also need to update the inode value used in hmac_add_misc()? diff --git a/security/integrity/evm/evm_crypto.c b/security/integrity/evm/evm_crypto.c index 7c06ffd633d2..68ae454e187f 100644 --- a/security/integrity/evm/evm_crypto.c +++ b/security/integrity/evm/evm_crypto.c @@ -155,7 +155,7 @@ static void hmac_add_misc(struct shash_desc *desc, struct inode *inode, * signatures */ if (type != EVM_XATTR_PORTABLE_DIGSIG) { - hmac_misc.ino = inode->i_ino; + hmac_misc.ino = inode_get_ino(inode->i_ino); hmac_misc.generation = inode->i_generation; } /* The hmac uid and gid must be encoded in the initial user -- paul-moore.com