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: Srujana Challa <schalla@marvell.com>,
	Bharat Bhushan <bbhushan2@marvell.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Dr. David Alan Gilbert" <linux@treblig.org>,
	Giovanni Cabiddu <giovanni.cabiddu@intel.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Lukasz Bartosik <lbartosik@marvell.com>,
	stable@vger.kernel.org, linux-crypto@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] crypto: octeontx: Fix length check to avoid truncation in ucode_load_store
Date: Fri, 19 Dec 2025 14:59:32 +0800	[thread overview]
Message-ID: <aUT31MqDVBQXYr18@gondor.apana.org.au> (raw)
In-Reply-To: <20251126094616.40932-2-thorsten.blum@linux.dev>

On Wed, Nov 26, 2025 at 10:46:13AM +0100, Thorsten Blum wrote:
> OTX_CPT_UCODE_NAME_LENGTH limits the microcode name to 64 bytes. If a
> user writes a string of exactly 64 characters, the original code used
> 'strlen(buf) > 64' to check the length, but then strscpy() copies only
> 63 characters before adding a NUL terminator, silently truncating the
> copied string.
> 
> Fix this off-by-one error by using 'count' directly for the length check
> to ensure long names are rejected early and copied without truncation.
> 
> Cc: stable@vger.kernel.org
> Fixes: d9110b0b01ff ("crypto: marvell - add support for OCTEON TX CPT engine")
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
>  drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

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

      reply	other threads:[~2025-12-19  6:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-26  9:46 Thorsten Blum
2025-12-19  6:59 ` 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=aUT31MqDVBQXYr18@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=bbhushan2@marvell.com \
    --cc=davem@davemloft.net \
    --cc=giovanni.cabiddu@intel.com \
    --cc=krzk@kernel.org \
    --cc=lbartosik@marvell.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@treblig.org \
    --cc=schalla@marvell.com \
    --cc=stable@vger.kernel.org \
    --cc=thorsten.blum@linux.dev \
    /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®