mariadb: Fix build with clang-20/trunk
PATCH 1/5 mariadb: Fix build with clang-20/trunk
From: Khem Raj <[email protected]>
--- meta-oe/recipes-dbs/mysql/mariadb.inc | 1 + ...ction-as-deleter-prototype-in-unique.patch | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 meta-oe/recipes-dbs/mysql/mariadb/0001-Use-a-lambda-function-as-deleter-prototype-in-unique.patch
meta-oe/recipes-dbs/mysql/mariadb.inc +1 -0
@@ -23,6 +23,7 @@ SRC_URI = "https://archive.mariadb.org/${BP}/source/${BP}.tar.gz \ file://0001-sql-CMakeLists.txt-fix-gen_lex_hash-not-found.patch \ file://lfs64.patch \ file://0001-Add-missing-includes-cstdint-and-cstdio.patch \ + file://0001-Use-a-lambda-function-as-deleter-prototype-in-unique.patch \ " SRC_URI:append:libc-musl = " file://ppc-remove-glibc-dep.patch" SRC_URI[sha256sum] = "0a00180864cd016187c986faab8010de23a117b9a75f91d6456421f894e48d20"
meta-oe/recipes-dbs/mysql/mariadb/0001-Use-a-lambda-function-as-deleter-prototype-in-unique.patch new file +26 -0
@@ -0,0 +1,26 @@ +From 713c21880e25108bf0703433432acca58377cc7b Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 27 Sep 2024 11:55:53 -0700 +Subject: [PATCH] Use a lambda function as deleter prototype in unique_ptr + +Fixes build with clang/libc++ 20+ + +Upstream-Status: Submitted [https://jira.mariadb.org/browse/MDEV-35040] +Signed-off-by: Khem Raj <[email protected]> +--- + extra/mariabackup/backup_copy.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/extra/mariabackup/backup_copy.cc b/extra/mariabackup/backup_copy.cc +index a328f5e0ec7..2ab04b78bce 100644 +--- a/extra/mariabackup/backup_copy.cc ++++ b/extra/mariabackup/backup_copy.cc +@@ -1641,7 +1641,7 @@ is_aria_log_dir_file(const datadir_node_t &node) + bool + copy_back_aria_logs(const char *dstdir) + { +- std::unique_ptr<ds_ctxt_t, void (&)(ds_ctxt_t*)> ++ std::unique_ptr<ds_ctxt_t, std::function<void(ds_ctxt_t*)>> + ds_ctxt_aria_log_dir_path(ds_create(dstdir, DS_TYPE_LOCAL), ds_destroy); + + datadir_node_t node;
Signature · 1 line
2.43.0
PATCH 5/5 ntfs-3g-ntfsprogs: fix CVE-2023-52890
From: Hongxu Jia <[email protected]>
Backport fix from upstream
https://github.com/tuxera/ntfs-3g/commit/75dcdc2cf37478fad6c0e3427403d198b554951d
--- ...use-after-free-in-ntfs_uppercase_mbs.patch | 42 +++++++++++++++++++ .../ntfs-3g-ntfsprogs_2022.10.3.bb | 1 + 2 files changed, 43 insertions(+) create mode 100644 meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/0001-unistr.c-Fix-use-after-free-in-ntfs_uppercase_mbs.patch
meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/files/0001-unistr.c-Fix-use-after-free-in-ntfs_uppercase_mbs.patch new file +42 -0
@@ -0,0 +1,42 @@ +From 7b6210c5be46e5120b42c09f910e8f104bf3edf1 Mon Sep 17 00:00:00 2001 +From: Erik Larsson <[email protected]> +Date: Tue, 13 Jun 2023 17:47:15 +0300 +Subject: [PATCH] unistr.c: Fix use-after-free in 'ntfs_uppercase_mbs'. + +If 'utf8_to_unicode' throws an error due to an invalid UTF-8 sequence, +then 'n' will be less than 0 and the loop will terminate without storing +anything in '*t'. After the loop the uppercase string's allocation is +freed, however after it is freed it is unconditionally accessed through +'*t', which points into the freed allocation, for the purpose of NULL- +terminating the string. This leads to a use-after-free. +Fixed by only NULL-terminating the string when no error has been thrown. + +Thanks for Jeffrey Bencteux for reporting this issue: +https://github.com/tuxera/ntfs-3g/issues/84 + +Upstream-Status: Backport [https://github.com/tuxera/ntfs-3g/commit/75dcdc2cf37478fad6c0e3427403d198b554951d] +CVE: CVE-2023-52890 +Signed-off-by: Hongxu Jia <[email protected]> + +--- + libntfs-3g/unistr.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libntfs-3g/unistr.c b/libntfs-3g/unistr.c +index 5854b3b..db8ddf4 100644 +--- a/libntfs-3g/unistr.c ++++ b/libntfs-3g/unistr.c +@@ -1189,8 +1189,9 @@ char *ntfs_uppercase_mbs(const char *low, + free(upp); + upp = (char*)NULL; + errno = EILSEQ; ++ } else { ++ *t = 0; + } +- *t = 0; + } + return (upp); + } +-- +2.34.1 +
meta-filesystems/recipes-filesystems/ntfs-3g-ntfsprogs/ntfs-3g-ntfsprogs_2022.10.3.bb +1 -0
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ SRC_URI = "http://tuxera.com/opensource/ntfs-3g_ntfsprogs-${PV}.tgz \ file://0001-libntfs-3g-Makefile.am-fix-install-failed-while-host.patch \ + file://0001-unistr.c-Fix-use-after-free-in-ntfs_uppercase_mbs.patch \ " S = "${WORKDIR}/ntfs-3g_ntfsprogs-${PV}" SRC_URI[sha256sum] = "f20e36ee68074b845e3629e6bced4706ad053804cbaf062fbae60738f854170c"
Signature · 1 line
2.43.0
PATCH 2/5 mariadb: Ensure compatibility with ARMv9 by updating .arch directive
In reply to Armin KusterFrom: Ruiqiang Hao <[email protected]>
The pmem_cvap() function currently uses the '.arch armv8.2-a' directive for the 'dc cvap' instruction. This will cause build errors below when compiling for ARMv9 systems. Update the '.arch' directive to 'armv9.4-a' to ensure compatibility with ARMv9 architectures.
{standard input}: Assembler messages:
{standard input}:169: Error: selected processor does not support retaa' {standard input}:286: Error: selected processor does not support retaa' make[2]: *** [storage/innobase/CMakeFiles/innobase_embedded.dir/build.make:
1644: storage/innobase/CMakeFiles/innobase_embedded.dir/sync/cache.cc.o] Error 1
--- meta-oe/recipes-dbs/mysql/mariadb.inc | 1 + ...lity-with-ARMv9-by-updating-.arch-di.patch | 44 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 meta-oe/recipes-dbs/mysql/mariadb/0001-Ensure-compatibility-with-ARMv9-by-updating-.arch-di.patch
meta-oe/recipes-dbs/mysql/mariadb.inc +1 -0
@@ -24,6 +24,7 @@ SRC_URI = "https://archive.mariadb.org/${BP}/source/${BP}.tar.gz \ file://lfs64.patch \ file://0001-Add-missing-includes-cstdint-and-cstdio.patch \ file://0001-Use-a-lambda-function-as-deleter-prototype-in-unique.patch \ + file://0001-Ensure-compatibility-with-ARMv9-by-updating-.arch-di.patch \ " SRC_URI:append:libc-musl = " file://ppc-remove-glibc-dep.patch" SRC_URI[sha256sum] = "0a00180864cd016187c986faab8010de23a117b9a75f91d6456421f894e48d20"
meta-oe/recipes-dbs/mysql/mariadb/0001-Ensure-compatibility-with-ARMv9-by-updating-.arch-di.patch new file +44 -0
44 lines not on this page · raw message
Signature · 1 line
2.43.0
PATCH 3/5 proftpd: set status of CVE-2001-0027
In reply to Armin KusterFrom: Peter Marko <[email protected]>
This ancient CVE [1] is unversioned ("*") in NVD DB. "mod_sqlpw module in ProFTPD does not reset a cached password..."
Looking at history and changelog, the module was removed [2] around the time when this CVE was published, likely as reaction to this CVE. "mod_sqlpw.c, mod_mysql.c and mod_pgsql.c have been REMOVED from the distribution. They are currently unmaintained and have numerous bugs."
Note: It was later re-introduced as mod_sql when it got fixed under new maintainer.
[1] https://nvd.nist.gov/vuln/detail/CVE-2001-0027
[2] https://github.com/proftpd/proftpd/blob/v1.3.8b/NEWS#L3362
--- meta-networking/recipes-daemons/proftpd/proftpd_1.3.8b.bb | 2 ++ 1 file changed, 2 insertions(+)
meta-networking/recipes-daemons/proftpd/proftpd_1.3.8b.bb +2 -0
@@ -21,6 +21,8 @@ S = "${WORKDIR}/git" inherit autotools-brokensep useradd update-rc.d systemd multilib_script +CVE_STATUS[CVE-2001-0027] = "fixed-version: version 1.2.0rc3 removed affected module" + EXTRA_OECONF += "--enable-largefile INSTALL=install" PACKAGECONFIG ??= "shadow \
Signature · 1 line
2.43.0
PATCH 4/5 wireshark: use inherit_defer for conditional cases
In reply to Armin KusterFrom: Ghislain Mangé <[email protected]>
Conditionnal inherit may be missed when PACKAGECONFIG qt5 is activated after this inherit, eg in .bbappend. see patch [0]
[0]: https://lists.openembedded.org/g/bitbake-devel/message/16815
--- meta-networking/recipes-support/wireshark/wireshark_4.2.7.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-networking/recipes-support/wireshark/wireshark_4.2.7.bb +1 -1
@@ -48,7 +48,7 @@ PACKAGECONFIG[nghttp2] = "-DENABLE_NGHTTP2=ON,-DENABLE_NGHTTP2=OFF, nghttp2" # these next two options require addional layers PACKAGECONFIG[qt5] = "-DENABLE_QT5=ON -DBUILD_wireshark=ON, -DENABLE_QT5=OFF -DBUILD_wireshark=OFF, qttools-native qtmultimedia qtsvg" -inherit ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'cmake_qt5', '', d)} +inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'qt5', 'cmake_qt5', '', d)} EXTRA_OECMAKE += "-DENABLE_NETLINK=ON \ -DBUILD_mmdbresolve=OFF \
Signature · 1 line
2.43.0