diff options
| author | Peter Marko <peter.marko@siemens.com> | 2024-12-20 16:36:22 +0100 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2024-12-20 19:47:56 -0800 |
| commit | fdbec64d99592d679fd38d0b79f72d876bb6523f (patch) | |
| tree | f7e4ee6461652974fa4460179de18cf3b4a0b331 | |
| parent | 65cc05d6ee7d2fce561031c522ce73aff334b4e1 (diff) | |
| download | meta-openembedded-fdbec64d99592d679fd38d0b79f72d876bb6523f.tar.gz | |
memcached: upgrade 1.6.17 -> 1.6.33
Solves CVE-2023-46852 and CVE-2023-46853.
Upgrade done via "devtool upgrade".
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-networking/recipes-support/memcached/memcached/0001-Fix-function-protypes.patch | 110 | ||||
| -rw-r--r-- | meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch | 13 | ||||
| -rw-r--r-- | meta-networking/recipes-support/memcached/memcached_1.6.33.bb (renamed from meta-networking/recipes-support/memcached/memcached_1.6.17.bb) | 3 |
3 files changed, 10 insertions, 116 deletions
diff --git a/meta-networking/recipes-support/memcached/memcached/0001-Fix-function-protypes.patch b/meta-networking/recipes-support/memcached/memcached/0001-Fix-function-protypes.patch deleted file mode 100644 index 15ef54f80e..0000000000 --- a/meta-networking/recipes-support/memcached/memcached/0001-Fix-function-protypes.patch +++ /dev/null | |||
| @@ -1,110 +0,0 @@ | |||
| 1 | From 6021d3d60e64d9174f41515d2d962df9b5d7645e Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Mon, 29 Aug 2022 17:15:28 -0700 | ||
| 4 | Subject: [PATCH] Fix function protypes | ||
| 5 | |||
| 6 | clang-15+ has started diagnosing them as errors | ||
| 7 | |||
| 8 | thread.c:925:18: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] | ||
| 9 | | void STATS_UNLOCK() { | ||
| 10 | | ^ | ||
| 11 | | void | ||
| 12 | |||
| 13 | Upstream-Status: Submitted [https://github.com/memcached/memcached/pull/928] | ||
| 14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 15 | --- | ||
| 16 | assoc.c | 4 ++-- | ||
| 17 | memcached.c | 4 ++-- | ||
| 18 | slabs.c | 2 +- | ||
| 19 | testapp.c | 2 +- | ||
| 20 | thread.c | 4 ++-- | ||
| 21 | 5 files changed, 8 insertions(+), 8 deletions(-) | ||
| 22 | |||
| 23 | diff --git a/assoc.c b/assoc.c | ||
| 24 | index bc68695..01063a9 100644 | ||
| 25 | --- a/assoc.c | ||
| 26 | +++ b/assoc.c | ||
| 27 | @@ -261,7 +261,7 @@ static void *assoc_maintenance_thread(void *arg) { | ||
| 28 | |||
| 29 | static pthread_t maintenance_tid; | ||
| 30 | |||
| 31 | -int start_assoc_maintenance_thread() { | ||
| 32 | +int start_assoc_maintenance_thread(void) { | ||
| 33 | int ret; | ||
| 34 | char *env = getenv("MEMCACHED_HASH_BULK_MOVE"); | ||
| 35 | if (env != NULL) { | ||
| 36 | @@ -279,7 +279,7 @@ int start_assoc_maintenance_thread() { | ||
| 37 | return 0; | ||
| 38 | } | ||
| 39 | |||
| 40 | -void stop_assoc_maintenance_thread() { | ||
| 41 | +void stop_assoc_maintenance_thread(void) { | ||
| 42 | mutex_lock(&maintenance_lock); | ||
| 43 | do_run_maintenance_thread = 0; | ||
| 44 | pthread_cond_signal(&maintenance_cond); | ||
| 45 | diff --git a/memcached.c b/memcached.c | ||
| 46 | index 7871fe8..4d3b54a 100644 | ||
| 47 | --- a/memcached.c | ||
| 48 | +++ b/memcached.c | ||
| 49 | @@ -84,7 +84,7 @@ static int try_read_command_udp(conn *c); | ||
| 50 | static enum try_read_result try_read_network(conn *c); | ||
| 51 | static enum try_read_result try_read_udp(conn *c); | ||
| 52 | |||
| 53 | -static int start_conn_timeout_thread(); | ||
| 54 | +static int start_conn_timeout_thread(void); | ||
| 55 | |||
| 56 | /* stats */ | ||
| 57 | static void stats_init(void); | ||
| 58 | @@ -374,7 +374,7 @@ static void *conn_timeout_thread(void *arg) { | ||
| 59 | return NULL; | ||
| 60 | } | ||
| 61 | |||
| 62 | -static int start_conn_timeout_thread() { | ||
| 63 | +static int start_conn_timeout_thread(void) { | ||
| 64 | int ret; | ||
| 65 | |||
| 66 | if (settings.idle_timeout == 0) | ||
| 67 | diff --git a/slabs.c b/slabs.c | ||
| 68 | index 3c78d8a..0dadd35 100644 | ||
| 69 | --- a/slabs.c | ||
| 70 | +++ b/slabs.c | ||
| 71 | @@ -638,7 +638,7 @@ static void *memory_allocate(size_t size) { | ||
| 72 | } | ||
| 73 | |||
| 74 | /* Must only be used if all pages are item_size_max */ | ||
| 75 | -static void memory_release() { | ||
| 76 | +static void memory_release(void) { | ||
| 77 | void *p = NULL; | ||
| 78 | if (mem_base != NULL) | ||
| 79 | return; | ||
| 80 | diff --git a/testapp.c b/testapp.c | ||
| 81 | index 5face54..387a847 100644 | ||
| 82 | --- a/testapp.c | ||
| 83 | +++ b/testapp.c | ||
| 84 | @@ -80,7 +80,7 @@ static struct conn *con = NULL; | ||
| 85 | static bool allow_closed_read = false; | ||
| 86 | static bool enable_ssl = false; | ||
| 87 | |||
| 88 | -static void close_conn() { | ||
| 89 | +static void close_conn(void) { | ||
| 90 | if (con == NULL) return; | ||
| 91 | #ifdef TLS | ||
| 92 | if (con->ssl) { | ||
| 93 | diff --git a/thread.c b/thread.c | ||
| 94 | index d5ed052..f5efdc3 100644 | ||
| 95 | --- a/thread.c | ||
| 96 | +++ b/thread.c | ||
| 97 | @@ -918,11 +918,11 @@ enum store_item_type store_item(item *item, int comm, conn* c) { | ||
| 98 | |||
| 99 | /******************************* GLOBAL STATS ******************************/ | ||
| 100 | |||
| 101 | -void STATS_LOCK() { | ||
| 102 | +void STATS_LOCK(void) { | ||
| 103 | pthread_mutex_lock(&stats_lock); | ||
| 104 | } | ||
| 105 | |||
| 106 | -void STATS_UNLOCK() { | ||
| 107 | +void STATS_UNLOCK(void) { | ||
| 108 | pthread_mutex_unlock(&stats_lock); | ||
| 109 | } | ||
| 110 | |||
diff --git a/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch b/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch index 45428ed234..26281e73ef 100644 --- a/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch +++ b/meta-networking/recipes-support/memcached/memcached/memcached-add-hugetlbfs-check.patch | |||
| @@ -1,4 +1,7 @@ | |||
| 1 | memcached: add knob to detect whether hugetlbfs are checked | 1 | From dfa90817a08f206f7e2dbba44d913968ae7f7d94 Mon Sep 17 00:00:00 2001 |
| 2 | From: Chong Lu <Chong.Lu@windriver.com> | ||
| 3 | Date: Tue, 19 Aug 2014 17:38:32 +0800 | ||
| 4 | Subject: [PATCH] memcached: add knob to detect whether hugetlbfs are checked | ||
| 2 | 5 | ||
| 3 | Add knob to detect whether hugetlbfs are checked or not. | 6 | Add knob to detect whether hugetlbfs are checked or not. |
| 4 | 7 | ||
| @@ -6,12 +9,14 @@ Upstream-Status: Pending | |||
| 6 | 9 | ||
| 7 | Signed-off-by: Chong Lu <Chong.Lu@windriver.com> | 10 | Signed-off-by: Chong Lu <Chong.Lu@windriver.com> |
| 8 | --- | 11 | --- |
| 9 | configure.ac | 7 ++++++- | 12 | configure.ac | 6 +++++- |
| 10 | 1 file changed, 6 insertions(+), 1 deletion(-) | 13 | 1 file changed, 5 insertions(+), 1 deletion(-) |
| 11 | 14 | ||
| 15 | diff --git a/configure.ac b/configure.ac | ||
| 16 | index 6f2ef97..bd7dd96 100644 | ||
| 12 | --- a/configure.ac | 17 | --- a/configure.ac |
| 13 | +++ b/configure.ac | 18 | +++ b/configure.ac |
| 14 | @@ -488,8 +488,12 @@ if test "x$enable_static" = "xyes"; then | 19 | @@ -559,8 +559,12 @@ if test "x$enable_static" = "xyes"; then |
| 15 | fi | 20 | fi |
| 16 | 21 | ||
| 17 | dnl ---------------------------------------------------------------------------- | 22 | dnl ---------------------------------------------------------------------------- |
diff --git a/meta-networking/recipes-support/memcached/memcached_1.6.17.bb b/meta-networking/recipes-support/memcached/memcached_1.6.33.bb index dabe393573..346754c6ad 100644 --- a/meta-networking/recipes-support/memcached/memcached_1.6.17.bb +++ b/meta-networking/recipes-support/memcached/memcached_1.6.33.bb | |||
| @@ -21,9 +21,8 @@ RDEPENDS:${PN} += "perl perl-module-posix perl-module-autoloader \ | |||
| 21 | 21 | ||
| 22 | SRC_URI = "http://www.memcached.org/files/${BP}.tar.gz \ | 22 | SRC_URI = "http://www.memcached.org/files/${BP}.tar.gz \ |
| 23 | file://memcached-add-hugetlbfs-check.patch \ | 23 | file://memcached-add-hugetlbfs-check.patch \ |
| 24 | file://0001-Fix-function-protypes.patch \ | ||
| 25 | " | 24 | " |
| 26 | SRC_URI[sha256sum] = "2055e373613d8fc21529aff9f0adce3e23b9ce01ba0478d30e7941d9f2bd1224" | 25 | SRC_URI[sha256sum] = "707f74c4c6876b61532b998ca8f118b0b82a0d96365d7a1d70ebfc40dfe83dad" |
| 27 | 26 | ||
| 28 | CVE_STATUS[CVE-2022-26635] = "disputed: this is a problem of applications using php-memcached inproperly" | 27 | CVE_STATUS[CVE-2022-26635] = "disputed: this is a problem of applications using php-memcached inproperly" |
| 29 | 28 | ||
