linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Olof Johansson <olof@lixom.net>
To: Sudeep Holla <sudeep.holla@arm.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux ARM Mailing List <linux-arm-kernel@lists.infradead.org>,
	Kevin Hilman <khilman@linaro.org>, Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH] firmware: arm_scmi: use strlcpy to ensure NULL-terminated strings
Date: Fri, 7 Sep 2018 10:14:31 -0700	[thread overview]
Message-ID: <CAOesGMiRYFuMDbs9bogSRz-85d_+JYh39ktvYeY2fuUL4Pmr6w@mail.gmail.com> (raw)
In-Reply-To: <1536339135-5431-1-git-send-email-sudeep.holla@arm.com>

Hi,

On Fri, Sep 7, 2018 at 9:52 AM, Sudeep Holla <sudeep.holla@arm.com> wrote:
> Replace all the memcpy() for copying name strings from the firmware with
> strlcpy() to make sure we are bounded by the source buffer size and we
> also always have NULL-terminated strings.
>
> This is needed to avoid out of bounds accesses if the firmware returns
> a non-terminated string.
>
> Reported-by: Olof Johansson <olof@lixom.net>
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>

In case I don't end up applying it:

Acked-by: Olof Johansson <olof@lixom.net>

> Let me know if this is rc/fix material or need to wait for v4.20 ?

I don't see a reason to merge this as a fix, it's more of a cleanup.


-Olof

      reply	other threads:[~2018-09-07 17:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-07 16:52 [PATCH] firmware: arm_scmi: use strlcpy to ensure NULL-terminated strings Sudeep Holla
2018-09-07 17:14 ` Olof Johansson [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=CAOesGMiRYFuMDbs9bogSRz-85d_+JYh39ktvYeY2fuUL4Pmr6w@mail.gmail.com \
    --to=olof@lixom.net \
    --cc=arnd@arndb.de \
    --cc=khilman@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sudeep.holla@arm.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;
as well as URLs for NNTP newsgroup(s).