Commit ce9e606c authored by Vikash Garodia's avatar Vikash Garodia Committed by Zheng Zengkai
Browse files

media: venus: hfi: fix the check to handle session buffer requirement

stable inclusion
from stable-v6.6.3
commit db6bd4724356f4046f7b54dd4443cb272bfec6e8
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8LBQP

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=db6bd4724356f4046f7b54dd4443cb272bfec6e8



--------------------------------

commit b18e36dfd6c935da60a971310374f3dfec3c82e1 upstream.

Buffer requirement, for different buffer type, comes from video firmware.
While copying these requirements, there is an OOB possibility when the
payload from firmware is more than expected size. Fix the check to avoid
the OOB possibility.

Cc: stable@vger.kernel.org
Fixes: 09c2845e ("[media] media: venus: hfi: add Host Firmware Interface (HFI)")
Reviewed-by: default avatarNathan Hebert <nhebert@chromium.org>
Signed-off-by: default avatarVikash Garodia <quic_vgarodia@quicinc.com>
Signed-off-by: default avatarStanimir Varbanov <stanimir.k.varbanov@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent c877c3be
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment