[PATCH v3] media:exynos4-is: Fix a use after free in isp_video_release

Sylwester Nawrocki s.nawrocki at samsung.com
Tue Apr 27 14:48:15 BST 2021


On 27.04.2021 15:27, Lv Yunlong wrote:
> In isp_video_release, file->private_data is freed via
> _vb2_fop_release()->v4l2_fh_release(). But the freed
> file->private_data is still used in v4l2_fh_is_singular_file()
> ->v4l2_fh_is_singular(file->private_data), which is a use
> after free bug.
> 
> My patch sets file->private_data to NULL after _vb2_fop_release()
> to avoid the use after free, and uses a variable 'is_singular_file'
> to keep the original function unchanged.
> 
> Fixes: 34947b8aebe3f ("[media] exynos4-is: Add the FIMC-IS ISP capture DMA driver")
> Signed-off-by: Lv Yunlong <lyl2019 at mail.ustc.edu.cn>

Thanks,

Reviewed-by: Sylwester Nawrocki <s.nawrocki at samsung.com>



More information about the linux-arm-kernel mailing list