From: Eric Biggers <ebiggers@kernel.org>
To: Yuran Pereira <yuran.pereira@hotmail.com>
Cc: linux-crypto@vger.kernel.org, herbert@gondor.apana.org.au,
davem@davemloft.net, tglx@linutronix.de, mingo@redhat.com,
bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org,
hpa@zytor.com, linux-kernel@vger.kernel.org,
linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [PATCH 0/7] crypto: Proper Initialization of `struct skcipher_walk` in x86 Glue Files
Date: Wed, 1 Nov 2023 21:20:43 -0700 [thread overview]
Message-ID: <20231102042043.GD1498@sol.localdomain> (raw)
In-Reply-To: <DB3PR10MB683562E7BD2DC73A48BEA3C8E8A6A@DB3PR10MB6835.EURPRD10.PROD.OUTLOOK.COM>
Hi Yuran,
On Thu, Nov 02, 2023 at 09:34:08AM +0530, Yuran Pereira wrote:
> In multiple `*_encrypt`, `*_crypt`, `*_decrypt` functions within the x86/crypto
> glue files, the `skcipher_walk` structs being used are not properly initialized
> prior their usage which can lead to undefined behaviour if the `flags` field of
> this structure were to contain junk values at the time of its usage.
>
> This patch series ensures that instances of `struct skcipher_walk` are correctly
> initialized across different x86/crypto glue files.
>
> Yuran Pereira (7):
> crypto: Fixes uninitialized skcipher_walk use in sm4_aesni_avx_glue
> crypto: Fixes uninitialized skcipher_walk use in des3_ede_glue
> crypto: Fixes uninitialized skcipher_walk use in chacha_glue
> crypto: Fixes uninitialized skcipher_walk use in aesni-intel_glue
> crypto: Fixes uninitialized skcipher_walk use in aria_aesni_avx2_glue
> crypto: Fixes uninitialized skcipher_walk use in aria_aesni_avx_glue
> crypto: Fixes uninitialized skcipher_walk use in aria_gfni_avx512_glue
Updating all callers of skcipher_walk_virt() seems like the wrong approach.
Shouldn't skcipher_walk_virt() be fixed to initialize the flags to 0 instead?
Also, does this fix affect any behavior, or is it just to fix a KMSAN warning?
It needs to be fixed either way, but it's helpful to understand the effect of
the fix so that people can decide whether it needs to be backported or not.
- Eric
next prev parent reply other threads:[~2023-11-02 4:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-02 4:04 [PATCH 0/7] crypto: Proper Initialization of `struct skcipher_walk` in x86 Glue Files Yuran Pereira
2023-11-02 4:09 ` [PATCH 1/7] crypto: Fixes uninitialized skcipher_walk use in sm4_aesni_avx_glue Yuran Pereira
[not found] ` <20231102040931.1556061-1-yuran.pereira@hotmail.com>
2023-11-02 4:09 ` [PATCH 2/7] crypto: Fixes uninitialized skcipher_walk use in des3_ede_glue Yuran Pereira
2023-11-02 4:09 ` [PATCH 3/7] crypto: Fixes uninitialized skcipher_walk use in chacha_glue Yuran Pereira
2023-11-02 4:09 ` [PATCH 4/7] crypto: Fixes uninitialized skcipher_walk use in aesni-intel_glue Yuran Pereira
2023-11-02 4:09 ` [PATCH 5/7] crypto: Fixes uninitialized skcipher_walk use in aria_aesni_avx2_glue Yuran Pereira
2023-11-02 4:09 ` [PATCH 6/7] crypto: Fixes uninitialized skcipher_walk use in aria_aesni_avx_glue Yuran Pereira
2023-11-02 4:09 ` [PATCH 7/7] crypto: Fixes uninitialized skcipher_walk use in aria_gfni_avx512_glue Yuran Pereira
2023-11-02 4:20 ` Eric Biggers [this message]
2023-11-02 4:30 ` [PATCH 0/7] crypto: Proper Initialization of `struct skcipher_walk` in x86 Glue Files Herbert Xu
2023-11-02 4:57 ` Yuran Pereira
2023-11-02 5:00 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231102042043.GD1498@sol.localdomain \
--to=ebiggers@kernel.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=hpa@zytor.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=yuran.pereira@hotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox