From: Pavel Machek <pavel@denx.de>
To: Sasha Levin <sashal@kernel.org>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Azeem Shaikh <azeemshaikh38@gmail.com>,
Kees Cook <keescook@chromium.org>,
Herbert Xu <herbert@gondor.apana.org.au>,
davem@davemloft.net, linux-crypto@vger.kernel.org
Subject: Re: [PATCH AUTOSEL 5.10 02/14] crypto: lrw,xts - Replace strlcpy with strscpy
Date: Mon, 11 Sep 2023 11:41:18 +0200 [thread overview]
Message-ID: <ZP7gvmd+D2fg9DD0@duo.ucw.cz> (raw)
In-Reply-To: <20230908182003.3460721-2-sashal@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 816 bytes --]
On Fri 2023-09-08 14:19:49, Sasha Levin wrote:
> From: Azeem Shaikh <azeemshaikh38@gmail.com>
>
> [ Upstream commit babb80b3ecc6f40c962e13c654ebcd27f25ee327 ]
>
> strlcpy() reads the entire source buffer first.
> This read may exceed the destination size limit.
> This is both inefficient and can lead to linear read
> overflows if a source string is not NUL-terminated [1].
> In an effort to remove strlcpy() completely [2], replace
> strlcpy() here with strscpy().
>
> Direct replacement is safe here since return value of -errno
> is used to check for truncation instead of sizeof(dest).
We don't need this in stable, do we?
BR,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2023-09-11 21:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-08 18:19 [PATCH AUTOSEL 5.10 01/14] devlink: remove reload failed checks in params get/set callbacks Sasha Levin
2023-09-08 18:19 ` [PATCH AUTOSEL 5.10 02/14] crypto: lrw,xts - Replace strlcpy with strscpy Sasha Levin
2023-09-11 9:41 ` Pavel Machek [this message]
2023-09-08 18:19 ` [PATCH AUTOSEL 5.10 03/14] wifi: ath9k: fix fortify warnings Sasha Levin
2023-09-08 18:19 ` [PATCH AUTOSEL 5.10 04/14] wifi: ath9k: fix printk specifier Sasha Levin
2023-09-08 18:19 ` [PATCH AUTOSEL 5.10 05/14] wifi: mwifiex: fix fortify warning Sasha Levin
2023-09-08 18:19 ` [PATCH AUTOSEL 5.10 06/14] wifi: wil6210: fix fortify warnings Sasha Levin
2023-09-08 18:19 ` [PATCH AUTOSEL 5.10 07/14] crypto: lib/mpi - avoid null pointer deref in mpi_cmp_ui() Sasha Levin
2023-09-08 18:19 ` [PATCH AUTOSEL 5.10 08/14] tpm_tis: Resend command to recover from data transfer errors Sasha Levin
2023-09-08 18:19 ` [PATCH AUTOSEL 5.10 09/14] mmc: sdhci-esdhc-imx: improve ESDHC_FLAG_ERR010450 Sasha Levin
2023-09-08 18:19 ` [PATCH AUTOSEL 5.10 10/14] alx: fix OOB-read compiler warning Sasha Levin
2023-09-08 18:19 ` [PATCH AUTOSEL 5.10 11/14] netfilter: ebtables: fix fortify warnings in size_entry_mwt() Sasha Levin
2023-09-08 18:19 ` [PATCH AUTOSEL 5.10 12/14] wifi: mac80211_hwsim: drop short frames Sasha Levin
2023-09-08 18:20 ` [PATCH AUTOSEL 5.10 13/14] libbpf: Free btf_vmlinux when closing bpf_object Sasha Levin
2023-09-08 18:20 ` [PATCH AUTOSEL 5.10 14/14] Bluetooth: btusb: Fix quirks table naming Sasha Levin
2023-09-08 21:44 ` [PATCH AUTOSEL 5.10 01/14] devlink: remove reload failed checks in params get/set callbacks Jacob Keller
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=ZP7gvmd+D2fg9DD0@duo.ucw.cz \
--to=pavel@denx.de \
--cc=azeemshaikh38@gmail.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=keescook@chromium.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.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