diff options
| author | Wentao Liang <vulab@iscas.ac.cn> | 2026-09-17 10:00:10 +0000 |
|---|---|---|
| committer | Sakari Ailus <sakari.ailus@linux.intel.com> | 2026-09-17 22:55:46 +0300 |
| commit | f9be93338c2fbaffdbda4f89045e879932e827ca (patch) | |
| tree | 5bdc940b5b764fb53abefc2e461442d528264306 /include/linux | |
| parent | 7eef49c164615a6460dc49448b67444a65997017 (diff) | |
media: ivsc: Fix csi_dev use-after-free in mei_ace_setup_dev_link()
device_link_add() only takes a reference to the supplier when the
link is created successfully. When it fails it returns NULL without
taking one, so the put_device(csi_dev) before the error check can
drop the last reference to csi_dev and dev_name(csi_dev) then
dereferences a freed device.
Move the put_device() below the error check and release the
reference through the existing err_put label on the failure path so
that csi_dev is no longer touched after it has been put.
Fixes: 765abb76f51f ("media: ivsc: Release csi_dev reference early in mei_ace_setup_dev_link()")
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
