]> git.baikalelectronics.ru Git - kernel.git/commit
media: v4l2-core: Avoid the dangling pointer in v4l2_fh_release
authorLv Yunlong <lyl2019@mail.ustc.edu.cn>
Sun, 9 May 2021 08:24:02 +0000 (10:24 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 2 Jun 2021 11:17:44 +0000 (13:17 +0200)
commitcf3fe1a9b4b1320d252db148b78ee2e6f5f34f9b
tree15797b4f8f8d774e8ede87ffff64cba0d510781b
parent3fa305dd21bad1e6d3aa819cca9f1ae2a30d8290
media: v4l2-core: Avoid the dangling pointer in v4l2_fh_release

A use after free bug caused by the dangling pointer
filp->privitate_data in v4l2_fh_release.
See https://lore.kernel.org/patchwork/patch/1419058/.

My patch sets the dangling pointer to NULL to provide
robust.

Signed-off-by: Lv Yunlong <lyl2019@mail.ustc.edu.cn>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/v4l2-core/v4l2-fh.c