From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Imkanmod Khan <imkanmodkhan@gmail.com>, Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH 6.1.y] media: mtk-vcodec: potential null pointer deference in SCP
Date: Fri, 24 Jan 2025 14:52:07 -0500 [thread overview]
Message-ID: <20250124101700-0746914cb962f115@stable.kernel.org> (raw)
In-Reply-To: <20250124040641.7431-1-imkanmodkhan@gmail.com>
[ Sasha's backport helper bot ]
Hi,
The upstream commit SHA1 provided is correct: 53dbe08504442dc7ba4865c09b3bbf5fe849681b
WARNING: Author mismatch between patch and upstream commit:
Backport author: Imkanmod Khan<imkanmodkhan@gmail.com>
Commit author: Fullway Wang<fullwaywang@outlook.com>
Status in newer kernel trees:
6.12.y | Present (exact SHA1)
6.6.y | Present (different SHA1: f066882293b5)
6.1.y | Not found
Note: The patch differs from the upstream commit:
---
1: 53dbe08504442 ! 1: 992dd0827dc54 media: mtk-vcodec: potential null pointer deference in SCP
@@ Metadata
## Commit message ##
media: mtk-vcodec: potential null pointer deference in SCP
+ [ Upstream commit 53dbe08504442dc7ba4865c09b3bbf5fe849681b ]
+
The return value of devm_kzalloc() needs to be checked to avoid
NULL pointer deference. This is similar to CVE-2022-3113.
Link: https://lore.kernel.org/linux-media/PH7PR20MB5925094DAE3FD750C7E39E01BF712@PH7PR20MB5925.namprd20.prod.outlook.com
Signed-off-by: Fullway Wang <fullwaywang@outlook.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
+ [ To fix CVE: CVE-2024-40973, modified the file path from drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_scp.c
+ to drivers/media/platform/mediatek/vcodec/mtk_vcodec_fw_scp.c and minor conflict resolution ]
+ Signed-off-by: Imkanmod Khan <imkanmodkhan@gmail.com>
- ## drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_scp.c ##
-@@ drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_scp.c: struct mtk_vcodec_fw *mtk_vcodec_fw_scp_init(void *priv, enum mtk_vcodec_fw_use
+ ## drivers/media/platform/mediatek/vcodec/mtk_vcodec_fw_scp.c ##
+@@ drivers/media/platform/mediatek/vcodec/mtk_vcodec_fw_scp.c: struct mtk_vcodec_fw *mtk_vcodec_fw_scp_init(struct mtk_vcodec_dev *dev)
}
- fw = devm_kzalloc(&plat_dev->dev, sizeof(*fw), GFP_KERNEL);
+ fw = devm_kzalloc(&dev->plat_dev->dev, sizeof(*fw), GFP_KERNEL);
+ if (!fw)
+ return ERR_PTR(-ENOMEM);
fw->type = SCP;
---
Results of testing on various branches:
| Branch | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.1.y | Success | Success |
next prev parent reply other threads:[~2025-01-24 19:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-24 4:06 [PATCH 6.1.y] media: mtk-vcodec: potential null pointer deference in SCP Imkanmod Khan
2025-01-24 19:52 ` Sasha Levin [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-02-25 3:08 jianqi.ren.cn
2025-02-25 16:13 ` Sasha Levin
2024-12-11 10:02 jianqi.ren.cn
2024-12-11 16:32 ` Sasha Levin
2024-12-09 6:54 jianqi.ren.cn
2024-12-09 14:35 ` Sasha Levin
2024-12-06 9:16 jianqi.ren.cn
2024-12-06 17:11 ` Sasha Levin
2024-12-11 8:15 ` Greg KH
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=20250124101700-0746914cb962f115@stable.kernel.org \
--to=sashal@kernel.org \
--cc=imkanmodkhan@gmail.com \
--cc=stable@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).