[PATCH 2/3] drm/modes: Use strscpy() to copy command-line mode name
Kees Cook
keescook at chromium.org
Thu Dec 1 16:28:55 UTC 2022
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 at 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 at cerno.tech>
Reviewed-by: Kees Cook <keescook at chromium.org>
--
Kees Cook
More information about the dri-devel
mailing list