Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 42db1a1c authored by Vikash Garodia's avatar Vikash Garodia
Browse files

BACKPORT: media: venus: hfi_parser: Add check for number of codecs



Supported codec bitmask is populated from the payload from venus firmware.
There is a possible case when all the bits in the codec bitmask is set. In
such case, core cap for decoder is filled  and MAX_CODEC_NUM is utilized.
Now while filling the caps for encoder, it can lead to access the caps
array beyong 32 index. Hence leading to OOB write.
The fix counts the supported encoder and decoder. If the count is more than
max, then it skips accessing the caps.

commit 0768a9dd809e ("media: venus: hfi_parser: Add check to keep the
number of codecs within range").

Change-Id: Ieee7bb9730c9086de4ebddb5ca65908ee5887080
Cc: stable@vger.kernel.org
Fixes: 1a73374a ("media: venus: hfi_parser: add common capability parser")
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 avatarVikash Garodia <quic_vgarodia@quicinc.com>
parent b614a9db
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment