aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-connectivity/libuv/libuv/CVE-2024-24806-2.patch
blob: f231cf96b9733f04e0f3d2bf5d396b68b42fb20d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 6b8bce71f3ea435fcb286d49df1204c23ef3ea01 Mon Sep 17 00:00:00 2001
From: Ben Noordhuis <info@bnoordhuis.nl>
Date: Thu, 18 Jan 2024 14:52:38 +0100
Subject: [PATCH] fix: reject zero-length idna inputs

CVE: CVE-2024-24806
Upstream commit: 3530bcc30350d4a6ccf35d2f7b33e23292b9de70

Fixes: https://github.com/libuv/libuv/security/advisories/GHSA-f74f-cvh7-c6q6
---
 src/idna.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/idna.c b/src/idna.c
index 874f1caf..97edf06c 100644
--- a/src/idna.c
+++ b/src/idna.c
@@ -254,6 +254,9 @@ long uv__idna_toascii(const char* s, const char* se, char* d, char* de) {
   char* ds;
   int rc;
 
+  if (s == se)
+    return UV_EINVAL;
+
   ds = d;
 
   for (si = s; si < se; /* empty */) {
-- 
2.43.0