Generic Syscall Unsafe
|Reported by:||bonefish||Owned by:||axeld|
There's a race condition between the call to the generic syscall hook and unregister_generic_syscall(). The hook function can be called anytime after the generic syscall has already been unregistered, even after the module implementing the hook has already been unloaded (inevitably crashing the kernel).
The obvious solution presenting itself: unregister_generic_syscall() could wait until all hook invocations are done. This would require an additional "valid" flag (cleared by unregister, checked before calling the hook), call counter, and condition variable for each hook.