From: sashiko-bot@kernel.org
To: "John Harrison" <John.Harrison@Igalia.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [RFC PATCH 5/8] drm/vkms/colorop: Update to new pipeline API
Date: Tue, 09 Jun 2026 17:37:29 +0000 [thread overview]
Message-ID: <20260609173729.AAEC91F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260609171941.169104-6-John.Harrison@Igalia.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Unchecked kasprintf return value may lead to a NULL pointer dereference when setting up the color pipeline property.
--
commit e64dca02dc85f9d02e8990c56f98c1559490b722
Author: John Harrison <John.Harrison@Igalia.com>
drm/vkms/colorop: Update to new pipeline API
Switch to using the new method for building colorop pipelines.
> diff --git a/drivers/gpu/drm/vkms/vkms_colorop.c b/drivers/gpu/drm/vkms/vkms_colorop.c
> index 071f3a8d2e7c4..ecb4fd56eb8cc 100644
> --- a/drivers/gpu/drm/vkms/vkms_colorop.c
> +++ b/drivers/gpu/drm/vkms/vkms_colorop.c
[ ... ]
> @@ -93,7 +95,7 @@ static int vkms_initialize_color_pipeline(struct drm_plane *plane, struct drm_pr
> if (ret)
> goto cleanup;
>
> - drm_colorop_set_next_property(ops[i - 1], ops[i]);
> + drm_colorop_add_to_pipeline(ops[0], ops[i]);
>
> list->name = kasprintf(GFP_KERNEL, "Color Pipeline %d", ops[0]->base.id);
>
[Severity: High]
This is a pre-existing issue, but does this kasprintf() need a NULL check?
If kasprintf() fails to allocate memory, it returns NULL. Since
vkms_initialize_color_pipeline() then unconditionally returns 0 (success), the
caller vkms_initialize_colorops() will pass this NULL string down to
drm_plane_create_color_pipeline_property(). This is ultimately passed to
drm_property_add_enum(), where calling strlen() on the NULL name will cause a
NULL pointer dereference.
Should this allocation be checked and routed to the cleanup path on failure?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260609171941.169104-1-John.Harrison@Igalia.com?part=5
next prev parent reply other threads:[~2026-06-09 17:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-09 17:19 [RFC PATCH 0/8] Convert colorop pipelines to use proper lists John Harrison
2026-06-09 17:19 ` [RFC PATCH 1/8] drm/colorop: Reduce scope of colorop helpers John Harrison
2026-06-09 17:31 ` sashiko-bot
2026-06-09 17:19 ` [RFC PATCH 2/8] drm/colorop: Create pipelines via 'add to pipeline' instead of 'set next' John Harrison
2026-06-09 17:19 ` [RFC PATCH 3/8] drm/i915/colorop: Update to new pipeline API John Harrison
2026-06-09 17:32 ` sashiko-bot
2026-06-09 17:19 ` [RFC PATCH 4/8] drm/amd/colorop: " John Harrison
2026-06-09 17:37 ` sashiko-bot
2026-06-09 17:19 ` [RFC PATCH 5/8] drm/vkms/colorop: " John Harrison
2026-06-09 17:37 ` sashiko-bot [this message]
2026-06-09 17:19 ` [RFC PATCH 6/8] drm/colorop: Remove old add-next API as no longer used John Harrison
2026-06-09 17:19 ` [RFC PATCH 7/8] drm/colorop: Convert pipline 'next' pointer to a list John Harrison
2026-06-09 17:40 ` sashiko-bot
2026-06-09 17:19 ` [RFC PATCH 8/8] drm/colorop: Check that requested colorop is the root of a pipeline John Harrison
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=20260609173729.AAEC91F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=John.Harrison@Igalia.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
/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