On 06/05/2024 07:58, Dikshita Agarwal wrote:
There appears to be a possible use after free with vdec_close(). The firmware will add buffer release work to the work queue through HFI callbacks as a normal part of decoding. Randomly closing the decoder device from userspace during normal decoding can incur a read after free for inst.
Fix it by cancelling the work in vdec_close.
Cc: stable@vger.kernel.org Fixes: af2c3834c ("media: venus: adding core part and helper functions")
Please run scripts/checkpatch.pl and fix reported warnings. Then please run `scripts/checkpatch.pl --strict` and (probably) fix more warnings. Some warnings can be ignored, especially from --strict run, but the code here looks like it needs a fix. Feel free to get in touch if the warning is not clear.
This is written in your instruction - go/upstream - so be sure you always follow it fully.
Best regards, Krzysztof