[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aMTynRWJVA5Oovvs@gondor.apana.org.au>
Date: Sat, 13 Sep 2025 12:27:09 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Yunseong Kim <ysk@...lloc.com>
Cc: Mario Limonciello <mario.limonciello@....com>,
Tom Lendacky <thomas.lendacky@....com>,
John Allen <john.allen@....com>,
"David S. Miller" <davem@...emloft.net>,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] crypto: ccp: Fix incorrect payload size calculation in
psp_poulate_hsti()
On Wed, Sep 03, 2025 at 10:16:43PM +0900, Yunseong Kim wrote:
> payload_size field of the request header is incorrectly calculated using
> sizeof(req). Since 'req' is a pointer (struct hsti_request *), sizeof(req)
> returns the size of the pointer itself (e.g., 8 bytes on a 64-bit system),
> rather than the size of the structure it points to. This leads to an
> incorrect payload size being sent to the Platform Security Processor (PSP),
> potentially causing the HSTI query command to fail.
>
> Fix this by using sizeof(*req) to correctly calculate the size of the
> struct hsti_request.
>
> Signed-off-by: Yunseong Kim <ysk@...lloc.com>
> ---
> drivers/crypto/ccp/hsti.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists