ksmbd: call rcu_barrier() in ksmbd_server_exit()
commit eb307d09fe15844fdaebeb8cc8c9b9e925430aa5 upstream. racy issue is triggered the bug by racing between closing a connection and rmmod. In ksmbd, rcu_barrier() is not called at module unload time, so nothing prevents ksmbd from getting unloaded while it still has RCU callbacks pending. It leads to trigger unintended execution of kernel code locally and use to defeat protections such as Kernel Lockdown Cc: stable@vger.kernel.org Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-20477 Signed-off-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
bd80d35725
commit
b80422474f
@ -614,6 +614,7 @@ static int __init ksmbd_server_init(void)
|
||||
static void __exit ksmbd_server_exit(void)
|
||||
{
|
||||
ksmbd_server_shutdown();
|
||||
rcu_barrier();
|
||||
ksmbd_release_inode_hash();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user