mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Thorsten Blum <thorsten.blum@linux.dev>
Cc: Kristen Accardi <kristen.c.accardi@intel.com>,
	Vinicius Costa Gomes <vinicius.gomes@intel.com>,
	Kanchana P Sridhar <kanchana.p.sridhar@intel.com>,
	"David S. Miller" <davem@davemloft.net>,
	Tom Zanussi <tom.zanussi@linux.intel.com>,
	stable@vger.kernel.org, linux-crypto@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: iaa - Fix out-of-bounds index in find_empty_iaa_compression_mode
Date: Fri, 19 Dec 2025 15:04:00 +0800	[thread overview]
Message-ID: <aUT44MU1ehlRsu3m@gondor.apana.org.au> (raw)
In-Reply-To: <20251127140158.173840-1-thorsten.blum@linux.dev>

On Thu, Nov 27, 2025 at 03:01:57PM +0100, Thorsten Blum wrote:
> The local variable 'i' is initialized with -EINVAL, but the for loop
> immediately overwrites it and -EINVAL is never returned.
> 
> If no empty compression mode can be found, the function would return the
> out-of-bounds index IAA_COMP_MODES_MAX, which would cause an invalid
> array access in add_iaa_compression_mode().
> 
> Fix both issues by returning either a valid index or -EINVAL.
> 
> Cc: stable@vger.kernel.org
> Fixes: b190447e0fa3 ("crypto: iaa - Add compression mode management along with fixed mode")
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
>  drivers/crypto/intel/iaa/iaa_crypto_main.c | 12 +++++-------
>  1 file changed, 5 insertions(+), 7 deletions(-)

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:[~2025-12-19  7:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-27 14:01 Thorsten Blum
2025-12-01 17:28 ` Sridhar, Kanchana P
2025-12-19  7:04 ` 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=aUT44MU1ehlRsu3m@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=davem@davemloft.net \
    --cc=kanchana.p.sridhar@intel.com \
    --cc=kristen.c.accardi@intel.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=thorsten.blum@linux.dev \
    --cc=tom.zanussi@linux.intel.com \
    --cc=vinicius.gomes@intel.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

all inboxes | Powered by JetHome®