diff options
| author | Zheng Wang <zyytlz.wz@163.com> | 2023-03-13 16:42:20 +0000 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2023-04-10 14:20:25 +0100 |
| commit | 3228cec23b8b29215e18090c6ba635840190993d (patch) | |
| tree | 0054e868a537481042fa5ec28ff066c8c4b2855a /tools/lib/python/kdoc/python_version.py | |
| parent | 50d0a7aea4809cef87979d4669911276aa23b71f (diff) | |
| download | linux-3228cec23b8b29215e18090c6ba635840190993d.tar.gz linux-3228cec23b8b29215e18090c6ba635840190993d.zip | |
media: rkvdec: fix use after free bug in rkvdec_remove
In rkvdec_probe, rkvdec->watchdog_work is bound with
rkvdec_watchdog_func. Then rkvdec_vp9_run may
be called to start the work.
If we remove the module which will call rkvdec_remove
to make cleanup, there may be a unfinished work.
The possible sequence is as follows, which will
cause a typical UAF bug.
Fix it by canceling the work before cleanup in rkvdec_remove.
CPU0 CPU1
|rkvdec_watchdog_func
rkvdec_remove |
rkvdec_v4l2_cleanup|
v4l2_m2m_release |
kfree(m2m_dev); |
|
| v4l2_m2m_get_curr_priv
| m2m_dev->curr_ctx //use
Fixes: cd33c830448b ("media: rkvdec: Add the rkvdec driver")
Signed-off-by: Zheng Wang <zyytlz.wz@163.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
