diff options
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/socket.c b/net/socket.c index 85633622c94d..4ac3b834cce9 100644 --- a/net/socket.c +++ b/net/socket.c @@ -89,6 +89,7 @@ #include <linux/magic.h> #include <linux/slab.h> #include <linux/xattr.h> +#include <linux/nospec.h> #include <linux/uaccess.h> #include <asm/unistd.h> @@ -2522,6 +2523,7 @@ SYSCALL_DEFINE2(socketcall, int, call, unsigned long __user *, args) if (call < 1 || call > SYS_SENDMMSG) return -EINVAL; + call = array_index_nospec(call, SYS_SENDMMSG + 1); len = nargs[call]; if (len > sizeof(a)) |