Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Linmao Li <lilinmao@kylinos.cn>
Cc: "David S. Miller" <davem@davemloft.net>,
	Frank Li <Frank.Li@nxp.com>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	Leonard Crestez <cdleonard@gmail.com>,
	Radu Solea <radu.solea@nxp.com>,
	Franck LENORMAND <franck.lenormand@nxp.com>,
	linux-crypto@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: mxs-dcp: handle zero-length skcipher requests
Date: Fri, 11 Sep 2026 15:29:35 +1000	[thread overview]
Message-ID: <aqORv0iyPUE2qKep@gondor.apana.org.au> (raw)
In-Reply-To: <20260828093209.3179074-1-lilinmao@kylinos.cn>

On Fri, Aug 28, 2026 at 05:32:09PM +0800, Linmao Li wrote:
> Zero-length skcipher requests are valid no-ops, but MXS-DCP queues them.
> When such a request reaches the worker, last_out_len remains zero. The
> CBC completion path then subtracts AES_BLOCK_SIZE from this unsigned
> value when updating the IV, causing the offset to underflow. On
> decryption, the resulting source address precedes aes_in_buf.
> 
> Return success before enqueueing zero-length requests. This avoids the
> invalid source access and leaves the IV unchanged for a no-op.
> 
> Fixes: fadd7a6e616b ("crypto: mxs-dcp - Fix AES issues")
> Signed-off-by: Linmao Li <lilinmao@kylinos.cn>
> ---
>  drivers/crypto/mxs-dcp.c | 3 +++
>  1 file changed, 3 insertions(+)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


      parent reply	other threads:[~2026-09-11  5:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-28  9:32 [PATCH] crypto: mxs-dcp: handle zero-length skcipher requests Linmao Li
2026-08-28 19:25 ` Frank Li
2026-08-31 12:42   ` Linmao Li
2026-08-31 15:01     ` Frank Li
2026-09-01  3:05       ` Linmao Li
2026-09-01 19:07         ` Frank Li
2026-09-11  5:29 ` Herbert Xu [this message]

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=aqORv0iyPUE2qKep@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=Frank.Li@nxp.com \
    --cc=cdleonard@gmail.com \
    --cc=davem@davemloft.net \
    --cc=festevam@gmail.com \
    --cc=franck.lenormand@nxp.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=lilinmao@kylinos.cn \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=radu.solea@nxp.com \
    --cc=s.hauer@pengutronix.de \
    /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