diff options
author | Lin Ma <linma@zju.edu.cn> | 2022-08-07 17:59:52 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-11-25 13:08:23 +0300 |
commit | 0fc044b2b5e2d05a1fa1fb0d7f270367a7855d79 (patch) | |
tree | bbf176c361eb5d46f8b79d923239f42363c5ba9a /scripts/generate_rust_analyzer.py | |
parent | 9b7de3c2daf503f86ab0641f377402b8d7f5e485 (diff) | |
download | linux-0fc044b2b5e2d05a1fa1fb0d7f270367a7855d79.tar.xz |
media: dvbdev: adopts refcnt to avoid UAF
dvb_unregister_device() is known that prone to use-after-free.
That is, the cleanup from dvb_unregister_device() releases the dvb_device
even if there are pointers stored in file->private_data still refer to it.
This patch adds a reference counter into struct dvb_device and delays its
deallocation until no pointer refers to the object.
Link: https://lore.kernel.org/linux-media/20220807145952.10368-1-linma@zju.edu.cn
Signed-off-by: Lin Ma <linma@zju.edu.cn>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions