mbox series

[GIT,FIXES,FOR,v6.5] media: vcodec: Fix potential array out-of-bounds in encoder queue_setup

Message ID d5414054-36fc-3ade-5384-6ef9278210aa@xs4all.nl (mailing list archive)
State New, archived
Headers show
Series [GIT,FIXES,FOR,v6.5] media: vcodec: Fix potential array out-of-bounds in encoder queue_setup | expand

Pull-request

git://linuxtv.org/hverkuil/media_tree.git tags/br-v6.5q

Message

Hans Verkuil Aug. 18, 2023, 7:29 a.m. UTC
Please note that this does not apply to trees, it sits on top of mainline.

In our trees the vcodec/mtk_vcodec_enc.c source moved to vcodec/encoder/mtk_vcodec_enc.c
so this is something to pay attention to when merging the next mainline rc1.

Regards,

	Hans

The following changes since commit 4853c74bd7ab7fdb83f319bd9ace8a08c031e9b6:

  Merge tag 'parisc-for-6.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux (2023-08-15 20:28:04 +0000)

are available in the Git repository at:

  git://linuxtv.org/hverkuil/media_tree.git tags/br-v6.5q

for you to fetch changes up to be702f08ce683406765d6e28656d697691a74b59:

  media: vcodec: Fix potential array out-of-bounds in encoder queue_setup (2023-08-17 09:19:41 +0200)

----------------------------------------------------------------
Tag branch

----------------------------------------------------------------
Wei Chen (1):
      media: vcodec: Fix potential array out-of-bounds in encoder queue_setup

 drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Jenkins Aug. 18, 2023, 7:40 a.m. UTC | #1
From: builder@linuxtv.org

Pull request: https://patchwork.linuxtv.org/project/linux-media/patch/d5414054-36fc-3ade-5384-6ef9278210aa@xs4all.nl/
Build log: https://builder.linuxtv.org/job/patchwork/331805/
Build time: 00:00:00
Link: https://lore.kernel.org/linux-media/d5414054-36fc-3ade-5384-6ef9278210aa@xs4all.nl

gpg: Signature made Thu 17 Aug 2023 07:47:03 AM UTC
gpg:                using EDDSA key 52ADCAAE8A4F70B99ACD8D726B425DF79B1C1E76
gpg: Good signature from "Hans Verkuil <hverkuil-cisco@xs4all.nl>" [unknown]
gpg:                 aka "Hans Verkuil <hverkuil@xs4all.nl>" [full]


Build aborted due to a fatal error:
FAILED: patch patch patches/0001-media-vcodec-Fix-potential-array-out-of-bounds-in-en.patch doesn't apply:
Applying patch patches/0001-media-vcodec-Fix-potential-array-out-of-bounds-in-en.patch
can't find file to patch at input line 27
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From be702f08ce683406765d6e28656d697691a74b59 Mon Sep 17 00:00:00 2001
|From: Wei Chen <harperchen1110@gmail.com>
|Date: Thu, 10 Aug 2023 08:23:33 +0000
|Subject: media: vcodec: Fix potential array out-of-bounds in encoder
| queue_setup
|
|variable *nplanes is provided by user via system call argument. The
|possible value of q_data->fmt->num_planes is 1-3, while the value
|of *nplanes can be 1-8. The array access by index i can cause array
|out-of-bounds.
|
|Fix this bug by checking *nplanes against the array size.
|
|Fixes: 4e855a6efa54 ("[media] vcodec: mediatek: Add Mediatek V4L2 Video Encoder Driver")
|Signed-off-by: Wei Chen <harperchen1110@gmail.com>
|Cc: stable@vger.kernel.org
|Reviewed-by: Chen-Yu Tsai <wenst@chromium.org>
|Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|---
| drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c | 2 ++
| 1 file changed, 2 insertions(+)
|
|diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c
|index 9ff439a50f53..315e97a2450e 100644
|--- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c
|+++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_enc.c
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
Patch patches/0001-media-vcodec-Fix-potential-array-out-of-bounds-in-en.patch does not apply (enforce with -f)