-
Notifications
You must be signed in to change notification settings - Fork 542
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AUTO-CHERRYPICK] Patch CVE-2024-24806 in nodejs18 - branch main (#8164)
Co-authored-by: suresh-thelkar <suresh.thelkar@yahoo.com> Co-authored-by: Pawel Winogrodzki <pawelwi@microsoft.com>
- Loading branch information
1 parent
d38bc3c
commit 351ccbc
Showing
2 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
From 9c2cf90e5b3952a202a0fb8435470eaa527d3f63 Mon Sep 17 00:00:00 2001 | ||
From: Suresh Thelkar <sthelkar@microsoft.com> | ||
Date: Tue, 27 Feb 2024 10:24:03 +0530 | ||
Subject: [PATCH] Patch CVE-2024-24806 | ||
|
||
Upstream patch details are given below. | ||
https://github.com/libuv/libuv/commit/0f2d7e784a256b54b2385043438848047bc2a629 | ||
--- | ||
deps/uv/src/idna.c | 6 ++++-- | ||
1 file changed, 4 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/deps/uv/src/idna.c b/deps/uv/src/idna.c | ||
index 93d982ca..197650af 100644 | ||
--- a/deps/uv/src/idna.c | ||
+++ b/deps/uv/src/idna.c | ||
@@ -308,8 +308,10 @@ long uv__idna_toascii(const char* s, const char* se, char* d, char* de) { | ||
return rc; | ||
} | ||
|
||
- if (d < de) | ||
- *d++ = '\0'; | ||
+ if (d >= de) | ||
+ return UV_EINVAL; | ||
+ | ||
+ *d++ = '\0'; | ||
|
||
return d - ds; /* Number of bytes written. */ | ||
} | ||
-- | ||
2.34.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters