Re: [PATCH v1 1/1] s390/zcrypt: Fix uninitialized padding in CRT key structure

[email protected]
Newsgroups org.kernel.vger.linux-s390
Message-ID <[email protected]>
> The zcrypt_type6_crt_key() function leaves padding bytes uninitialized
> between key components and the modulus in the CCA CRT key token. These
> padding bytes are sent to the crypto card, potentially leaking kernel
> memory contents.
> 
> The initial memset() only zeros fixed structure fields, not the
> flexible array member key_parts[] where the padding resides. While key
> components are properly copied from userspace, the calculated pad_len
> bytes between them remain uninitialized.
> 
> Fix by explicitly zeroing the padding bytes after copying the CRT key
> components.
> 
> Signed-off-by: Harald Freudenberger <[email protected]>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.