From: Mario Limonciello <mario.limonciello@amd.com>
To: Krzysztof Kozlowski <krzk@kernel.org>,
jackysliu <1972843537@qq.com>,
harry.wentland@amd.com
Cc: Austin.Zheng@amd.com, Dillon.Varone@amd.com,
Security@tencent.com, Sung.Lee@amd.com, Wayne.Lin@amd.com,
airlied@gmail.com, alexander.deucher@amd.com, alvin.lee2@amd.com,
amd-gfx@lists.freedesktop.org, aurabindo.pillai@amd.com,
christian.koenig@amd.com, dri-devel@lists.freedesktop.org,
joshua.aberback@amd.com, linux-kernel@vger.kernel.org,
linux@treblig.org, ryanseto@amd.com, simona@ffwll.ch,
siqueira@igalia.com, sunpeng.li@amd.com
Subject: Re: [PATCH v2] drm/amd/display:fix a Null pointer dereference vulnerability
Date: Tue, 15 Jul 2025 16:29:23 -0500 [thread overview]
Message-ID: <23f01ced-2885-4513-b4b5-826fe9837750@amd.com> (raw)
In-Reply-To: <12c6632b-65b7-43da-a954-7107ac8cb1b1@kernel.org>
On 7/15/2025 5:44 AM, Krzysztof Kozlowski wrote:
> On 04/07/2025 05:16, jackysliu wrote:
>> From: jackysliu <Security@tencent.com>
>>
>> A null pointer dereference vulnerability exists in the AMD display driver's
>> (DC module) cleanup function dc_destruct().
>> When display control context (dc->ctx) construction fails
>> (due to memory allocation failure), this pointer remains NULL.
>> During subsequent error handling when dc_destruct() is called,
>> there's no NULL check before dereferencing the perf_trace member
>> (dc->ctx->perf_trace),
>> causing a kernel null pointer dereference crash
>>
>> Signed-off-by: jackysliu <Security@tencent.com>
>> ---
>> drivers/gpu/drm/amd/display/dc/core/dc.c | 20 ++++++++++++--------
>> 1 file changed, 12 insertions(+), 8 deletions(-)
>
> You should disclose that you used some AI tool for that... and that
> other report(s) was really fake finding. People should know you
> generated it with AI, so they could make informed decision whether to
> even allocate time here.
>
> Best regards,
> Krzysztof
Failure paths are so rarely executed that it sometimes takes years or
static analyzers to find and fix issues.
In this case I think it's a real problem. During init the following
sequence happens:
dc_create()
->dc_construct_ctx()
If dc_construct_ctx() fails then it jumps to a label that calls
dc_destruct(). So if the context wasn't set up then yeah there could be
a NULL pointer deref.
So to me this makes sense.
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Harry, do you agree?
next prev parent reply other threads:[~2025-07-15 21:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-03 3:39 [PATCH] " jackysliu
2025-07-03 15:15 ` Harry Wentland
2025-07-04 3:11 ` jackysliu
2025-07-04 3:16 ` [PATCH v2] " jackysliu
2025-07-15 10:44 ` Krzysztof Kozlowski
2025-07-15 21:29 ` Mario Limonciello [this message]
2025-07-16 3:10 ` [PATCH] scsi:bfa: Double-free vulnerability fix jackysliu
2025-07-16 3:37 ` [PATCH v2] drm/amd/display:fix a Null pointer dereference vulnerability jackysliu
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=23f01ced-2885-4513-b4b5-826fe9837750@amd.com \
--to=mario.limonciello@amd.com \
--cc=1972843537@qq.com \
--cc=Austin.Zheng@amd.com \
--cc=Dillon.Varone@amd.com \
--cc=Security@tencent.com \
--cc=Sung.Lee@amd.com \
--cc=Wayne.Lin@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=alvin.lee2@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=aurabindo.pillai@amd.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=joshua.aberback@amd.com \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@treblig.org \
--cc=ryanseto@amd.com \
--cc=simona@ffwll.ch \
--cc=siqueira@igalia.com \
--cc=sunpeng.li@amd.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
all inboxes | Powered by JetHome®