diff options
Diffstat (limited to 'meta/recipes-support/curl/curl/CVE-2022-27775.patch')
-rw-r--r-- | meta/recipes-support/curl/curl/CVE-2022-27775.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/meta/recipes-support/curl/curl/CVE-2022-27775.patch b/meta/recipes-support/curl/curl/CVE-2022-27775.patch new file mode 100644 index 0000000000..b3fe7b4494 --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2022-27775.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From 058f98dc3fe595f21dc26a5b9b1699e519ba5705 Mon Sep 17 00:00:00 2001 | ||
2 | From: Daniel Stenberg <daniel@haxx.se> | ||
3 | Date: Mon, 25 Apr 2022 11:48:00 +0200 | ||
4 | Subject: [PATCH] conncache: include the zone id in the "bundle" hashkey | ||
5 | |||
6 | Make connections to two separate IPv6 zone ids create separate | ||
7 | connections. | ||
8 | |||
9 | Reported-by: Harry Sintonen | ||
10 | Bug: https://curl.se/docs/CVE-2022-27775.html | ||
11 | Closes #8747 | ||
12 | --- | ||
13 | lib/conncache.c | 8 ++++++-- | ||
14 | 1 file changed, 6 insertions(+), 2 deletions(-) | ||
15 | |||
16 | CVE: CVE-2022-27775 | ||
17 | Upstream-Status: Backport [https://github.com/curl/curl/commit/058f98dc3fe595f21dc26a5b9b1699e519ba5705.patch] | ||
18 | Comment: Refreshed patch | ||
19 | Signed-off-by: Sana.Kazi <Sana.Kazi@kpit.com> | ||
20 | |||
21 | diff --git a/lib/conncache.c b/lib/conncache.c | ||
22 | index ec669b971dc3..8948b53fa500 100644 | ||
23 | --- a/lib/conncache.c | ||
24 | +++ b/lib/conncache.c | ||
25 | @@ -156,8 +156,12 @@ | ||
26 | /* report back which name we used */ | ||
27 | *hostp = hostname; | ||
28 | |||
29 | - /* put the number first so that the hostname gets cut off if too long */ | ||
30 | - msnprintf(buf, len, "%ld%s", port, hostname); | ||
31 | + /* put the numbers first so that the hostname gets cut off if too long */ | ||
32 | +#ifdef ENABLE_IPV6 | ||
33 | + msnprintf(buf, len, "%u/%ld/%s", conn->scope_id, port, hostname); | ||
34 | +#else | ||
35 | + msnprintf(buf, len, "%ld/%s", port, hostname); | ||
36 | +#endif | ||
37 | } | ||
38 | |||
39 | /* Returns number of connections currently held in the connection cache. | ||