md: fix uaf in md_wakeup_thread
hulk inclusion category: bugfix bugzilla: 188227, https://gitee.com/openeuler/kernel/issues/I6AG8P CVE: NA -------------------------------- There is no lock protection in md_wakeup_thread() and sync_thread might be freed during wake up as below. Use pers_lock to protect it. T1 T2 md_start_sync md_register_thread md_wakeup_thread raid1d md_check_recovery md_reap_sync_thread md_unregister_thread kfree wake_up ->sync_thread was freed Fixes: fac05f256691f ("md: don't start resync thread directly from md thread") Signed-off-by:Li Nan <linan122@huawei.com> Reviewed-by:
Hou Tao <houtao1@huawei.com> Signed-off-by:
Yongqiang Liu <liuyongqiang13@huawei.com>
Loading
Please sign in to comment