Patch review April 22
cover Patch review April 22
Next patch review for Gatesgarth.
Please have feedback by Fariday
The following changes since commit c9815c86bfd63b2d9479915045197e7d315ef709:
telepathy-glib: respect GI_DATA_ENABLED when enabling vala-bindings (2021-04-10 07:37:44 -0700)
are available in the Git repository at:
git://git.openembedded.org/meta-openembedded-contrib stable/gatesgarth-nut
http://cgit.openembedded.org/meta-openembedded-contrib/log/?h=stable/gatesgarth-nut
Hermes Zhang (1):
gpsd: backport d-bus message time patch from upstream
Khem Raj (1):
mariadb: Fix build on musl/ppc
Stefan Ghinea (1):
hostapd: fix CVE-2021-30004
wangmy (1):
mariadb: upgrade 10.5.8 -> 10.5.9
.../hostapd/hostapd/CVE-2021-30004.patch | 123 ++++++++++++++++++
.../hostapd/hostapd_2.9.bb | 1 +
...ive_10.5.8.bb => mariadb-native_10.5.9.bb} | 0
meta-oe/recipes-dbs/mysql/mariadb.inc | 5 +-
...ktrace-t.c-make-the-test-conditional.patch | 38 ------
.../mysql/mariadb/c11_atomics.patch | 16 +--
.../mysql/mariadb/ppc-remove-glibc-dep.patch | 50 +++++++
.../{mariadb_10.5.8.bb => mariadb_10.5.9.bb} | 0
...port.c-Fix-broken-d-bus-message-time.patch | 36 +++++
meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb | 1 +
10 files changed, 222 insertions(+), 48 deletions(-)
create mode 100644 meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2021-30004.patch
rename meta-oe/recipes-dbs/mysql/{mariadb-native_10.5.8.bb => mariadb-native_10.5.9.bb} (100%)
delete mode 100644 meta-oe/recipes-dbs/mysql/mariadb/0001-stacktrace-t.c-make-the-test-conditional.patch
create mode 100644 meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch
rename meta-oe/recipes-dbs/mysql/{mariadb_10.5.8.bb => mariadb_10.5.9.bb} (100%)
create mode 100644 meta-oe/recipes-navigation/gpsd/gpsd/0001-gpsd-dbusexport.c-Fix-broken-d-bus-message-time.patchSignature · 1 line
2.17.1
PATCH 1/4 hostapd: fix CVE-2021-30004
From: Stefan Ghinea <[email protected]>
In wpa_supplicant and hostapd 2.9, forging attacks may occur because AlgorithmIdentifier parameters are mishandled in tls/pkcs1.c and tls/x509v3.c.
References:
https://nvd.nist.gov/vuln/detail/CVE-2021-30004
Upstream patches:
https://w1.fi/cgit/hostap/commit/?id=a0541334a6394f8237a4393b7372693cd7e96f15
--- .../hostapd/hostapd/CVE-2021-30004.patch | 123 ++++++++++++++++++ .../hostapd/hostapd_2.9.bb | 1 + 2 files changed, 124 insertions(+) create mode 100644 meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2021-30004.patch
meta-oe/recipes-connectivity/hostapd/hostapd/CVE-2021-30004.patch new file +123 -0
@@ -0,0 +1,123 @@ +From a0541334a6394f8237a4393b7372693cd7e96f15 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen <[email protected]> +Date: Sat, 13 Mar 2021 18:19:31 +0200 +Subject: [PATCH] ASN.1: Validate DigestAlgorithmIdentifier parameters + +The supported hash algorithms do not use AlgorithmIdentifier parameters. +However, there are implementations that include NULL parameters in +addition to ones that omit the parameters. Previous implementation did +not check the parameters value at all which supported both these cases, +but did not reject any other unexpected information. + +Use strict validation of digest algorithm parameters and reject any +unexpected value when validating a signature. This is needed to prevent +potential forging attacks. + +Signed-off-by: Jouni Malinen <[email protected]> + +Upstream-Status: Backport +CVE: CVE-2021-30004 + +Reference to upstream patch: +[https://w1.fi/cgit/hostap/commit/?id=a0541334a6394f8237a4393b7372693cd7e96f15] + +Signed-off-by: Stefan Ghinea <[email protected]> +--- + src/tls/pkcs1.c | 21 +++++++++++++++++++++ + src/tls/x509v3.c | 20 ++++++++++++++++++++ + 2 files changed, 41 insertions(+) + +diff --git a/src/tls/pkcs1.c b/src/tls/pkcs1.c +index 141ac50..e09db07 100644 +--- a/src/tls/pkcs1.c ++++ b/src/tls/pkcs1.c +@@ -240,6 +240,8 @@ int pkcs1_v15_sig_ver(struct crypto_public_key *pk, + os_free(decrypted); + return -1; + } ++ wpa_hexdump(MSG_MSGDUMP, "PKCS #1: DigestInfo", ++ hdr.payload, hdr.length); + + pos = hdr.payload; + end = pos + hdr.length; +@@ -261,6 +263,8 @@ int pkcs1_v15_sig_ver(struct crypto_public_key *pk, + os_free(decrypted); + return -1; + } ++ wpa_hexdump(MSG_MSGDUMP, "PKCS #1: DigestAlgorithmIdentifier", ++ hdr.payload, hdr.length); + da_end = hdr.payload + hdr.length; + + if (asn1_get_oid(hdr.payload, hdr.length, &oid, &next)) { +@@ -269,6 +273,23 @@ int pkcs1_v15_sig_ver(struct crypto_public_key *pk, + os_free(decrypted); + return -1; + } ++ wpa_hexdump(MSG_MSGDUMP, "PKCS #1: Digest algorithm parameters", ++ next, da_end - next); ++ ++ /* ++ * RFC 5754: The correct encoding for the SHA2 algorithms would be to ++ * omit the parameters, but there are implementation that encode these ++ * as a NULL element. Allow these two cases and reject anything else. ++ */ ++ if (da_end > next && ++ (asn1_get_next(next, da_end - next, &hdr) < 0 || ++ !asn1_is_null(&hdr) || ++ hdr.payload + hdr.length != da_end)) { ++ wpa_printf(MSG_DEBUG, ++ "PKCS #1: Unexpected digest algorithm parameters"); ++ os_free(decrypted); ++ return -1; ++ } + + if (!asn1_oid_equal(&oid, hash_alg)) { + char txt[100], txt2[100]; +diff --git a/src/tls/x509v3.c b/src/tls/x509v3.c +index 1bd5aa0..bf2289f 100644 +--- a/src/tls/x509v3.c ++++ b/src/tls/x509v3.c +@@ -1834,6 +1834,7 @@ int x509_check_signature(struct x509_certificate *issuer, + os_free(data); + return -1; + } ++ wpa_hexdump(MSG_MSGDUMP, "X509: DigestInfo", hdr.payload, hdr.length); + + pos = hdr.payload; + end = pos + hdr.length; +@@ -1855,6 +1856,8 @@ int x509_check_signature(struct x509_certificate *issuer, + os_free(data); + return -1; + } ++ wpa_hexdump(MSG_MSGDUMP, "X509: DigestAlgorithmIdentifier", ++ hdr.payload, hdr.length); + da_end = hdr.payload + hdr.length; + + if (asn1_get_oid(hdr.payload, hdr.length, &oid, &next)) { +@@ -1862,6 +1865,23 @@ int x509_check_signature(struct x509_certificate *issuer, + os_free(data); + return -1; + } ++ wpa_hexdump(MSG_MSGDUMP, "X509: Digest algorithm parameters", ++ next, da_end - next); ++ ++ /* ++ * RFC 5754: The correct encoding for the SHA2 algorithms would be to ++ * omit the parameters, but there are implementation that encode these ++ * as a NULL element. Allow these two cases and reject anything else. ++ */ ++ if (da_end > next && ++ (asn1_get_next(next, da_end - next, &hdr) < 0 || ++ !asn1_is_null(&hdr) || ++ hdr.payload + hdr.length != da_end)) { ++ wpa_printf(MSG_DEBUG, ++ "X509: Unexpected digest algorithm parameters"); ++ os_free(data); ++ return -1; ++ } + + if (x509_sha1_oid(&oid)) { + if (signature->oid.oid[6] != 5 /* sha-1WithRSAEncryption */) { +-- +2.17.1 +
meta-oe/recipes-connectivity/hostapd/hostapd_2.9.bb +1 -0
@@ -15,6 +15,7 @@ SRC_URI = " \ file://CVE-2019-5061.patch \ file://CVE-2021-0326.patch \ file://CVE-2021-27803.patch \ + file://CVE-2021-30004.patch \ " SRC_URI[md5sum] = "f188fc53a495fe7af3b6d77d3c31dee8"
Signature · 1 line
2.17.1
PATCH 2/4 mariadb: Fix build on musl/ppc
In reply to Armin KusterFrom: Khem Raj <[email protected]>
--- meta-oe/recipes-dbs/mysql/mariadb.inc | 2 + .../mysql/mariadb/ppc-remove-glibc-dep.patch | 50 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch
meta-oe/recipes-dbs/mysql/mariadb.inc +2 -0
@@ -22,6 +22,8 @@ SRC_URI = "https://downloads.mariadb.org/interstitial/${BP}/source/${BP}.tar.gz file://0001-innobase-Define-__NR_futex-if-it-does-not-exist.patch \ file://0001-stacktrace-t.c-make-the-test-conditional.patch \ " +SRC_URI_append_libc-musl = " file://ppc-remove-glibc-dep.patch" + SRC_URI[sha256sum] = "eb4824f6f2c532cd3fc6a6bce7bf78ea7c6b949f8bdd07656b2c84344e757be8" UPSTREAM_CHECK_URI = "https://github.com/MariaDB/server/releases"
meta-oe/recipes-dbs/mysql/mariadb/ppc-remove-glibc-dep.patch new file +50 -0
50 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH 3/4 mariadb: upgrade 10.5.8 -> 10.5.9
In reply to Armin KusterFrom: wangmy <[email protected]>
refresh c11_atomics.patch
remove 0001-stacktrace-t.c-make-the-test-conditional.patch since it is included in 10.5.9
---
...ive_10.5.8.bb => mariadb-native_10.5.9.bb} | 0
meta-oe/recipes-dbs/mysql/mariadb.inc | 3 +-
...ktrace-t.c-make-the-test-conditional.patch | 38 -------------------
.../mysql/mariadb/c11_atomics.patch | 16 ++++----
.../{mariadb_10.5.8.bb => mariadb_10.5.9.bb} | 0
5 files changed, 9 insertions(+), 48 deletions(-)
rename meta-oe/recipes-dbs/mysql/{mariadb-native_10.5.8.bb => mariadb-native_10.5.9.bb} (100%)
delete mode 100644 meta-oe/recipes-dbs/mysql/mariadb/0001-stacktrace-t.c-make-the-test-conditional.patch
rename meta-oe/recipes-dbs/mysql/{mariadb_10.5.8.bb => mariadb_10.5.9.bb} (100%)meta-oe/recipes-dbs/mysql/mariadb-native_10.5.9.bb renamed from meta-oe/recipes-dbs/mysql/mariadb-native_10.5.8.bb +0 -0
meta-oe/recipes-dbs/mysql/mariadb.inc +1 -2
@@ -20,11 +20,10 @@ SRC_URI = "https://downloads.mariadb.org/interstitial/${BP}/source/${BP}.tar.gz file://fix-arm-atomic.patch \ file://0001-Fix-library-LZ4-lookup.patch \ file://0001-innobase-Define-__NR_futex-if-it-does-not-exist.patch \ - file://0001-stacktrace-t.c-make-the-test-conditional.patch \ " SRC_URI_append_libc-musl = " file://ppc-remove-glibc-dep.patch" -SRC_URI[sha256sum] = "eb4824f6f2c532cd3fc6a6bce7bf78ea7c6b949f8bdd07656b2c84344e757be8" +SRC_URI[sha256sum] = "40ab19aeb8de141fdc188cf2251213c9e7351bee4d0cd29db704fae68d1068cf" UPSTREAM_CHECK_URI = "https://github.com/MariaDB/server/releases"
meta-oe/recipes-dbs/mysql/mariadb/0001-stacktrace-t.c-make-the-test-conditional.patch deleted +0 -38
@@ -1,38 +0,0 @@ -From 966cbeb309f867ff4ac8e7f4462be4780e421700 Mon Sep 17 00:00:00 2001 -From: Mingli Yu <[email protected]> -Date: Mon, 25 Jan 2021 19:01:06 -0800 -Subject: [PATCH] stacktrace-t.c: make the test conditional - -Fixes: -/prj/tmp/work/cortexa57-poky-linux-musl/mariadb/10.5.8-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux-musl/../../libexec/aarch64-poky-linux-musl/gcc/aarch64-poky-linux-musl/10.2.0/ld.bfd: /usr/src/debug/mariadb/10.5.8-r0/mariadb-10.5.8/unittest/mysys/stacktrace-t.c:36: undefined reference to `my_safe_print_str' - -Upstream-Status: Submitted [https://jira.mariadb.org/browse/MDEV-24131] - -Signed-off-by: Mingli Yu <[email protected]> ---- - unittest/mysys/stacktrace-t.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/unittest/mysys/stacktrace-t.c b/unittest/mysys/stacktrace-t.c -index 8fa0db15b36..d8408f80d76 100644 ---- a/unittest/mysys/stacktrace-t.c -+++ b/unittest/mysys/stacktrace-t.c -@@ -29,6 +29,7 @@ void test_my_safe_print_str() - memcpy(b_stack, "LEGAL", 6); - memcpy(b_bss, "LEGAL", 6); - -+#ifdef HAVE_STACKTRACE - #ifndef __SANITIZE_ADDRESS__ - fprintf(stderr, "\n===== stack =====\n"); - my_safe_print_str(b_stack, 65535); -@@ -48,6 +49,7 @@ void test_my_safe_print_str() - fprintf(stderr, "\n===== (const char*) 1 =====\n"); - my_safe_print_str((const char*)1, 5); - #endif /*__SANITIZE_ADDRESS__*/ -+#endif /*HAVE_STACKTRACE*/ - - free(b_heap); - --- -2.17.1 -
meta-oe/recipes-dbs/mysql/mariadb/c11_atomics.patch +8 -8
@@ -17,10 +17,10 @@ Signed-off-by: Mingli Yu <[email protected]> 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/configure.cmake b/configure.cmake -index bb3ad43..2ff4f19 100644 +index 4fc324a9..23a2ea91 100644 --- a/configure.cmake +++ b/configure.cmake -@@ -861,7 +861,25 @@ int main() +@@ -862,7 +862,25 @@ int main() long long int *ptr= &var; return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST); }"
@@ -48,10 +48,10 @@ index bb3ad43..2ff4f19 100644 IF(WITH_VALGRIND) SET(HAVE_valgrind 1) diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt -index 6a3a1ef..e306ae7 100644 +index 6aab788f..91b9c393 100644 --- a/mysys/CMakeLists.txt +++ b/mysys/CMakeLists.txt -@@ -140,6 +140,10 @@ TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARY} +@@ -154,6 +154,10 @@ TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARY} ${LIBNSL} ${LIBM} ${LIBRT} ${CMAKE_DL_LIBS} ${LIBSOCKET} ${LIBEXECINFO}) DTRACE_INSTRUMENT(mysys)
@@ -63,10 +63,10 @@ index 6a3a1ef..e306ae7 100644 TARGET_LINK_LIBRARIES(mysys bfd) ENDIF(HAVE_BFD_H) diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt -index 4978d01..883a930 100644 +index b9cd418f..d42e5017 100644 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt -@@ -220,6 +220,10 @@ ELSE() +@@ -222,6 +222,10 @@ ELSE() SET(MYSQLD_SOURCE main.cc ${DTRACE_PROBES_ALL}) ENDIF()
@@ -74,9 +74,9 @@ index 4978d01..883a930 100644 + TARGET_LINK_LIBRARIES(sql atomic) +ENDIF() + - IF(MSVC) + IF(MSVC OR CMAKE_SYSTEM_NAME MATCHES AIX) SET(libs_to_export_symbols sql mysys dbug strings) # Create shared library of already compiled object -- -2.17.1 +2.25.1
meta-oe/recipes-dbs/mysql/mariadb_10.5.9.bb renamed from meta-oe/recipes-dbs/mysql/mariadb_10.5.8.bb +0 -0
Signature · 1 line
2.17.1
PATCH 4/4 gpsd: backport d-bus message time patch from upstream
In reply to Armin KusterFrom: Hermes Zhang <[email protected]>
This patch is backport from 821c149d486c0e67c1bd35d7c044ede9348aeb8d of upstream to fix the broken d-bus message time
--- ...port.c-Fix-broken-d-bus-message-time.patch | 36 +++++++++++++++++++ meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb | 1 + 2 files changed, 37 insertions(+) create mode 100644 meta-oe/recipes-navigation/gpsd/gpsd/0001-gpsd-dbusexport.c-Fix-broken-d-bus-message-time.patch
meta-oe/recipes-navigation/gpsd/gpsd/0001-gpsd-dbusexport.c-Fix-broken-d-bus-message-time.patch new file +36 -0
@@ -0,0 +1,36 @@ +From c9cec2a888d4fea8534be78a0f46d920155ceae6 Mon Sep 17 00:00:00 2001 +From: Paul Fertser <[email protected]> +Date: Wed, 4 Nov 2020 12:40:50 -0800 +Subject: [PATCH] gpsd/dbusexport.c: Fix broken d-bus message time. + +Change-Id: I4b9990ce4517a8feb29fc9e090c62f5a0c56ddd5 +--- + dbusexport.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/dbusexport.c b/dbusexport.c +index 40b35739e..5d08a8702 100644 +--- a/dbusexport.c ++++ b/dbusexport.c +@@ -38,6 +38,7 @@ void send_dbus_fix(struct gps_device_t *channel) + /*DBusMessageIter iter; */ + dbus_uint32_t serial; /* collected, but not used */ + char *gpsd_devname; ++ double dtime; // time as a double, loss of precision! + + /* if the connection is non existent, return without doing anything */ + if (connection == NULL) +@@ -51,8 +52,9 @@ void send_dbus_fix(struct gps_device_t *channel) + /* the dbus/locationd doc fails to specify altitude as WGS84 or MSL. + * assume altMSL */ + message = dbus_message_new_signal("/org/gpsd", "org.gpsd", "fix"); ++ dtime = TSTONS(&gpsfix->time); + dbus_message_append_args(message, +- DBUS_TYPE_DOUBLE, &(gpsfix->time), ++ DBUS_TYPE_DOUBLE, &dtime, + DBUS_TYPE_INT32, &(gpsfix->mode), + DBUS_TYPE_DOUBLE, &(gpsfix->ept), + DBUS_TYPE_DOUBLE, &(gpsfix->latitude), +-- +2.20.1 +
meta-oe/recipes-navigation/gpsd/gpsd_3.20.bb +1 -0
@@ -8,6 +8,7 @@ PROVIDES = "virtual/gpsd" SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \ file://0001-SConstruct-prefix-includepy-with-sysroot-and-drop-sy.patch \ file://0001-Revert-SConstruct-Add-test-for-sizeof-time_t-result-.patch \ + file://0001-gpsd-dbusexport.c-Fix-broken-d-bus-message-time.patch \ file://gpsd.init \ " SRC_URI[md5sum] = "cf7fdec7ce7221d20bee1a7246362b05"
Signature · 1 line
2.17.1