From: Kees Cook <keescook@chromium.org>
To: Maxime Ripard <maxime@cerno.tech>
Cc: David Airlie <airlied@linux.ie>,
Daniel Vetter <daniel.vetter@intel.com>,
dri-devel@lists.freedesktop.org,
Thomas Zimmermann <tzimmermann@suse.de>
Subject: Re: [PATCH 2/3] drm/modes: Use strscpy() to copy command-line mode name
Date: Thu, 1 Dec 2022 08:28:55 -0800 [thread overview]
Message-ID: <202212010828.CB164AA700@keescook> (raw)
In-Reply-To: <20221128081938.742410-2-maxime@cerno.tech>
On Mon, Nov 28, 2022 at 09:19:37AM +0100, Maxime Ripard wrote:
> The mode name in struct drm_cmdline_mode can hold 32 characters at most,
> which can easily get overrun. Switch to strscpy() to prevent such a
> thing.
>
> Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
> Addresses-Coverity-ID: 1527354 ("Security best practices violations")
> Fixes: a7ab155397dd ("drm/modes: Switch to named mode descriptors")
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Kees Cook <keescook@chromium.org>
--
Kees Cook
next prev parent reply other threads:[~2022-12-01 16:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-28 8:19 [PATCH 1/3] drm/doc: Fix title underline length Maxime Ripard
2022-11-28 8:19 ` [PATCH 2/3] drm/modes: Use strscpy() to copy command-line mode name Maxime Ripard
2022-12-01 9:51 ` Javier Martinez Canillas
2022-12-01 16:28 ` Kees Cook [this message]
2022-11-28 8:19 ` [PATCH 3/3] drm/tests: helpers: Add missing export Maxime Ripard
2022-11-28 11:04 ` Maíra Canal
2022-12-01 9:49 ` [PATCH 1/3] drm/doc: Fix title underline length Javier Martinez Canillas
2022-12-01 10:18 ` Maxime Ripard
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=202212010828.CB164AA700@keescook \
--to=keescook@chromium.org \
--cc=airlied@linux.ie \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=maxime@cerno.tech \
--cc=tzimmermann@suse.de \
/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