diff options
Diffstat (limited to '')
-rw-r--r-- | net/xdp/xsk.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c index 5c8e02d56..e3bdfc517 100644 --- a/net/xdp/xsk.c +++ b/net/xdp/xsk.c @@ -1127,6 +1127,8 @@ static int xsk_setsockopt(struct socket *sock, int level, int optname, struct xsk_queue **q; int entries; + if (optlen < sizeof(entries)) + return -EINVAL; if (copy_from_sockptr(&entries, optval, sizeof(entries))) return -EFAULT; |