]> git.baikalelectronics.ru Git - kernel.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:37:43 +0000 (10:37 +0200)
commit534423ca77ec58d0df122e046a8183bf7e09c26b
tree185d6dc12b07e13452914163f405a3105da58a4f
parent78bdb8454ece2cef8a238595ca8b8e10554785c1
media: dvb_vb2: fix possible out of bound access

commit d0d2cd4b569b85be0377bc64775d31b7c43189a0 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: d0f97d6a4693 ("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