]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: dvb_vb2: fix possible out of bound access
authorHangyu Hua <hbh25y@gmail.com>
Thu, 19 May 2022 02:17:43 +0000 (03:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Oct 2022 08:40:47 +0000 (10:40 +0200)
commit3a35e67f6b29cc9bcb433c3ad4e516fc0b133fc1
tree000d8fc54cc06159817daf261d977d4b6d4bc259
parente88a7c1831d4fe47b7fa9c6b56cff544c198a6ab
media: dvb_vb2: fix possible out of bound access

commit 37238699073e7e93f05517e529661151173cd458 upstream.

vb2_core_qbuf and vb2_core_querybuf don't check the range of b->index
controlled by the user.

Fix this by adding range checking code before using them.

Fixes: 57868acc369a ("media: videobuf2: Add new uAPI for DVB streaming I/O")
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/dvb-core/dvb_vb2.c