mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-09-18 23:09:29 +02:00
ntsync: reject wait ioctls with zero owner
setup_wait() already validates pad and flags but not owner, while Documentation/userspace-api/ntsync.rst requires EINVAL when owner is zero. Reject early before queueing waiters. Signed-off-by: Iván Ezequiel Rodriguez <ivanrwcm25@gmail.com> Signed-off-by: Griffin Kroah-Hartman <griffin@kroah.com> Reviewed-by: Elizabeth Figura <zfigura@codeweavers.com> Signed-off-by: Elizabeth Figura <zfigura@codeweavers.com> Link: https://patch.msgid.link/20260723201301.11826-4-zfigura@codeweavers.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
1d076f7524
commit
61611481f7
@@ -875,6 +875,9 @@ static int setup_wait(struct ntsync_device *dev,
|
||||
if (args->pad || (args->flags & ~NTSYNC_WAIT_REALTIME))
|
||||
return -EINVAL;
|
||||
|
||||
if (!args->owner)
|
||||
return -EINVAL;
|
||||
|
||||
if (size >= sizeof(fds))
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user