]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: venus: hfi: add checks to perform sanity on queue pointers
authorVikash Garodia <quic_vgarodia@quicinc.com>
Thu, 10 Aug 2023 02:25:01 +0000 (07:55 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 16:56:26 +0000 (16:56 +0000)
commit7e450cc9ad54b6c560f44c8d86e4755462d4121c
treed2e93bea9b14b399e59780be3a25a6ecf9433aa5
parent1566e8be73fd5fa424e88d2a4cffdc34f970f0e1
media: venus: hfi: add checks to perform sanity on queue pointers

commit 5e538fce33589da6d7cb2de1445b84d3a8a692f7 upstream.

Read and write pointers are used to track the packet index in the memory
shared between video driver and firmware. There is a possibility of OOB
access if the read or write pointer goes beyond the queue memory size.
Add checks for the read and write pointer to avoid OOB access.

Cc: stable@vger.kernel.org
Fixes: d96d3f30c0f2 ("[media] media: venus: hfi: add Venus HFI files")
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/platform/qcom/venus/hfi_venus.c