aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/task-analyzer.py
diff options
context:
space:
mode:
authorZheng Wang <[email protected]>2023-03-18 16:50:23 +0800
committerHans Verkuil <[email protected]>2023-04-11 17:10:10 +0200
commit30cf57da176cca80f11df0d9b7f71581fe601389 (patch)
tree730610a24c71562663c8abeecf45ebcad77db876 /tools/perf/scripts/python/task-analyzer.py
parent5abda7a16698d4d1f47af1168d8fa2c640116b4a (diff)
media: saa7134: fix use after free bug in saa7134_finidev due to race condition
In saa7134_initdev, it will call saa7134_hwinit1. There are three function invoking here: saa7134_video_init1, saa7134_ts_init1 and saa7134_vbi_init1. All of them will init a timer with same function. Take saa7134_video_init1 as an example. It'll bound &dev->video_q.timeout with saa7134_buffer_timeout. In buffer_activate, the timer funtcion is started. If we remove the module or device which will call saa7134_finidev 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 timer works accordingly before cleanup in saa7134_finidev. CPU0 CPU1 |saa7134_buffer_timeout saa7134_finidev | kfree(dev); | | | saa7134_buffer_next | //use dev Fixes: 1e7126b4a86a ("media: saa7134: Convert timers to use timer_setup()") Signed-off-by: Zheng Wang <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions