Commit 0beabe9b authored by Vikash Garodia's avatar Vikash Garodia Committed by Greg Kroah-Hartman
Browse files

media: venus: hfi_parser: refactor hfi packet parsing logic



[ Upstream commit 9edaaa8e ]

words_count denotes the number of words in total payload, while data
points to payload of various property within it. When words_count
reaches last word, data can access memory beyond the total payload. This
can lead to OOB access. With this patch, the utility api for handling
individual properties now returns the size of data consumed. Accordingly
remaining bytes are calculated before parsing the payload, thereby
eliminates the OOB access possibilities.

Cc: stable@vger.kernel.org
Fixes: 1a73374a ("media: venus: hfi_parser: add common capability parser")
Signed-off-by: default avatarVikash Garodia <quic_vgarodia@quicinc.com>
Reviewed-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 23ff45a4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment