svn commit: r314868 - head/sys/compat/linux
Dmitry Chagin
dchagin at FreeBSD.org
Tue Mar 7 17:12:23 UTC 2017
Author: dchagin
Date: Tue Mar 7 17:12:22 2017
New Revision: 314868
URL: https://svnweb.freebsd.org/changeset/base/314868
Log:
Linux semop system call return EINVAL in case when the invalid nsops
or semid values specified.
MFC after: 1 month
Modified:
head/sys/compat/linux/linux_ipc.c
Modified: head/sys/compat/linux/linux_ipc.c
==============================================================================
--- head/sys/compat/linux/linux_ipc.c Tue Mar 7 17:09:12 2017 (r314867)
+++ head/sys/compat/linux/linux_ipc.c Tue Mar 7 17:12:22 2017 (r314868)
@@ -513,6 +513,8 @@ linux_semop(struct thread *td, struct li
int nsops;
} */ bsd_args;
+ if (args->nsops < 1 || args->semid < 0)
+ return (EINVAL);
bsd_args.semid = args->semid;
bsd_args.sops = PTRIN(args->tsops);
bsd_args.nsops = args->nsops;
More information about the svn-src-all
mailing list