From dbbf0dcdfc9a5d90d5146bb195fce97064d92c76 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 7 May 2024 04:18:06 +0200 Subject: Adding upstream version 6.1.90. Signed-off-by: Daniel Baumann --- net/xdp/xsk.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'net/xdp') 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; -- cgit v1.2.3