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 00a275ee227a..9f29a9ce6a92 100644 --- a/net/socket.c +++ b/net/socket.c @@ -91,6 +91,7 @@ #include <linux/xattr.h> #include <linux/seemp_api.h> #include <linux/seemp_instrumentation.h> +#include <linux/nospec.h> #include <asm/uaccess.h> #include <asm/unistd.h> @@ -2384,6 +2385,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)) |