summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2023-02-08 08:21:00 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-02-24 16:41:46 +0000
commita65d579eb6ca7c485aea97a8cdd991b5871e8ec3 (patch)
treedd6c9212e88d769376a4c098ed4097c759bda5a3 /meta
parentd2e5098a8f9633153cc9091057f94c7d846ccbf7 (diff)
downloadpoky-a65d579eb6ca7c485aea97a8cdd991b5871e8ec3.tar.gz
apr-util: update 1.6.1 -> 1.6.3
Changes with APR-util 1.6.3 *) Correct a packaging issue in 1.6.2. The contents of the release were correct, but the top level directory was misnamed. Changes with APR-util 1.6.2 *) SECURITY: CVE-2022-25147 (cve.mitre.org) Integer Overflow or Wraparound vulnerability in apr_base64 functions of Apache Portable Runtime Utility (APR-util) allows an attacker to write beyond bounds of a buffer. *) Teach configure how to find and build against MariaDB 10.2. PR 61517 [Kris Karas <bugs-a17 moonlit-rail.com>] *) apr_crypto_commoncrypto: Remove stray reference to -lcrypto that prevented commoncrypto being enabled. [Graham Leggett] *) Add --tag=CC to libtool invocations. PR 62640. [Michael Osipov] *) apr_dbm_gdbm: Fix handling of error codes. This makes gdbm 1.14 work. apr_dbm_gdbm will now also return error codes starting with APR_OS_START_USEERR, as apr_dbm_berkleydb does, instead of always returning APR_EGENERAL. [Stefan Fritsch] Drop backport. (From OE-Core rev: e24b38a14b3520648ec418783fb74fcf61df7ff2) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit dca707f9fecc805503e17f6db3e4c88069ac0125) Signed-off-by: Steve Sakoman <steve@sakoman.com> (cherry picked from commit 43cd36b178ebb602edd5919c26f8b8642736a3a8) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-support/apr/apr-util/0001-Fix-error-handling-in-gdbm.patch134
-rw-r--r--meta/recipes-support/apr/apr-util_1.6.3.bb (renamed from meta/recipes-support/apr/apr-util_1.6.1.bb)6
2 files changed, 2 insertions, 138 deletions
diff --git a/meta/recipes-support/apr/apr-util/0001-Fix-error-handling-in-gdbm.patch b/meta/recipes-support/apr/apr-util/0001-Fix-error-handling-in-gdbm.patch
deleted file mode 100644
index 6f27876a7f..0000000000
--- a/meta/recipes-support/apr/apr-util/0001-Fix-error-handling-in-gdbm.patch
+++ /dev/null
@@ -1,134 +0,0 @@
1From 6b638fa9afbeb54dfa19378e391465a5284ce1ad Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Wed, 12 Sep 2018 17:16:36 +0800
4Subject: [PATCH] Fix error handling in gdbm
5
6Only check for gdbm_errno if the return value of the called gdbm_*
7function says so. This fixes apr-util with gdbm 1.14, which does not
8seem to always reset gdbm_errno.
9
10Also make the gdbm driver return error codes starting with
11APR_OS_START_USEERR instead of always returning APR_EGENERAL. This is
12what the berkleydb driver already does.
13
14Also ensure that dsize is 0 if dptr == NULL.
15
16Upstream-Status: Backport [https://svn.apache.org/viewvc?view=revision&amp;revision=1825311]
17
18Signed-off-by: Changqing Li <changqing.li@windriver.com>
19---
20 dbm/apr_dbm_gdbm.c | 47 +++++++++++++++++++++++++++++------------------
21 1 file changed, 29 insertions(+), 18 deletions(-)
22
23diff --git a/dbm/apr_dbm_gdbm.c b/dbm/apr_dbm_gdbm.c
24index 749447a..1c86327 100644
25--- a/dbm/apr_dbm_gdbm.c
26+++ b/dbm/apr_dbm_gdbm.c
27@@ -36,13 +36,25 @@
28 static apr_status_t g2s(int gerr)
29 {
30 if (gerr == -1) {
31- /* ### need to fix this */
32- return APR_EGENERAL;
33+ if (gdbm_errno == GDBM_NO_ERROR)
34+ return APR_SUCCESS;
35+ return APR_OS_START_USEERR + gdbm_errno;
36 }
37
38 return APR_SUCCESS;
39 }
40
41+static apr_status_t gdat2s(datum d)
42+{
43+ if (d.dptr == NULL) {
44+ if (gdbm_errno == GDBM_NO_ERROR || gdbm_errno == GDBM_ITEM_NOT_FOUND)
45+ return APR_SUCCESS;
46+ return APR_OS_START_USEERR + gdbm_errno;
47+ }
48+
49+ return APR_SUCCESS;
50+}
51+
52 static apr_status_t datum_cleanup(void *dptr)
53 {
54 if (dptr)
55@@ -53,22 +65,15 @@ static apr_status_t datum_cleanup(void *dptr)
56
57 static apr_status_t set_error(apr_dbm_t *dbm, apr_status_t dbm_said)
58 {
59- apr_status_t rv = APR_SUCCESS;
60
61- /* ### ignore whatever the DBM said (dbm_said); ask it explicitly */
62+ dbm->errcode = dbm_said;
63
64- if ((dbm->errcode = gdbm_errno) == GDBM_NO_ERROR) {
65+ if (dbm_said == APR_SUCCESS)
66 dbm->errmsg = NULL;
67- }
68- else {
69- dbm->errmsg = gdbm_strerror(gdbm_errno);
70- rv = APR_EGENERAL; /* ### need something better */
71- }
72-
73- /* captured it. clear it now. */
74- gdbm_errno = GDBM_NO_ERROR;
75+ else
76+ dbm->errmsg = gdbm_strerror(dbm_said - APR_OS_START_USEERR);
77
78- return rv;
79+ return dbm_said;
80 }
81
82 /* --------------------------------------------------------------------------
83@@ -107,7 +112,7 @@ static apr_status_t vt_gdbm_open(apr_dbm_t **pdb, const char *pathname,
84 NULL);
85
86 if (file == NULL)
87- return APR_EGENERAL; /* ### need a better error */
88+ return APR_OS_START_USEERR + gdbm_errno; /* ### need a better error */
89
90 /* we have an open database... return it */
91 *pdb = apr_pcalloc(pool, sizeof(**pdb));
92@@ -141,10 +146,12 @@ static apr_status_t vt_gdbm_fetch(apr_dbm_t *dbm, apr_datum_t key,
93 if (pvalue->dptr)
94 apr_pool_cleanup_register(dbm->pool, pvalue->dptr, datum_cleanup,
95 apr_pool_cleanup_null);
96+ else
97+ pvalue->dsize = 0;
98
99 /* store the error info into DBM, and return a status code. Also, note
100 that *pvalue should have been cleared on error. */
101- return set_error(dbm, APR_SUCCESS);
102+ return set_error(dbm, gdat2s(rd));
103 }
104
105 static apr_status_t vt_gdbm_store(apr_dbm_t *dbm, apr_datum_t key,
106@@ -201,9 +208,11 @@ static apr_status_t vt_gdbm_firstkey(apr_dbm_t *dbm, apr_datum_t *pkey)
107 if (pkey->dptr)
108 apr_pool_cleanup_register(dbm->pool, pkey->dptr, datum_cleanup,
109 apr_pool_cleanup_null);
110+ else
111+ pkey->dsize = 0;
112
113 /* store any error info into DBM, and return a status code. */
114- return set_error(dbm, APR_SUCCESS);
115+ return set_error(dbm, gdat2s(rd));
116 }
117
118 static apr_status_t vt_gdbm_nextkey(apr_dbm_t *dbm, apr_datum_t *pkey)
119@@ -221,9 +230,11 @@ static apr_status_t vt_gdbm_nextkey(apr_dbm_t *dbm, apr_datum_t *pkey)
120 if (pkey->dptr)
121 apr_pool_cleanup_register(dbm->pool, pkey->dptr, datum_cleanup,
122 apr_pool_cleanup_null);
123+ else
124+ pkey->dsize = 0;
125
126 /* store any error info into DBM, and return a status code. */
127- return set_error(dbm, APR_SUCCESS);
128+ return set_error(dbm, gdat2s(rd));
129 }
130
131 static void vt_gdbm_freedatum(apr_dbm_t *dbm, apr_datum_t data)
132--
1332.7.4
134
diff --git a/meta/recipes-support/apr/apr-util_1.6.1.bb b/meta/recipes-support/apr/apr-util_1.6.3.bb
index b851d46351..7c6fcc699b 100644
--- a/meta/recipes-support/apr/apr-util_1.6.1.bb
+++ b/meta/recipes-support/apr/apr-util_1.6.3.bb
@@ -13,11 +13,9 @@ SRC_URI = "${APACHE_MIRROR}/apr/${BPN}-${PV}.tar.gz \
13 file://configfix.patch \ 13 file://configfix.patch \
14 file://configure_fixes.patch \ 14 file://configure_fixes.patch \
15 file://run-ptest \ 15 file://run-ptest \
16 file://0001-Fix-error-handling-in-gdbm.patch \ 16 "
17"
18 17
19SRC_URI[md5sum] = "bd502b9a8670a8012c4d90c31a84955f" 18SRC_URI[sha256sum] = "2b74d8932703826862ca305b094eef2983c27b39d5c9414442e9976a9acf1983"
20SRC_URI[sha256sum] = "b65e40713da57d004123b6319828be7f1273fbc6490e145874ee1177e112c459"
21 19
22EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \ 20EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \
23 --without-odbc \ 21 --without-odbc \