diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2023-02-08 08:21:00 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-03-14 14:59:10 +0000 |
commit | 507f16e1bc50b35a15b4b5513f726883643605a2 (patch) | |
tree | f3c2f30048c01fe8810564690aa4eb8ab7e70303 /meta/recipes-support/apr/apr-util | |
parent | e0059335fb4408e6b6d72b63cb6102e9183761a0 (diff) | |
download | poky-507f16e1bc50b35a15b4b5513f726883643605a2.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: 9eb027bebb19bfb0fb136169e865ca269890fa6f)
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>
(cherry picked from commit e24b38a14b3520648ec418783fb74fcf61df7ff2)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/apr/apr-util')
-rw-r--r-- | meta/recipes-support/apr/apr-util/0001-Fix-error-handling-in-gdbm.patch | 135 |
1 files changed, 0 insertions, 135 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 57e7453312..0000000000 --- a/meta/recipes-support/apr/apr-util/0001-Fix-error-handling-in-gdbm.patch +++ /dev/null | |||
@@ -1,135 +0,0 @@ | |||
1 | From 6b638fa9afbeb54dfa19378e391465a5284ce1ad Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Wed, 12 Sep 2018 17:16:36 +0800 | ||
4 | Subject: [PATCH] Fix error handling in gdbm | ||
5 | |||
6 | Only check for gdbm_errno if the return value of the called gdbm_* | ||
7 | function says so. This fixes apr-util with gdbm 1.14, which does not | ||
8 | seem to always reset gdbm_errno. | ||
9 | |||
10 | Also make the gdbm driver return error codes starting with | ||
11 | APR_OS_START_USEERR instead of always returning APR_EGENERAL. This is | ||
12 | what the berkleydb driver already does. | ||
13 | |||
14 | Also ensure that dsize is 0 if dptr == NULL. | ||
15 | |||
16 | Upstream-Status: Backport[https://svn.apache.org/viewvc? | ||
17 | view=revision&revision=1825311] | ||
18 | |||
19 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
20 | --- | ||
21 | dbm/apr_dbm_gdbm.c | 47 +++++++++++++++++++++++++++++------------------ | ||
22 | 1 file changed, 29 insertions(+), 18 deletions(-) | ||
23 | |||
24 | diff --git a/dbm/apr_dbm_gdbm.c b/dbm/apr_dbm_gdbm.c | ||
25 | index 749447a..1c86327 100644 | ||
26 | --- a/dbm/apr_dbm_gdbm.c | ||
27 | +++ b/dbm/apr_dbm_gdbm.c | ||
28 | @@ -36,13 +36,25 @@ | ||
29 | static apr_status_t g2s(int gerr) | ||
30 | { | ||
31 | if (gerr == -1) { | ||
32 | - /* ### need to fix this */ | ||
33 | - return APR_EGENERAL; | ||
34 | + if (gdbm_errno == GDBM_NO_ERROR) | ||
35 | + return APR_SUCCESS; | ||
36 | + return APR_OS_START_USEERR + gdbm_errno; | ||
37 | } | ||
38 | |||
39 | return APR_SUCCESS; | ||
40 | } | ||
41 | |||
42 | +static apr_status_t gdat2s(datum d) | ||
43 | +{ | ||
44 | + if (d.dptr == NULL) { | ||
45 | + if (gdbm_errno == GDBM_NO_ERROR || gdbm_errno == GDBM_ITEM_NOT_FOUND) | ||
46 | + return APR_SUCCESS; | ||
47 | + return APR_OS_START_USEERR + gdbm_errno; | ||
48 | + } | ||
49 | + | ||
50 | + return APR_SUCCESS; | ||
51 | +} | ||
52 | + | ||
53 | static apr_status_t datum_cleanup(void *dptr) | ||
54 | { | ||
55 | if (dptr) | ||
56 | @@ -53,22 +65,15 @@ static apr_status_t datum_cleanup(void *dptr) | ||
57 | |||
58 | static apr_status_t set_error(apr_dbm_t *dbm, apr_status_t dbm_said) | ||
59 | { | ||
60 | - apr_status_t rv = APR_SUCCESS; | ||
61 | |||
62 | - /* ### ignore whatever the DBM said (dbm_said); ask it explicitly */ | ||
63 | + dbm->errcode = dbm_said; | ||
64 | |||
65 | - if ((dbm->errcode = gdbm_errno) == GDBM_NO_ERROR) { | ||
66 | + if (dbm_said == APR_SUCCESS) | ||
67 | dbm->errmsg = NULL; | ||
68 | - } | ||
69 | - else { | ||
70 | - dbm->errmsg = gdbm_strerror(gdbm_errno); | ||
71 | - rv = APR_EGENERAL; /* ### need something better */ | ||
72 | - } | ||
73 | - | ||
74 | - /* captured it. clear it now. */ | ||
75 | - gdbm_errno = GDBM_NO_ERROR; | ||
76 | + else | ||
77 | + dbm->errmsg = gdbm_strerror(dbm_said - APR_OS_START_USEERR); | ||
78 | |||
79 | - return rv; | ||
80 | + return dbm_said; | ||
81 | } | ||
82 | |||
83 | /* -------------------------------------------------------------------------- | ||
84 | @@ -107,7 +112,7 @@ static apr_status_t vt_gdbm_open(apr_dbm_t **pdb, const char *pathname, | ||
85 | NULL); | ||
86 | |||
87 | if (file == NULL) | ||
88 | - return APR_EGENERAL; /* ### need a better error */ | ||
89 | + return APR_OS_START_USEERR + gdbm_errno; /* ### need a better error */ | ||
90 | |||
91 | /* we have an open database... return it */ | ||
92 | *pdb = apr_pcalloc(pool, sizeof(**pdb)); | ||
93 | @@ -141,10 +146,12 @@ static apr_status_t vt_gdbm_fetch(apr_dbm_t *dbm, apr_datum_t key, | ||
94 | if (pvalue->dptr) | ||
95 | apr_pool_cleanup_register(dbm->pool, pvalue->dptr, datum_cleanup, | ||
96 | apr_pool_cleanup_null); | ||
97 | + else | ||
98 | + pvalue->dsize = 0; | ||
99 | |||
100 | /* store the error info into DBM, and return a status code. Also, note | ||
101 | that *pvalue should have been cleared on error. */ | ||
102 | - return set_error(dbm, APR_SUCCESS); | ||
103 | + return set_error(dbm, gdat2s(rd)); | ||
104 | } | ||
105 | |||
106 | static apr_status_t vt_gdbm_store(apr_dbm_t *dbm, apr_datum_t key, | ||
107 | @@ -201,9 +208,11 @@ static apr_status_t vt_gdbm_firstkey(apr_dbm_t *dbm, apr_datum_t *pkey) | ||
108 | if (pkey->dptr) | ||
109 | apr_pool_cleanup_register(dbm->pool, pkey->dptr, datum_cleanup, | ||
110 | apr_pool_cleanup_null); | ||
111 | + else | ||
112 | + pkey->dsize = 0; | ||
113 | |||
114 | /* store any error info into DBM, and return a status code. */ | ||
115 | - return set_error(dbm, APR_SUCCESS); | ||
116 | + return set_error(dbm, gdat2s(rd)); | ||
117 | } | ||
118 | |||
119 | static apr_status_t vt_gdbm_nextkey(apr_dbm_t *dbm, apr_datum_t *pkey) | ||
120 | @@ -221,9 +230,11 @@ static apr_status_t vt_gdbm_nextkey(apr_dbm_t *dbm, apr_datum_t *pkey) | ||
121 | if (pkey->dptr) | ||
122 | apr_pool_cleanup_register(dbm->pool, pkey->dptr, datum_cleanup, | ||
123 | apr_pool_cleanup_null); | ||
124 | + else | ||
125 | + pkey->dsize = 0; | ||
126 | |||
127 | /* store any error info into DBM, and return a status code. */ | ||
128 | - return set_error(dbm, APR_SUCCESS); | ||
129 | + return set_error(dbm, gdat2s(rd)); | ||
130 | } | ||
131 | |||
132 | static void vt_gdbm_freedatum(apr_dbm_t *dbm, apr_datum_t data) | ||
133 | -- | ||
134 | 2.7.4 | ||
135 | |||