mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steffen Klassert <steffen.klassert@secunet.com>
To: "Miguel García" <miguelgarciaroman8@gmail.com>
Cc: <herbert@gondor.apana.org.au>, <davem@davemloft.net>,
	<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
	<horms@kernel.org>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <skhan@linuxfoundation.org>
Subject: Re: [PATCH net-next] xfrm: xfrm_user: use strscpy() for alg_name
Date: Sun, 17 Aug 2025 16:48:22 +0200	[thread overview]
Message-ID: <aKHrttHa0W1RfZjB@secunet.com> (raw)
In-Reply-To: <20250814193217.819835-1-miguelgarciaroman8@gmail.com>

On Thu, Aug 14, 2025 at 09:32:17PM +0200, Miguel García wrote:
> Replace the strcpy() calls that copy the canonical algorithm name into
> alg_name with strscpy() to avoid potential overflows and guarantee NULL
> termination.
> 
> Destination is alg_name in xfrm_algo/xfrm_algo_auth/xfrm_algo_aead
> (size CRYPTO_MAX_ALG_NAME).
> 
> Tested in QEMU (BusyBox/Alpine rootfs):
>  - Added ESP AEAD (rfc4106(gcm(aes))) and classic ESP (sha256 + cbc(aes))
>  - Verified canonical names via ip -d xfrm state
>  - Checked IPComp negative (unknown algo) and deflate path
> 
> Signed-off-by: Miguel García <miguelgarciaroman8@gmail.com>

Patch applied, thanks!

  reply	other threads:[~2025-08-17 14:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-14 19:32 Miguel García
2025-08-17 14:48 ` Steffen Klassert [this message]
2025-08-17 19:17   ` Miguel García Román

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=aKHrttHa0W1RfZjB@secunet.com \
    --to=steffen.klassert@secunet.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miguelgarciaroman8@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=skhan@linuxfoundation.org \
    /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®