From: Greg KH <gregkh@linuxfoundation.org>
To: Zhang Zekun <zhangzekun11@huawei.com>
Cc: cve@kernel.org, stable@vger.kernel.org, kevinyang.wang@amd.com,
alexander.deucher@amd.com, liuyongqiang13@huawei.com
Subject: Re: [PATCH 4.19] Revert "drm/amdgpu: add missing size check in amdgpu_debugfs_gprwave_read()"
Date: Fri, 6 Dec 2024 10:29:54 +0100 [thread overview]
Message-ID: <2024120642-evaluate-diligent-d65b@gregkh> (raw)
In-Reply-To: <20241204082231.129924-1-zhangzekun11@huawei.com>
On Wed, Dec 04, 2024 at 04:22:31PM +0800, Zhang Zekun wrote:
> This reverts commit 673bdb4200c092692f83b5f7ba3df57021d52d29.
>
> The origin mainline patch fix a buffer overflow issue in
> amdgpu_debugfs_gprwave_read(), but it has not been introduced in kernel
> 6.1 and older kernels. This patch add a check in a wrong function in the
> same file.
>
> Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> index 4776196b2021..98bd8a23e5b0 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> @@ -394,7 +394,7 @@ static ssize_t amdgpu_debugfs_regs_smc_read(struct file *f, char __user *buf,
> if (!adev->smc_rreg)
> return -EOPNOTSUPP;
>
> - if (size > 4096 || size & 0x3 || *pos & 0x3)
> + if (size & 0x3 || *pos & 0x3)
> return -EINVAL;
>
> while (size) {
> --
> 2.17.1
>
>
Sorry, but 4.19.y is now end-of-life.
prev parent reply other threads:[~2024-12-06 9:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-04 8:22 [PATCH 4.19] Revert "drm/amdgpu: add missing size check in amdgpu_debugfs_gprwave_read()" Zhang Zekun
2024-12-04 15:41 ` Sasha Levin
2024-12-04 22:11 ` Sasha Levin
2024-12-06 9:29 ` Greg KH [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=2024120642-evaluate-diligent-d65b@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=alexander.deucher@amd.com \
--cc=cve@kernel.org \
--cc=kevinyang.wang@amd.com \
--cc=liuyongqiang13@huawei.com \
--cc=stable@vger.kernel.org \
--cc=zhangzekun11@huawei.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