diff options
author | dchagin <dchagin@FreeBSD.org> | 2017-04-15 15:13:54 +0000 |
---|---|---|
committer | dchagin <dchagin@FreeBSD.org> | 2017-04-15 15:13:54 +0000 |
commit | 07f47241160949df360e4baaca30dca8a696cee9 (patch) | |
tree | 1d849276b39e86f8f3b447c9a9af8c822833449f /sys/compat/linux | |
parent | f8f0a0cde5408c3e9f8433bee977d11cf30ca559 (diff) | |
download | FreeBSD-src-07f47241160949df360e4baaca30dca8a696cee9.zip FreeBSD-src-07f47241160949df360e4baaca30dca8a696cee9.tar.gz |
MFC r314868:
Linux semop system call return EINVAL in case when the invalid nsops
or semid values specified.
Diffstat (limited to 'sys/compat/linux')
-rw-r--r-- | sys/compat/linux/linux_ipc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_ipc.c b/sys/compat/linux/linux_ipc.c index a8c5509..082fec1 100644 --- a/sys/compat/linux/linux_ipc.c +++ b/sys/compat/linux/linux_ipc.c @@ -513,6 +513,8 @@ linux_semop(struct thread *td, struct linux_semop_args *args) 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; |