diff options
| author | Sanjay Chitroda <sanjay.chitroda@einfochips.com> | 2023-09-22 01:30:55 -0700 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2023-09-29 04:33:43 -1000 |
| commit | 529fa41487797cf4773c6572bf772a72914da93d (patch) | |
| tree | aca03a489d98d88edd70830385414ede7ad00ad8 | |
| parent | 0fb8a7bac1c3aefd9049c567d049a8331378a646 (diff) | |
| download | poky-529fa41487797cf4773c6572bf772a72914da93d.tar.gz | |
curl: Add CVE-2023-28320 follow-up fix
References:
https://nvd.nist.gov/vuln/detail/CVE-2023-28320
https://security-tracker.debian.org/tracker/CVE-2023-28320
Upstream Patch:
Introduced by: https://github.com/curl/curl/commit/3c49b405de4f (curl-7_9_8)
Fixed by: https://github.com/curl/curl/commit/13718030ad4b (curl-8_1_0)
Follow-up: https://github.com/curl/curl/commit/f446258f0269 (curl-8_1_0)
(From OE-Core rev: 5d6d4768693f9baa9b801e87d4d2aed0d9792613)
Signed-off-by: Sanjay Chitroda <sanjay.chitroda@einfochips.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
| -rw-r--r-- | meta/recipes-support/curl/curl/CVE-2023-28320-fol1.patch | 80 | ||||
| -rw-r--r-- | meta/recipes-support/curl/curl_8.0.1.bb | 1 |
2 files changed, 81 insertions, 0 deletions
diff --git a/meta/recipes-support/curl/curl/CVE-2023-28320-fol1.patch b/meta/recipes-support/curl/curl/CVE-2023-28320-fol1.patch new file mode 100644 index 0000000000..3c06d8c518 --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2023-28320-fol1.patch | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | From e442feb37ba25c80b8480b908d1c570fd9f41c5e Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Daniel Stenberg <daniel@haxx.se> | ||
| 3 | Date: Tue, 16 May 2023 23:40:42 +0200 | ||
| 4 | Subject: [PATCH] hostip: include easy_lock.h before using | ||
| 5 | GLOBAL_INIT_IS_THREADSAFE | ||
| 6 | |||
| 7 | Since that header file is the only place that define can be defined. | ||
| 8 | |||
| 9 | Reported-by: Marc Deslauriers | ||
| 10 | |||
| 11 | Follow-up to 13718030ad4b3209 | ||
| 12 | |||
| 13 | Closes #11121 | ||
| 14 | |||
| 15 | CVE: CVE-2023-28320 | ||
| 16 | Upstream-Status: Backport [https://github.com/curl/curl/commit/f446258f0269] | ||
| 17 | |||
| 18 | (cherry picked from commit f446258f0269a62289cca0210157cb8558d0edc3) | ||
| 19 | Signed-off-by: Sanjay Chitroda <sanjay.chitroda@einfochips.com> | ||
| 20 | |||
| 21 | --- | ||
| 22 | lib/hostip.c | 10 ++++------ | ||
| 23 | lib/hostip.h | 9 --------- | ||
| 24 | 2 files changed, 4 insertions(+), 15 deletions(-) | ||
| 25 | |||
| 26 | diff --git a/lib/hostip.c b/lib/hostip.c | ||
| 27 | index d6906a2e8..2d26b5628 100644 | ||
| 28 | --- a/lib/hostip.c | ||
| 29 | +++ b/lib/hostip.c | ||
| 30 | @@ -70,6 +70,8 @@ | ||
| 31 | #include <SystemConfiguration/SCDynamicStoreCopySpecific.h> | ||
| 32 | #endif | ||
| 33 | |||
| 34 | +#include "easy_lock.h" | ||
| 35 | + | ||
| 36 | #if defined(CURLRES_SYNCH) && \ | ||
| 37 | defined(HAVE_ALARM) && \ | ||
| 38 | defined(SIGALRM) && \ | ||
| 39 | @@ -79,10 +81,6 @@ | ||
| 40 | #define USE_ALARM_TIMEOUT | ||
| 41 | #endif | ||
| 42 | |||
| 43 | -#ifdef USE_ALARM_TIMEOUT | ||
| 44 | -#include "easy_lock.h" | ||
| 45 | -#endif | ||
| 46 | - | ||
| 47 | #define MAX_HOSTCACHE_LEN (255 + 7) /* max FQDN + colon + port number + zero */ | ||
| 48 | |||
| 49 | /* | ||
| 50 | @@ -265,8 +263,8 @@ void Curl_hostcache_prune(struct Curl_easy *data) | ||
| 51 | /* Beware this is a global and unique instance. This is used to store the | ||
| 52 | return address that we can jump back to from inside a signal handler. This | ||
| 53 | is not thread-safe stuff. */ | ||
| 54 | -sigjmp_buf curl_jmpenv; | ||
| 55 | -curl_simple_lock curl_jmpenv_lock; | ||
| 56 | +static sigjmp_buf curl_jmpenv; | ||
| 57 | +static curl_simple_lock curl_jmpenv_lock; | ||
| 58 | #endif | ||
| 59 | |||
| 60 | /* lookup address, returns entry if found and not stale */ | ||
| 61 | diff --git a/lib/hostip.h b/lib/hostip.h | ||
| 62 | index 4b5481f65..0dd19e87c 100644 | ||
| 63 | --- a/lib/hostip.h | ||
| 64 | +++ b/lib/hostip.h | ||
| 65 | @@ -186,15 +186,6 @@ Curl_cache_addr(struct Curl_easy *data, struct Curl_addrinfo *addr, | ||
| 66 | #define CURL_INADDR_NONE INADDR_NONE | ||
| 67 | #endif | ||
| 68 | |||
| 69 | -#ifdef HAVE_SIGSETJMP | ||
| 70 | -/* Forward-declaration of variable defined in hostip.c. Beware this | ||
| 71 | - * is a global and unique instance. This is used to store the return | ||
| 72 | - * address that we can jump back to from inside a signal handler. | ||
| 73 | - * This is not thread-safe stuff. | ||
| 74 | - */ | ||
| 75 | -extern sigjmp_buf curl_jmpenv; | ||
| 76 | -#endif | ||
| 77 | - | ||
| 78 | /* | ||
| 79 | * Function provided by the resolver backend to set DNS servers to use. | ||
| 80 | */ | ||
diff --git a/meta/recipes-support/curl/curl_8.0.1.bb b/meta/recipes-support/curl/curl_8.0.1.bb index bcfe4a6088..708f622fe1 100644 --- a/meta/recipes-support/curl/curl_8.0.1.bb +++ b/meta/recipes-support/curl/curl_8.0.1.bb | |||
| @@ -18,6 +18,7 @@ SRC_URI = " \ | |||
| 18 | file://CVE-2023-28320.patch \ | 18 | file://CVE-2023-28320.patch \ |
| 19 | file://CVE-2023-28321.patch \ | 19 | file://CVE-2023-28321.patch \ |
| 20 | file://CVE-2023-32001.patch \ | 20 | file://CVE-2023-32001.patch \ |
| 21 | file://CVE-2023-28320-fol1.patch \ | ||
| 21 | " | 22 | " |
| 22 | SRC_URI[sha256sum] = "0a381cd82f4d00a9a334438b8ca239afea5bfefcfa9a1025f2bf118e79e0b5f0" | 23 | SRC_URI[sha256sum] = "0a381cd82f4d00a9a334438b8ca239afea5bfefcfa9a1025f2bf118e79e0b5f0" |
| 23 | 24 | ||
