]> 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)
commit9d5e18c9ae3ed2244ae49de066f1da7743416527
tree185d6dc12b07e13452914163f405a3105da58a4f
parent19fd2a37a4f2d9665e9f460c0126aa374033d5f6
media: dvb_vb2: fix possible out of bound access

commit 87da2401c483b472a0021721054f7f2ab8e8f34a 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: 99686b32ac2e ("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