From: Eric Biggers <ebiggers@kernel.org>
To: Azeem Shaikh <azeemshaikh38@gmail.com>
Cc: Richard Weinberger <richard@nod.at>,
Maxim Krasnyansky <maxk@qti.qualcomm.com>,
anton ivanov <anton.ivanov@cambridgegreys.com>,
Johannes Berg <johannes@sipsolutions.net>,
linux-hardening <linux-hardening@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-um <linux-um@lists.infradead.org>,
"Jason A. Donenfeld" <Jason@zx2c4.com>,
kernel test robot <lkp@intel.com>
Subject: Re: [PATCH v2] uml: Replace strlcpy with strscpy
Date: Tue, 6 Jun 2023 21:23:40 -0700 [thread overview]
Message-ID: <20230607042340.GA941@sol.localdomain> (raw)
In-Reply-To: <CADmuW3WzC61-si1j61kzwfx5EcsvSt4QBaY9VHiybBRWAN3yyA@mail.gmail.com>
On Tue, Jun 06, 2023 at 05:08:27PM -0400, Azeem Shaikh wrote:
> On Tue, Jun 6, 2023 at 4:51 PM Richard Weinberger <richard@nod.at> wrote:
> >
> > ----- Ursprüngliche Mail -----
> > > Von: "Azeem Shaikh" <azeemshaikh38@gmail.com>
> > > 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().
> > > No return values were used, so direct replacement is safe.
> > >
> > > [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy
> > > [2] https://github.com/KSPP/linux/issues/89
> > >
> > > Signed-off-by: Azeem Shaikh <azeemshaikh38@gmail.com>
> > > Reported-by: kernel test robot <lkp@intel.com>
> > > Closes:
> > > https://lore.kernel.org/oe-kbuild-all/202305311135.zGMT1gYR-lkp@intel.com/
> >
> > Are you sure Reported-by and Closes make sense?
> > AFAIK the report was only on your first patch and nothing against upstream.
> > So stating this in the updated patch is in vain.
>
> I left the metadata in only for the sake of posterity. If it's not
> helpful, I'm ok with removing it.
>
IMO using Reported-by in cases like this is harmful, as it makes commits seem
like bug fixes when they are not.
- Eric
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
next prev parent reply other threads:[~2023-06-07 4:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 18:24 [PATCH v2] uml: Replace strlcpy with strscpy Azeem Shaikh
2023-06-06 20:51 ` Richard Weinberger
2023-06-06 21:08 ` Azeem Shaikh
2023-06-07 4:23 ` Eric Biggers [this message]
2023-06-07 8:28 ` Reported-by/Closes tag for uncommitted issues (was: Re: [PATCH v2] uml: Replace strlcpy with strscpy) Johannes Berg
2023-06-07 8:34 ` Richard Weinberger
2023-06-07 9:10 ` Philip Li
2023-06-07 9:17 ` Johannes Berg
2023-06-07 9:39 ` Philip Li
2023-06-07 9:43 ` Johannes Berg
2023-06-07 9:47 ` Philip Li
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=20230607042340.GA941@sol.localdomain \
--to=ebiggers@kernel.org \
--cc=Jason@zx2c4.com \
--cc=anton.ivanov@cambridgegreys.com \
--cc=azeemshaikh38@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=lkp@intel.com \
--cc=maxk@qti.qualcomm.com \
--cc=richard@nod.at \
/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;
as well as URLs for NNTP newsgroup(s).