FROMGIT: media: venus: hfi_parser: refactor hfi packet parsing logic
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") CRs-Fixed: 3935669 Change-Id: I692e4a8dea110f0650fe26e07207408087a4d19b Git-commit: 9edaaa8e Git-repo: https://gitlab.freedesktop.org/linux-media/media-committers.git Signed-off-by:Vikash Garodia <quic_vgarodia@quicinc.com>
Loading
Please sign in to comment