]> 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)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Tue, 27 Sep 2022 08:24:44 +0000 (10:24 +0200)
commit87da2401c483b472a0021721054f7f2ab8e8f34a
tree3c117d0d66b38fcd341d45bc225eab5e5ca461ae
parent7a731e36cadf7cf7ed6a257c8a558cf82360339c
media: dvb_vb2: fix possible out of bound access

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>
drivers/media/dvb-core/dvb_vb2.c