summaryrefslogtreecommitdiffstats
path: root/drivers/net/tap.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:16:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:16:59 +0000
commit7bd37cf4cf5122db89961faa20e3f1866cfdb452 (patch)
tree1f8e4ad6fa6c57a612b8a939f0e6d758163214df /drivers/net/tap.c
parentAdding debian version 6.9.11-1. (diff)
downloadlinux-7bd37cf4cf5122db89961faa20e3f1866cfdb452.tar.xz
linux-7bd37cf4cf5122db89961faa20e3f1866cfdb452.zip
Merging upstream version 6.9.12.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/net/tap.c')
-rw-r--r--drivers/net/tap.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/tap.c b/drivers/net/tap.c
index 9f0495e8df..feeeac715c 100644
--- a/drivers/net/tap.c
+++ b/drivers/net/tap.c
@@ -1177,6 +1177,11 @@ static int tap_get_user_xdp(struct tap_queue *q, struct xdp_buff *xdp)
struct sk_buff *skb;
int err, depth;
+ if (unlikely(xdp->data_end - xdp->data < ETH_HLEN)) {
+ err = -EINVAL;
+ goto err;
+ }
+
if (q->flags & IFF_VNET_HDR)
vnet_hdr_len = READ_ONCE(q->vnet_hdr_sz);