* [meta-oe][styhead][PATCH 01/14] gphoto2: Fix /usr/bin/gphoto2 runtime error
@ 2025-01-25 18:02 Armin Kuster
2025-01-25 18:02 ` [meta-oe][styhead][PATCH 02/14] mpd: Upgrade mpd to 0.23.16 Armin Kuster
` (12 more replies)
0 siblings, 13 replies; 14+ messages in thread
From: Armin Kuster @ 2025-01-25 18:02 UTC (permalink / raw)
To: openembedded-devel; +Cc: Hieu Van Nguyen
From: Hieu Van Nguyen <hieu2.nguyen@lge.com>
After fixing the TMPDIR [buildpaths] warning, a segmentation fault while
running gphoto2 command.
It seems 'sed' is primarily designed for text processing. When running
'sed' on a binary, it may overwrite or corrupt critical parts of the
binary.
> root@qemux86-64:~# gphoto2 -v
> Segmentation fault
Signed-off-by: Hieu Van Nguyen <hieu2.nguyen@lge.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.28.bb | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.28.bb b/meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.28.bb
index aba590aa02..1dc2a1fc34 100644
--- a/meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.28.bb
+++ b/meta-oe/recipes-graphics/gphoto2/gphoto2_2.5.28.bb
@@ -19,8 +19,6 @@ EXTRA_OECONF += "--with-jpeg-prefix=${STAGING_INCDIR} \
--without-cdk \
"
-INSANE_SKIP:${PN} = "already-stripped"
-
-do_install:append() {
- sed -i -e 's#${RECIPE_SYSROOT}##g' ${D}${bindir}/gphoto2
+do_configure:append() {
+ sed -i -e 's#${RECIPE_SYSROOT}##g' ${B}/config.h
}
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [meta-oe][styhead][PATCH 02/14] mpd: Upgrade mpd to 0.23.16
2025-01-25 18:02 [meta-oe][styhead][PATCH 01/14] gphoto2: Fix /usr/bin/gphoto2 runtime error Armin Kuster
@ 2025-01-25 18:02 ` Armin Kuster
2025-01-25 18:02 ` [meta-oe][styhead][PATCH 03/14] libtinyxml: set CVE product to tinyxml Armin Kuster
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Armin Kuster @ 2025-01-25 18:02 UTC (permalink / raw)
To: openembedded-devel; +Cc: Khem Raj
From: Khem Raj <raj.khem@gmail.com>
- Release Notes
* database
- fix integer overflows with 64-bit inode numbers
* filter
- ffmpeg: fix for filters producing no output
* support libfmt 11
* support ICU 76
- Drop ICU-76 support patch its already in this release
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit e7ca3cedb0ada5363db24d1ba7256544732173d7)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
...n.build-support-building-with-ICU-76.patch | 52 -------------------
.../{mpd_0.23.15.bb => mpd_0.23.16.bb} | 3 +-
2 files changed, 1 insertion(+), 54 deletions(-)
delete mode 100644 meta-multimedia/recipes-multimedia/musicpd/mpd/0001-meson.build-support-building-with-ICU-76.patch
rename meta-multimedia/recipes-multimedia/musicpd/{mpd_0.23.15.bb => mpd_0.23.16.bb} (97%)
diff --git a/meta-multimedia/recipes-multimedia/musicpd/mpd/0001-meson.build-support-building-with-ICU-76.patch b/meta-multimedia/recipes-multimedia/musicpd/mpd/0001-meson.build-support-building-with-ICU-76.patch
deleted file mode 100644
index 8b85f396ca..0000000000
--- a/meta-multimedia/recipes-multimedia/musicpd/mpd/0001-meson.build-support-building-with-ICU-76.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 1a063fee7ec1077e248ff97ebf1f92c5c5941a67 Mon Sep 17 00:00:00 2001
-From: Michael Cho <michael@michaelcho.dev>
-Date: Sat, 26 Oct 2024 10:29:53 -0400
-Subject: [PATCH] meson.build: support building with ICU 76
-
-ICU 76 decided to reduce overlinking[^1] thus `icu-i18n` will no longer
-add `icu-uc` when linking to shared libraries. This results in failure:
-```
-src/lib/icu/libicu.a.p/Converter.cxx.o: undefined reference to symbol 'ucnv_fromUnicode_76'
-```
-
-[^1]: https://github.com/unicode-org/icu/commit/199bc827021ffdb43b6579d68e5eecf54c7f6f56
-
-Upstream-Status: Backport [https://github.com/MusicPlayerDaemon/MPD/commit/1a063fee7ec1077e248ff97ebf1f92c5c5941a67]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/lib/icu/meson.build | 11 +++++++----
- 1 file changed, 7 insertions(+), 4 deletions(-)
-
-diff --git a/src/lib/icu/meson.build b/src/lib/icu/meson.build
-index 3ecc0a517..e6cf8cdce 100644
---- a/src/lib/icu/meson.build
-+++ b/src/lib/icu/meson.build
-@@ -1,5 +1,7 @@
--icu_dep = dependency('icu-i18n', version: '>= 50', required: get_option('icu'))
--conf.set('HAVE_ICU', icu_dep.found())
-+icu_i18n_dep = dependency('icu-i18n', version: '>= 50', required: get_option('icu'))
-+icu_uc_dep = dependency('icu-uc', version: '>= 50', required: get_option('icu'))
-+have_icu = icu_i18n_dep.found() and icu_uc_dep.found()
-+conf.set('HAVE_ICU', have_icu)
-
- icu_sources = [
- 'Canonicalize.cxx',
-@@ -13,7 +15,7 @@ if is_windows
- endif
-
- iconv_dep = []
--if icu_dep.found()
-+if have_icu
- icu_sources += [
- 'Init.cxx',
- 'Util.cxx',
-@@ -31,7 +33,8 @@ icu = static_library(
- icu_sources,
- include_directories: inc,
- dependencies: [
-- icu_dep,
-+ icu_i18n_dep,
-+ icu_uc_dep,
- iconv_dep,
- fmt_dep,
- ],
diff --git a/meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.15.bb b/meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.16.bb
similarity index 97%
rename from meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.15.bb
rename to meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.16.bb
index 3fa4485a04..4d854d6fc5 100644
--- a/meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.15.bb
+++ b/meta-multimedia/recipes-multimedia/musicpd/mpd_0.23.16.bb
@@ -21,9 +21,8 @@ DEPENDS += " \
PV .= "+git"
SRC_URI = "git://github.com/MusicPlayerDaemon/MPD;branch=master;protocol=https \
file://mpd.conf.in \
- file://0001-meson.build-support-building-with-ICU-76.patch \
"
-SRCREV = "965c466e9bda262790e76edd5272e9e74b407ff3"
+SRCREV = "b5bd294e5c88c062b1a9c0c4c60397fbf7f3f1c5"
S = "${WORKDIR}/git"
EXTRA_OEMESON += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '-Dsystemd=enabled -Dsystemd_system_unit_dir=${systemd_system_unitdir} -Dsystemd_user_unit_dir=${systemd_system_unitdir}', '-Dsystemd=disabled', d)} \
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [meta-oe][styhead][PATCH 03/14] libtinyxml: set CVE product to tinyxml
2025-01-25 18:02 [meta-oe][styhead][PATCH 01/14] gphoto2: Fix /usr/bin/gphoto2 runtime error Armin Kuster
2025-01-25 18:02 ` [meta-oe][styhead][PATCH 02/14] mpd: Upgrade mpd to 0.23.16 Armin Kuster
@ 2025-01-25 18:02 ` Armin Kuster
2025-01-25 18:02 ` [meta-oe][styhead][PATCH 04/14] libtinyxml: patch CVE-2021-42260 Armin Kuster
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Armin Kuster @ 2025-01-25 18:02 UTC (permalink / raw)
To: openembedded-devel; +Cc: Jörg Sommer, Khem Raj
From: Jörg Sommer <joerg.sommer@navimatix.de>
This library gets tracked with the product name tinyxml:
https://nvd.nist.gov/products/cpe/detail/95BDA29F-257C-4C44-8847-25CFC107228D
Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit c5ef63d685b291b648c364dcd880dca39b13b538)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
meta-oe/recipes-support/libtinyxml/libtinyxml_2.6.2.bb | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta-oe/recipes-support/libtinyxml/libtinyxml_2.6.2.bb b/meta-oe/recipes-support/libtinyxml/libtinyxml_2.6.2.bb
index 6fbdd071e8..2a7ca30a9d 100644
--- a/meta-oe/recipes-support/libtinyxml/libtinyxml_2.6.2.bb
+++ b/meta-oe/recipes-support/libtinyxml/libtinyxml_2.6.2.bb
@@ -5,6 +5,7 @@ HOMEPAGE = "http://www.sourceforge.net/projects/tinyxml"
LICENSE = "Zlib"
LIC_FILES_CHKSUM = "file://readme.txt;md5=f8f366f3370dda889f60faa7db162cf4"
SECTION = "libs"
+CVE_PRODUCT = "tinyxml"
SRC_URI = "${SOURCEFORGE_MIRROR}/tinyxml/tinyxml_${@'${PV}'.replace('.', '_')}.tar.gz \
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [meta-oe][styhead][PATCH 04/14] libtinyxml: patch CVE-2021-42260
2025-01-25 18:02 [meta-oe][styhead][PATCH 01/14] gphoto2: Fix /usr/bin/gphoto2 runtime error Armin Kuster
2025-01-25 18:02 ` [meta-oe][styhead][PATCH 02/14] mpd: Upgrade mpd to 0.23.16 Armin Kuster
2025-01-25 18:02 ` [meta-oe][styhead][PATCH 03/14] libtinyxml: set CVE product to tinyxml Armin Kuster
@ 2025-01-25 18:02 ` Armin Kuster
2025-01-25 18:02 ` [meta-oe][styhead][PATCH 05/14] libtinyxml: patch CVE-2023-34194 Armin Kuster
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Armin Kuster @ 2025-01-25 18:02 UTC (permalink / raw)
To: openembedded-devel; +Cc: Peter Marko, Khem Raj
From: Peter Marko <peter.marko@siemens.com>
Take patch from Debian:
https://salsa.debian.org/debian/tinyxml/-/commit/38db99c12e43d7d6e349403ce4d39a706708603d
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 066cf35ae588ef5f81266b216624b95d37777661)
[Fixup for styhead context]
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
.../libtinyxml/CVE-2021-42260.patch | 27 +++++++++++++++++++
.../libtinyxml/libtinyxml_2.6.2.bb | 4 ++-
2 files changed, 30 insertions(+), 1 deletion(-)
create mode 100644 meta-oe/recipes-support/libtinyxml/libtinyxml/CVE-2021-42260.patch
diff --git a/meta-oe/recipes-support/libtinyxml/libtinyxml/CVE-2021-42260.patch b/meta-oe/recipes-support/libtinyxml/libtinyxml/CVE-2021-42260.patch
new file mode 100644
index 0000000000..8fc623744c
--- /dev/null
+++ b/meta-oe/recipes-support/libtinyxml/libtinyxml/CVE-2021-42260.patch
@@ -0,0 +1,27 @@
+Description: In stamp always advance the pointer if *p= 0xef
+ .
+ The current implementation only advanced if 0xef is followed
+ by two non-zero bytes. In case of malformed input (0xef should be
+ the start byte of a three byte character) this leads to an infinite
+ loop. (CVE-2021-42260)
+Origin: https://sourceforge.net/p/tinyxml/git/merge-requests/1/
+
+CVE: CVE-2021-42260
+Upstream-Status: Inactive-Upstream [lastrelease: 2011]
+Signed-off-by: Peter Marko <peter.marko@siemens.com>
+
+--- a/tinyxmlparser.cpp
++++ b/tinyxmlparser.cpp
+@@ -274,6 +274,12 @@ void TiXmlParsingData::Stamp( const char* now, TiXmlEncoding encoding )
+ else
+ { p +=3; ++col; } // A normal character.
+ }
++ else
++ {
++ // TIXML_UTF_LEAD_0 (239) is the start character of a 3 byte sequence, so
++ // there is something wrong here. Just advance the pointer to evade infinite loops
++ ++p;
++ }
+ }
+ else
+ {
diff --git a/meta-oe/recipes-support/libtinyxml/libtinyxml_2.6.2.bb b/meta-oe/recipes-support/libtinyxml/libtinyxml_2.6.2.bb
index 2a7ca30a9d..9ab92012f4 100644
--- a/meta-oe/recipes-support/libtinyxml/libtinyxml_2.6.2.bb
+++ b/meta-oe/recipes-support/libtinyxml/libtinyxml_2.6.2.bb
@@ -10,7 +10,9 @@ CVE_PRODUCT = "tinyxml"
SRC_URI = "${SOURCEFORGE_MIRROR}/tinyxml/tinyxml_${@'${PV}'.replace('.', '_')}.tar.gz \
file://enforce-use-stl.patch \
- file://entity-encoding.patch"
+ file://entity-encoding.patch \
+ file://CVE-2021-42260.patch \
+"
SRC_URI[md5sum] = "c1b864c96804a10526540c664ade67f0"
SRC_URI[sha256sum] = "15bdfdcec58a7da30adc87ac2b078e4417dbe5392f3afb719f9ba6d062645593"
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [meta-oe][styhead][PATCH 05/14] libtinyxml: patch CVE-2023-34194
2025-01-25 18:02 [meta-oe][styhead][PATCH 01/14] gphoto2: Fix /usr/bin/gphoto2 runtime error Armin Kuster
` (2 preceding siblings ...)
2025-01-25 18:02 ` [meta-oe][styhead][PATCH 04/14] libtinyxml: patch CVE-2021-42260 Armin Kuster
@ 2025-01-25 18:02 ` Armin Kuster
2025-01-25 18:03 ` [meta-oe][styhead][PATCH 06/14] lapack: fix TMPDIR reference in do_package_qa Armin Kuster
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Armin Kuster @ 2025-01-25 18:02 UTC (permalink / raw)
To: openembedded-devel; +Cc: Peter Marko, Khem Raj
From: Peter Marko <peter.marko@siemens.com>
Take patch from Debian:
https://salsa.debian.org/debian/tinyxml/-/commit/2366e1f23d059d4c20c43c54176b6bd78d6a83fc
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit f4a6966bf0cc48ee7fa83c64c2eec2c4fbf91eb4)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
.../libtinyxml/CVE-2023-34194.patch | 31 +++++++++++++++++++
.../libtinyxml/libtinyxml_2.6.2.bb | 1 +
2 files changed, 32 insertions(+)
create mode 100644 meta-oe/recipes-support/libtinyxml/libtinyxml/CVE-2023-34194.patch
diff --git a/meta-oe/recipes-support/libtinyxml/libtinyxml/CVE-2023-34194.patch b/meta-oe/recipes-support/libtinyxml/libtinyxml/CVE-2023-34194.patch
new file mode 100644
index 0000000000..a94806daad
--- /dev/null
+++ b/meta-oe/recipes-support/libtinyxml/libtinyxml/CVE-2023-34194.patch
@@ -0,0 +1,31 @@
+From: Guilhem Moulin <guilhem@debian.org>
+Date: Sat, 30 Dec 2023 14:15:54 +0100
+Subject: Avoid reachable assertion via crafted XML document with a '\0'
+ located after whitespace
+
+Bug: https://www.forescout.com/resources/sierra21-vulnerabilities
+Bug-Debian: https://bugs.debian.org/1059315
+Bug-Debian: https://security-tracker.debian.org/tracker/CVE-2023-34194
+
+CVE: CVE-2023-34194
+Upstream-Status: Inactive-Upstream [lastrelease: 2011]
+Signed-off-by: Peter Marko <peter.marko@siemens.com>
+---
+ tinyxmlparser.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/tinyxmlparser.cpp b/tinyxmlparser.cpp
+index 8aa0dfa..1601962 100644
+--- a/tinyxmlparser.cpp
++++ b/tinyxmlparser.cpp
+@@ -1606,6 +1606,10 @@ const char* TiXmlDeclaration::Parse( const char* p, TiXmlParsingData* data, TiXm
+ }
+
+ p = SkipWhiteSpace( p, _encoding );
++ if ( !p || !*p )
++ {
++ break;
++ }
+ if ( StringEqual( p, "version", true, _encoding ) )
+ {
+ TiXmlAttribute attrib;
diff --git a/meta-oe/recipes-support/libtinyxml/libtinyxml_2.6.2.bb b/meta-oe/recipes-support/libtinyxml/libtinyxml_2.6.2.bb
index 9ab92012f4..11bc2dde4c 100644
--- a/meta-oe/recipes-support/libtinyxml/libtinyxml_2.6.2.bb
+++ b/meta-oe/recipes-support/libtinyxml/libtinyxml_2.6.2.bb
@@ -12,6 +12,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/tinyxml/tinyxml_${@'${PV}'.replace('.', '_')}.t
file://enforce-use-stl.patch \
file://entity-encoding.patch \
file://CVE-2021-42260.patch \
+ file://CVE-2023-34194.patch \
"
SRC_URI[md5sum] = "c1b864c96804a10526540c664ade67f0"
SRC_URI[sha256sum] = "15bdfdcec58a7da30adc87ac2b078e4417dbe5392f3afb719f9ba6d062645593"
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [meta-oe][styhead][PATCH 06/14] lapack: fix TMPDIR reference in do_package_qa
2025-01-25 18:02 [meta-oe][styhead][PATCH 01/14] gphoto2: Fix /usr/bin/gphoto2 runtime error Armin Kuster
` (3 preceding siblings ...)
2025-01-25 18:02 ` [meta-oe][styhead][PATCH 05/14] libtinyxml: patch CVE-2023-34194 Armin Kuster
@ 2025-01-25 18:03 ` Armin Kuster
2025-01-25 18:03 ` [meta-oe][styhead][PATCH 07/14] libtinyxml2: set CVE product to tinyxml2 Armin Kuster
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Armin Kuster @ 2025-01-25 18:03 UTC (permalink / raw)
To: openembedded-devel; +Cc: Zhang Peng, Khem Raj
From: Zhang Peng <peng.zhang1.cn@windriver.com>
When building the `lapack` package, the following QA error occurs:
"File /usr/lib64/libblas.so.3.12.0 in package lapack contains reference to TMPDIR [buildpaths]"
The issue arises because the `xerbla.o` object file embeds the absolute host path of `xerbla.f`.
This occurs during compilation, where the build command in `build.make` (generated by CMake) specifies:
`gfortran -c <absolute path>/xerbla.f -o`.
As a result, the absolute path is included in `xerbla.o`. Unfortunately, `gfortran` does not support
flags like `-fdebug-prefix-map` or `-ffile-prefix-map` to remove such paths.
To resolve this, the fix involves replacing the absolute path of `xerbla.f` in the generated
`build.make` file with a relative path before the compilation step. This ensures that the
resulting `xerbla.o` does not contain any references to TMPDIR, passing the `do_package_qa` check.
For ptest code, the solution is to replace `${WORKDIR}` with `../../..` in the generated `build.make`
files located in the TESTING directory.
Signed-off-by: Zhang Peng <peng.zhang1.cn@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit b617496fb08950c155e75c8f21bafb10e301095c)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
.../recipes-devtools/lapack/lapack_3.12.0.bb | 31 +++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/meta-oe/recipes-devtools/lapack/lapack_3.12.0.bb b/meta-oe/recipes-devtools/lapack/lapack_3.12.0.bb
index fef9d3a80e..4357515b71 100644
--- a/meta-oe/recipes-devtools/lapack/lapack_3.12.0.bb
+++ b/meta-oe/recipes-devtools/lapack/lapack_3.12.0.bb
@@ -33,6 +33,37 @@ OECMAKE_GENERATOR = "Unix Makefiles"
inherit cmake pkgconfig ptest
EXCLUDE_FROM_WORLD = "1"
+# The `xerbla.o` file contains an absolute path in `xerbla.f.o`, but the options
+# `-fdebug-prefix-map` and `-ffile-prefix-map` cannot be used because gfortran does not support them.
+# To address this issue, we manually replace the absolute path with a relative path
+# in the generated `build.make` file.
+#
+# An issue has been reported: https://github.com/Reference-LAPACK/lapack/issues/1087,
+# requesting a fix in the source code.
+#
+# This workaround resolves the TMPDIR [buildpaths] issue by converting the absolute path
+# of `xerbla.f` to a relative path. The steps are as follows:
+#
+# 1. Locate all `build.make` files after the `do_configure` step is completed.
+# 2. Compute the relative path for `xerbla.f` based on the current build directory.
+# 3. Replace the absolute path with the calculated relative path in the `build.make` files
+#
+# Additionally, when ptests are enabled, apply a simpler workaround for ptest code:
+# - Replace occurrences of `${WORKDIR}` in all `build.make` files under the TESTING directory, excluding
+# the MATGEN subdirectory, with a relative path prefix of `"../../.."`.
+do_configure:append(){
+ for file in `find ${B} -name build.make`; do
+ sed -i -e "s#\(.*-c \).*\(/xerbla\.f \)#\1$(grep '\-c .*xerbla\.f' $file | awk -F'cd ' '{print $2}'| \
+ awk '{src=$1; sub(/.*-c /, ""); sub(/xerbla\.f.*/, ""); obj=$0; print src, obj}' | \
+ while read src obj; do echo "$(realpath --relative-to="$src" "$obj")"; done)\2#g" $file
+ done
+ if (${@bb.utils.contains('PTEST_ENABLED', '1', 'true', 'false', d)});then
+ for file in `find . -name build.make -path '*TESTING*' -not -path '*MATGEN*'`; do
+ sed -i -e "s#\(.*-c \)\(${WORKDIR}\)\(.*.[f|F] \)#\1../../..\3#g" $file
+ done
+ fi
+}
+
do_install_ptest () {
rsync -a ${B}/TESTING ${D}${PTEST_PATH} \
--exclude CMakeFiles \
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [meta-oe][styhead][PATCH 07/14] libtinyxml2: set CVE product to tinyxml2
2025-01-25 18:02 [meta-oe][styhead][PATCH 01/14] gphoto2: Fix /usr/bin/gphoto2 runtime error Armin Kuster
` (4 preceding siblings ...)
2025-01-25 18:03 ` [meta-oe][styhead][PATCH 06/14] lapack: fix TMPDIR reference in do_package_qa Armin Kuster
@ 2025-01-25 18:03 ` Armin Kuster
2025-01-25 18:03 ` [meta-oe][styhead][PATCH 08/14] procmail: patch CVE-2014-3618 Armin Kuster
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Armin Kuster @ 2025-01-25 18:03 UTC (permalink / raw)
To: openembedded-devel; +Cc: Jörg Sommer, Khem Raj
From: Jörg Sommer <joerg.sommer@navimatix.de>
This library gets tracked with the product name tinyxml2:
https://nvd.nist.gov/products/cpe/detail/5A6C04CB-E6AD-4740-882A-34620AEC060A
Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 1c60b8ccf7a011fcac05714fc29d47bbc21c5ea3)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
meta-oe/recipes-support/libtinyxml2/libtinyxml2_10.0.0.bb | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta-oe/recipes-support/libtinyxml2/libtinyxml2_10.0.0.bb b/meta-oe/recipes-support/libtinyxml2/libtinyxml2_10.0.0.bb
index bcd309282b..2ee43ebc03 100644
--- a/meta-oe/recipes-support/libtinyxml2/libtinyxml2_10.0.0.bb
+++ b/meta-oe/recipes-support/libtinyxml2/libtinyxml2_10.0.0.bb
@@ -3,6 +3,7 @@ HOMEPAGE = "https://leethomason.github.io/tinyxml2"
SECTION = "libs"
LICENSE = "Zlib"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=135624eef03e1f1101b9ba9ac9b5fffd"
+CVE_PRODUCT = "tinyxml2"
SRCREV = "321ea883b7190d4e85cae5512a12e5eaa8f8731f"
SRC_URI = "git://github.com/leethomason/tinyxml2.git;branch=master;protocol=https \
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [meta-oe][styhead][PATCH 08/14] procmail: patch CVE-2014-3618
2025-01-25 18:02 [meta-oe][styhead][PATCH 01/14] gphoto2: Fix /usr/bin/gphoto2 runtime error Armin Kuster
` (5 preceding siblings ...)
2025-01-25 18:03 ` [meta-oe][styhead][PATCH 07/14] libtinyxml2: set CVE product to tinyxml2 Armin Kuster
@ 2025-01-25 18:03 ` Armin Kuster
2025-01-25 18:03 ` [meta-oe][styhead][PATCH 09/14] procmail: patch CVE-2017-16844 Armin Kuster
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Armin Kuster @ 2025-01-25 18:03 UTC (permalink / raw)
To: openembedded-devel; +Cc: Peter Marko, Khem Raj
From: Peter Marko <peter.marko@siemens.com>
Take patch from Debian.
https://sources.debian.org/data/main/p/procmail/3.22-20%2Bdeb7u1/debian/patches/CVE-2014-3618.patch
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 8378820dab0b6955fb0e2b27f24a1626f9124e5b)
[Fixup for styhead context]
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
.../procmail/procmail/CVE-2014-3618.patch | 29 +++++++++++++++++++
.../recipes-support/procmail/procmail_3.22.bb | 4 ++-
2 files changed, 32 insertions(+), 1 deletion(-)
create mode 100644 meta-oe/recipes-support/procmail/procmail/CVE-2014-3618.patch
diff --git a/meta-oe/recipes-support/procmail/procmail/CVE-2014-3618.patch b/meta-oe/recipes-support/procmail/procmail/CVE-2014-3618.patch
new file mode 100644
index 0000000000..b041924361
--- /dev/null
+++ b/meta-oe/recipes-support/procmail/procmail/CVE-2014-3618.patch
@@ -0,0 +1,29 @@
+Description: Fix heap-overflow in formail
+ CVE-2014-3618: Heap-overflow in formail when processing
+ specially-crafted email headers.
+Origin: http://www.openwall.com/lists/oss-security/2014/09/03/8
+Bug-Debian: https://bugs.debian.org/704675
+Bug-Debian: https://bugs.debian.org/760443
+Forwarded: not-needed
+Last-Update: 2014-09-04
+
+CVE: CVE-2014-3618
+Upstream-Status: Inactive-Upstream [lastrelease: 2001]
+Signed-off-by: Peter Marko <peter.marko@siemens.com>
+
+--- a/src/formisc.c
++++ b/src/formisc.c
+@@ -84,12 +84,11 @@ normal: *target++= *start++;
+ case '"':*target++=delim='"';start++;
+ }
+ ;{ int i;
+- do
++ while(*start)
+ if((i= *target++= *start++)==delim) /* corresponding delimiter? */
+ break;
+ else if(i=='\\'&&*start) /* skip quoted character */
+ *target++= *start++;
+- while(*start); /* anything? */
+ }
+ hitspc=2;
+ }
diff --git a/meta-oe/recipes-support/procmail/procmail_3.22.bb b/meta-oe/recipes-support/procmail/procmail_3.22.bb
index abb87f9935..4806bf5f80 100644
--- a/meta-oe/recipes-support/procmail/procmail_3.22.bb
+++ b/meta-oe/recipes-support/procmail/procmail_3.22.bb
@@ -12,7 +12,9 @@ SRC_URI = "http://www.ring.gr.jp/archives/net/mail/${BPN}/${BP}.tar.gz \
file://from-debian-to-fix-compile-errors.patch \
file://from-debian-to-modify-parameters.patch \
file://from-debian-to-fix-man-file.patch \
- file://man-file-mailstat.1-from-debian.patch"
+ file://man-file-mailstat.1-from-debian.patch \
+ file://CVE-2014-3618.patch \
+"
SRC_URI[md5sum] = "1678ea99b973eb77eda4ecf6acae53f1"
SRC_URI[sha256sum] = "087c75b34dd33d8b9df5afe9e42801c9395f4bf373a784d9bc97153b0062e117"
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [meta-oe][styhead][PATCH 09/14] procmail: patch CVE-2017-16844.
2025-01-25 18:02 [meta-oe][styhead][PATCH 01/14] gphoto2: Fix /usr/bin/gphoto2 runtime error Armin Kuster
` (6 preceding siblings ...)
2025-01-25 18:03 ` [meta-oe][styhead][PATCH 08/14] procmail: patch CVE-2014-3618 Armin Kuster
@ 2025-01-25 18:03 ` Armin Kuster
2025-01-25 18:03 ` [meta-oe][styhead][PATCH 10/14] audiofile: fix multiple CVEs Armin Kuster
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Armin Kuster @ 2025-01-25 18:03 UTC (permalink / raw)
To: openembedded-devel; +Cc: Peter Marko, Khem Raj
From: Peter Marko <peter.marko@siemens.com>
Take patch from Debian.
https://sources.debian.org/data/main/p/procmail/3.22-26%2Bdeb10u1/debian/patches/30
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 3d97f4c13d5f5810659e107f6461f0b63f6fa92a)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
.../procmail/procmail/CVE-2017-16844.patch | 20 +++++++++++++++++++
.../recipes-support/procmail/procmail_3.22.bb | 1 +
2 files changed, 21 insertions(+)
create mode 100644 meta-oe/recipes-support/procmail/procmail/CVE-2017-16844.patch
diff --git a/meta-oe/recipes-support/procmail/procmail/CVE-2017-16844.patch b/meta-oe/recipes-support/procmail/procmail/CVE-2017-16844.patch
new file mode 100644
index 0000000000..6e04989c33
--- /dev/null
+++ b/meta-oe/recipes-support/procmail/procmail/CVE-2017-16844.patch
@@ -0,0 +1,20 @@
+From: Santiago Vila <sanvila@debian.org>
+Subject: Fix heap-based buffer overflow in loadbuf()
+Bug-Debian: http://bugs.debian.org/876511
+X-Debian-version: 3.22-26
+
+CVE: CVE-2017-16844
+Upstream-Status: Inactive-Upstream [lastrelease: 2001]
+Signed-off-by: Peter Marko <peter.marko@siemens.com>
+
+--- a/src/formisc.c
++++ b/src/formisc.c
+@@ -103,7 +103,7 @@
+ }
+ /* append to buf */
+ void loadbuf(text,len)const char*const text;const size_t len;
+-{ if(buffilled+len>buflen) /* buf can't hold the text */
++{ while(buffilled+len>buflen) /* buf can't hold the text */
+ buf=realloc(buf,buflen+=Bsize);
+ tmemmove(buf+buffilled,text,len);buffilled+=len;
+ }
diff --git a/meta-oe/recipes-support/procmail/procmail_3.22.bb b/meta-oe/recipes-support/procmail/procmail_3.22.bb
index 4806bf5f80..16fcf84dad 100644
--- a/meta-oe/recipes-support/procmail/procmail_3.22.bb
+++ b/meta-oe/recipes-support/procmail/procmail_3.22.bb
@@ -14,6 +14,7 @@ SRC_URI = "http://www.ring.gr.jp/archives/net/mail/${BPN}/${BP}.tar.gz \
file://from-debian-to-fix-man-file.patch \
file://man-file-mailstat.1-from-debian.patch \
file://CVE-2014-3618.patch \
+ file://CVE-2017-16844.patch \
"
SRC_URI[md5sum] = "1678ea99b973eb77eda4ecf6acae53f1"
SRC_URI[sha256sum] = "087c75b34dd33d8b9df5afe9e42801c9395f4bf373a784d9bc97153b0062e117"
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [meta-oe][styhead][PATCH 10/14] audiofile: fix multiple CVEs
2025-01-25 18:02 [meta-oe][styhead][PATCH 01/14] gphoto2: Fix /usr/bin/gphoto2 runtime error Armin Kuster
` (7 preceding siblings ...)
2025-01-25 18:03 ` [meta-oe][styhead][PATCH 09/14] procmail: patch CVE-2017-16844 Armin Kuster
@ 2025-01-25 18:03 ` Armin Kuster
2025-01-25 18:03 ` [meta-oe][styhead][PATCH 11/14] audiofile: patch CVE-2017-6829 Armin Kuster
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Armin Kuster @ 2025-01-25 18:03 UTC (permalink / raw)
To: openembedded-devel; +Cc: Peter Marko, Khem Raj
From: Peter Marko <peter.marko@siemens.com>
CVE-2017-6827 / CVE-2017-6828 / CVE-2017-6832 / CVE-2017-6833 / CVE-2017-6835 / CVE-2017-6837
Use patch from buildroot:
https://github.com/buildroot/buildroot/commit/cc00bde57fc20d11f8fa4e8ec5f193c091714c55
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 634cbcb91c3ab7154e0cda707663a1e4aa500f4a)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
.../audiofile/audiofile_0.3.6.bb | 1 +
...ays-check-the-number-of-coefficients.patch | 45 +++++++++++++++++++
2 files changed, 46 insertions(+)
create mode 100644 meta-oe/recipes-multimedia/audiofile/files/0004-Always-check-the-number-of-coefficients.patch
diff --git a/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb b/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb
index a09f84381e..7654c073f4 100644
--- a/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb
+++ b/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb
@@ -13,6 +13,7 @@ SRC_URI = " \
file://0001-fix-negative-shift-constants.patch \
file://0002-fix-build-on-gcc6.patch \
file://0003-fix-CVE-2015-7747.patch \
+ file://0004-Always-check-the-number-of-coefficients.patch \
"
SRC_URI[md5sum] = "235dde14742317328f0109e9866a8008"
SRC_URI[sha256sum] = "ea2449ad3f201ec590d811db9da6d02ffc5e87a677d06b92ab15363d8cb59782"
diff --git a/meta-oe/recipes-multimedia/audiofile/files/0004-Always-check-the-number-of-coefficients.patch b/meta-oe/recipes-multimedia/audiofile/files/0004-Always-check-the-number-of-coefficients.patch
new file mode 100644
index 0000000000..282f4c01b9
--- /dev/null
+++ b/meta-oe/recipes-multimedia/audiofile/files/0004-Always-check-the-number-of-coefficients.patch
@@ -0,0 +1,45 @@
+From c48e4c6503f7dabd41f11d4c9c7b7f8960e7f2c0 Mon Sep 17 00:00:00 2001
+From: Antonio Larrosa <larrosa@kde.org>
+Date: Mon, 6 Mar 2017 12:51:22 +0100
+Subject: [PATCH] Always check the number of coefficients
+
+When building the library with NDEBUG, asserts are eliminated
+so it's better to always check that the number of coefficients
+is inside the array range.
+
+This fixes the 00191-audiofile-indexoob issue in #41
+
+Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
+
+CVE: CVE-2017-6827
+CVE: CVE-2017-6828
+CVE: CVE-2017-6832
+CVE: CVE-2017-6833
+CVE: CVE-2017-6835
+CVE: CVE-2017-6837
+Upstream-Status: Inactive-Upstream [lastrelease: 2013]
+Signed-off-by: Peter Marko <peter.marko@siemens.com>
+---
+ libaudiofile/WAVE.cpp | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/libaudiofile/WAVE.cpp b/libaudiofile/WAVE.cpp
+index 0e81cf7..61f9541 100644
+--- a/libaudiofile/WAVE.cpp
++++ b/libaudiofile/WAVE.cpp
+@@ -281,6 +281,12 @@ status WAVEFile::parseFormat(const Tag &id, uint32_t size)
+
+ /* numCoefficients should be at least 7. */
+ assert(numCoefficients >= 7 && numCoefficients <= 255);
++ if (numCoefficients < 7 || numCoefficients > 255)
++ {
++ _af_error(AF_BAD_HEADER,
++ "Bad number of coefficients");
++ return AF_FAIL;
++ }
+
+ m_msadpcmNumCoefficients = numCoefficients;
+
+--
+2.11.0
+
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [meta-oe][styhead][PATCH 11/14] audiofile: patch CVE-2017-6829
2025-01-25 18:02 [meta-oe][styhead][PATCH 01/14] gphoto2: Fix /usr/bin/gphoto2 runtime error Armin Kuster
` (8 preceding siblings ...)
2025-01-25 18:03 ` [meta-oe][styhead][PATCH 10/14] audiofile: fix multiple CVEs Armin Kuster
@ 2025-01-25 18:03 ` Armin Kuster
2025-01-25 18:03 ` [meta-oe][styhead][PATCH 12/14] audiofile: fix multiple CVEs Armin Kuster
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Armin Kuster @ 2025-01-25 18:03 UTC (permalink / raw)
To: openembedded-devel; +Cc: Peter Marko, Khem Raj
From: Peter Marko <peter.marko@siemens.com>
Use patch from buildroot:
https://github.com/buildroot/buildroot/commit/434890df2a7c131b40fec1c49e6239972ab299d2
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit f29fbaa4650201a059c65572947ed8faa991fcd8)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
.../audiofile/audiofile_0.3.6.bb | 1 +
...ues-to-fix-index-overflow-in-IMA.cpp.patch | 43 +++++++++++++++++++
2 files changed, 44 insertions(+)
create mode 100644 meta-oe/recipes-multimedia/audiofile/files/0005-clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch
diff --git a/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb b/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb
index 7654c073f4..a48bed2a3b 100644
--- a/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb
+++ b/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb
@@ -14,6 +14,7 @@ SRC_URI = " \
file://0002-fix-build-on-gcc6.patch \
file://0003-fix-CVE-2015-7747.patch \
file://0004-Always-check-the-number-of-coefficients.patch \
+ file://0005-clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch \
"
SRC_URI[md5sum] = "235dde14742317328f0109e9866a8008"
SRC_URI[sha256sum] = "ea2449ad3f201ec590d811db9da6d02ffc5e87a677d06b92ab15363d8cb59782"
diff --git a/meta-oe/recipes-multimedia/audiofile/files/0005-clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch b/meta-oe/recipes-multimedia/audiofile/files/0005-clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch
new file mode 100644
index 0000000000..00bb7e597e
--- /dev/null
+++ b/meta-oe/recipes-multimedia/audiofile/files/0005-clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch
@@ -0,0 +1,43 @@
+From 25eb00ce913452c2e614548d7df93070bf0d066f Mon Sep 17 00:00:00 2001
+From: Antonio Larrosa <larrosa@kde.org>
+Date: Mon, 6 Mar 2017 18:02:31 +0100
+Subject: [PATCH] clamp index values to fix index overflow in IMA.cpp
+
+This fixes #33
+(also reported at https://bugzilla.opensuse.org/show_bug.cgi?id=1026981
+and https://blogs.gentoo.org/ago/2017/02/20/audiofile-global-buffer-overflow-in-decodesample-ima-cpp/)
+
+Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
+
+CVE: CVE-2017-6829
+Upstream-Status: Inactive-Upstream [lastrelease: 2013]
+Signed-off-by: Peter Marko <peter.marko@siemens.com>
+---
+ libaudiofile/modules/IMA.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libaudiofile/modules/IMA.cpp b/libaudiofile/modules/IMA.cpp
+index 7476d44..df4aad6 100644
+--- a/libaudiofile/modules/IMA.cpp
++++ b/libaudiofile/modules/IMA.cpp
+@@ -169,7 +169,7 @@ int IMA::decodeBlockWAVE(const uint8_t *encoded, int16_t *decoded)
+ if (encoded[1] & 0x80)
+ m_adpcmState[c].previousValue -= 0x10000;
+
+- m_adpcmState[c].index = encoded[2];
++ m_adpcmState[c].index = clamp(encoded[2], 0, 88);
+
+ *decoded++ = m_adpcmState[c].previousValue;
+
+@@ -210,7 +210,7 @@ int IMA::decodeBlockQT(const uint8_t *encoded, int16_t *decoded)
+ predictor -= 0x10000;
+
+ state.previousValue = clamp(predictor, MIN_INT16, MAX_INT16);
+- state.index = encoded[1] & 0x7f;
++ state.index = clamp(encoded[1] & 0x7f, 0, 88);
+ encoded += 2;
+
+ for (int n=0; n<m_framesPerPacket; n+=2)
+--
+2.11.0
+
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [meta-oe][styhead][PATCH 12/14] audiofile: fix multiple CVEs
2025-01-25 18:02 [meta-oe][styhead][PATCH 01/14] gphoto2: Fix /usr/bin/gphoto2 runtime error Armin Kuster
` (9 preceding siblings ...)
2025-01-25 18:03 ` [meta-oe][styhead][PATCH 11/14] audiofile: patch CVE-2017-6829 Armin Kuster
@ 2025-01-25 18:03 ` Armin Kuster
2025-01-25 18:03 ` [meta-oe][styhead][PATCH 13/14] audiofile: patch CVE-2017-6831 Armin Kuster
2025-01-25 18:03 ` [meta-oe][styhead][PATCH 14/14] audiofile: patch CVE-2017-6839 Armin Kuster
12 siblings, 0 replies; 14+ messages in thread
From: Armin Kuster @ 2025-01-25 18:03 UTC (permalink / raw)
To: openembedded-devel; +Cc: Peter Marko, Khem Raj
From: Peter Marko <peter.marko@siemens.com>
CVE-2017-6830 / CVE-2017-6834 / CVE-2017-6836 / CVE-2017-6838
Use patch from buildroot:
https://github.com/buildroot/buildroot/commit/4a1a8277bba490d227f413e218138e39f1fe1203
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 75f2bd2b3b145d8282db9926d8212c6d81bde99e)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
.../audiofile/audiofile_0.3.6.bb | 1 +
...multiplication-overflow-in-sfconvert.patch | 79 +++++++++++++++++++
2 files changed, 80 insertions(+)
create mode 100644 meta-oe/recipes-multimedia/audiofile/files/0006-Check-for-multiplication-overflow-in-sfconvert.patch
diff --git a/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb b/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb
index a48bed2a3b..8aebe88f26 100644
--- a/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb
+++ b/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb
@@ -15,6 +15,7 @@ SRC_URI = " \
file://0003-fix-CVE-2015-7747.patch \
file://0004-Always-check-the-number-of-coefficients.patch \
file://0005-clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch \
+ file://0006-Check-for-multiplication-overflow-in-sfconvert.patch \
"
SRC_URI[md5sum] = "235dde14742317328f0109e9866a8008"
SRC_URI[sha256sum] = "ea2449ad3f201ec590d811db9da6d02ffc5e87a677d06b92ab15363d8cb59782"
diff --git a/meta-oe/recipes-multimedia/audiofile/files/0006-Check-for-multiplication-overflow-in-sfconvert.patch b/meta-oe/recipes-multimedia/audiofile/files/0006-Check-for-multiplication-overflow-in-sfconvert.patch
new file mode 100644
index 0000000000..ec21b09f30
--- /dev/null
+++ b/meta-oe/recipes-multimedia/audiofile/files/0006-Check-for-multiplication-overflow-in-sfconvert.patch
@@ -0,0 +1,79 @@
+From 7d65f89defb092b63bcbc5d98349fb222ca73b3c Mon Sep 17 00:00:00 2001
+From: Antonio Larrosa <larrosa@kde.org>
+Date: Mon, 6 Mar 2017 13:54:52 +0100
+Subject: [PATCH] Check for multiplication overflow in sfconvert
+
+Checks that a multiplication doesn't overflow when
+calculating the buffer size, and if it overflows,
+reduce the buffer size instead of failing.
+
+This fixes the 00192-audiofile-signintoverflow-sfconvert case
+in #41
+
+Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
+
+CVE: CVE-2017-6830
+CVE: CVE-2017-6834
+CVE: CVE-2017-6836
+CVE: CVE-2017-6838
+Upstream-Status: Inactive-Upstream [lastrelease: 2013]
+Signed-off-by: Peter Marko <peter.marko@siemens.com>
+---
+ sfcommands/sfconvert.c | 34 ++++++++++++++++++++++++++++++++--
+ 1 file changed, 32 insertions(+), 2 deletions(-)
+
+diff --git a/sfcommands/sfconvert.c b/sfcommands/sfconvert.c
+index 80a1bc4..970a3e4 100644
+--- a/sfcommands/sfconvert.c
++++ b/sfcommands/sfconvert.c
+@@ -45,6 +45,33 @@ void printusage (void);
+ void usageerror (void);
+ bool copyaudiodata (AFfilehandle infile, AFfilehandle outfile, int trackid);
+
++int firstBitSet(int x)
++{
++ int position=0;
++ while (x!=0)
++ {
++ x>>=1;
++ ++position;
++ }
++ return position;
++}
++
++#ifndef __has_builtin
++#define __has_builtin(x) 0
++#endif
++
++int multiplyCheckOverflow(int a, int b, int *result)
++{
++#if (defined __GNUC__ && __GNUC__ >= 5) || ( __clang__ && __has_builtin(__builtin_mul_overflow))
++ return __builtin_mul_overflow(a, b, result);
++#else
++ if (firstBitSet(a)+firstBitSet(b)>31) // int is signed, so we can't use 32 bits
++ return true;
++ *result = a * b;
++ return false;
++#endif
++}
++
+ int main (int argc, char **argv)
+ {
+ if (argc == 2)
+@@ -323,8 +350,11 @@ bool copyaudiodata (AFfilehandle infile, AFfilehandle outfile, int trackid)
+ {
+ int frameSize = afGetVirtualFrameSize(infile, trackid, 1);
+
+- const int kBufferFrameCount = 65536;
+- void *buffer = malloc(kBufferFrameCount * frameSize);
++ int kBufferFrameCount = 65536;
++ int bufferSize;
++ while (multiplyCheckOverflow(kBufferFrameCount, frameSize, &bufferSize))
++ kBufferFrameCount /= 2;
++ void *buffer = malloc(bufferSize);
+
+ AFframecount totalFrames = afGetFrameCount(infile, AF_DEFAULT_TRACK);
+ AFframecount totalFramesWritten = 0;
+--
+2.11.0
+
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [meta-oe][styhead][PATCH 13/14] audiofile: patch CVE-2017-6831
2025-01-25 18:02 [meta-oe][styhead][PATCH 01/14] gphoto2: Fix /usr/bin/gphoto2 runtime error Armin Kuster
` (10 preceding siblings ...)
2025-01-25 18:03 ` [meta-oe][styhead][PATCH 12/14] audiofile: fix multiple CVEs Armin Kuster
@ 2025-01-25 18:03 ` Armin Kuster
2025-01-25 18:03 ` [meta-oe][styhead][PATCH 14/14] audiofile: patch CVE-2017-6839 Armin Kuster
12 siblings, 0 replies; 14+ messages in thread
From: Armin Kuster @ 2025-01-25 18:03 UTC (permalink / raw)
To: openembedded-devel; +Cc: Peter Marko, Khem Raj
From: Peter Marko <peter.marko@siemens.com>
Use patch from buildroot:
https://github.com/buildroot/buildroot/commit/bd5f84d301c4e74ca200a9336eca88468ec0e1f3
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 9d668989b1447fb19aff55c1a47acdf8d4e8c5e2)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
.../audiofile/audiofile_0.3.6.bb | 1 +
...ail-when-error-occurs-in-parseFormat.patch | 46 +++++++++++++++++++
2 files changed, 47 insertions(+)
create mode 100644 meta-oe/recipes-multimedia/audiofile/files/0007-Actually-fail-when-error-occurs-in-parseFormat.patch
diff --git a/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb b/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb
index 8aebe88f26..3d0ce3bfbc 100644
--- a/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb
+++ b/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb
@@ -16,6 +16,7 @@ SRC_URI = " \
file://0004-Always-check-the-number-of-coefficients.patch \
file://0005-clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch \
file://0006-Check-for-multiplication-overflow-in-sfconvert.patch \
+ file://0007-Actually-fail-when-error-occurs-in-parseFormat.patch \
"
SRC_URI[md5sum] = "235dde14742317328f0109e9866a8008"
SRC_URI[sha256sum] = "ea2449ad3f201ec590d811db9da6d02ffc5e87a677d06b92ab15363d8cb59782"
diff --git a/meta-oe/recipes-multimedia/audiofile/files/0007-Actually-fail-when-error-occurs-in-parseFormat.patch b/meta-oe/recipes-multimedia/audiofile/files/0007-Actually-fail-when-error-occurs-in-parseFormat.patch
new file mode 100644
index 0000000000..38294ca200
--- /dev/null
+++ b/meta-oe/recipes-multimedia/audiofile/files/0007-Actually-fail-when-error-occurs-in-parseFormat.patch
@@ -0,0 +1,46 @@
+From a2e9eab8ea87c4ffc494d839ebb4ea145eb9f2e6 Mon Sep 17 00:00:00 2001
+From: Antonio Larrosa <larrosa@kde.org>
+Date: Mon, 6 Mar 2017 18:59:26 +0100
+Subject: [PATCH] Actually fail when error occurs in parseFormat
+
+When there's an unsupported number of bits per sample or an invalid
+number of samples per block, don't only print an error message using
+the error handler, but actually stop parsing the file.
+
+This fixes #35 (also reported at
+https://bugzilla.opensuse.org/show_bug.cgi?id=1026983 and
+https://blogs.gentoo.org/ago/2017/02/20/audiofile-heap-based-buffer-overflow-in-imadecodeblockwave-ima-cpp/
+)
+
+Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
+
+CVE: CVE-2017-6831
+Upstream-Status: Inactive-Upstream [lastrelease: 2013]
+Signed-off-by: Peter Marko <peter.marko@siemens.com>
+---
+ libaudiofile/WAVE.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/libaudiofile/WAVE.cpp b/libaudiofile/WAVE.cpp
+index 0e81cf7..d762249 100644
+--- a/libaudiofile/WAVE.cpp
++++ b/libaudiofile/WAVE.cpp
+@@ -326,6 +326,7 @@ status WAVEFile::parseFormat(const Tag &id, uint32_t size)
+ {
+ _af_error(AF_BAD_NOT_IMPLEMENTED,
+ "IMA ADPCM compression supports only 4 bits per sample");
++ return AF_FAIL;
+ }
+
+ int bytesPerBlock = (samplesPerBlock + 14) / 8 * 4 * channelCount;
+@@ -333,6 +334,7 @@ status WAVEFile::parseFormat(const Tag &id, uint32_t size)
+ {
+ _af_error(AF_BAD_CODEC_CONFIG,
+ "Invalid samples per block for IMA ADPCM compression");
++ return AF_FAIL;
+ }
+
+ track->f.sampleWidth = 16;
+--
+2.11.0
+
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [meta-oe][styhead][PATCH 14/14] audiofile: patch CVE-2017-6839
2025-01-25 18:02 [meta-oe][styhead][PATCH 01/14] gphoto2: Fix /usr/bin/gphoto2 runtime error Armin Kuster
` (11 preceding siblings ...)
2025-01-25 18:03 ` [meta-oe][styhead][PATCH 13/14] audiofile: patch CVE-2017-6831 Armin Kuster
@ 2025-01-25 18:03 ` Armin Kuster
12 siblings, 0 replies; 14+ messages in thread
From: Armin Kuster @ 2025-01-25 18:03 UTC (permalink / raw)
To: openembedded-devel; +Cc: Peter Marko, Khem Raj
From: Peter Marko <peter.marko@siemens.com>
Use patch from buildroot:
https://github.com/buildroot/buildroot/commit/844a7c6281eb442881330a5d36d5a0719f2870bf
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 88faae83b2b0e68827c457f4f348f7d7868f5258)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
.../audiofile/audiofile_0.3.6.bb | 1 +
...lication-overflow-in-MSADPCM-decodeS.patch | 126 ++++++++++++++++++
2 files changed, 127 insertions(+)
create mode 100644 meta-oe/recipes-multimedia/audiofile/files/0008-Check-for-multiplication-overflow-in-MSADPCM-decodeS.patch
diff --git a/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb b/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb
index 3d0ce3bfbc..d10c7a8b49 100644
--- a/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb
+++ b/meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb
@@ -17,6 +17,7 @@ SRC_URI = " \
file://0005-clamp-index-values-to-fix-index-overflow-in-IMA.cpp.patch \
file://0006-Check-for-multiplication-overflow-in-sfconvert.patch \
file://0007-Actually-fail-when-error-occurs-in-parseFormat.patch \
+ file://0008-Check-for-multiplication-overflow-in-MSADPCM-decodeS.patch \
"
SRC_URI[md5sum] = "235dde14742317328f0109e9866a8008"
SRC_URI[sha256sum] = "ea2449ad3f201ec590d811db9da6d02ffc5e87a677d06b92ab15363d8cb59782"
diff --git a/meta-oe/recipes-multimedia/audiofile/files/0008-Check-for-multiplication-overflow-in-MSADPCM-decodeS.patch b/meta-oe/recipes-multimedia/audiofile/files/0008-Check-for-multiplication-overflow-in-MSADPCM-decodeS.patch
new file mode 100644
index 0000000000..857ed78c59
--- /dev/null
+++ b/meta-oe/recipes-multimedia/audiofile/files/0008-Check-for-multiplication-overflow-in-MSADPCM-decodeS.patch
@@ -0,0 +1,126 @@
+From beacc44eb8cdf6d58717ec1a5103c5141f1b37f9 Mon Sep 17 00:00:00 2001
+From: Antonio Larrosa <larrosa@kde.org>
+Date: Mon, 6 Mar 2017 13:43:53 +0100
+Subject: [PATCH] Check for multiplication overflow in MSADPCM decodeSample
+
+Check for multiplication overflow (using __builtin_mul_overflow
+if available) in MSADPCM.cpp decodeSample and return an empty
+decoded block if an error occurs.
+
+This fixes the 00193-audiofile-signintoverflow-MSADPCM case of #41
+
+Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
+
+CVE: CVE-2017-6839
+Upstream-Status: Inactive-Upstream [lastrelease: 2013]
+Signed-off-by: Peter Marko <peter.marko@siemens.com>
+---
+ libaudiofile/modules/BlockCodec.cpp | 5 ++--
+ libaudiofile/modules/MSADPCM.cpp | 47 +++++++++++++++++++++++++++++++++----
+ 2 files changed, 46 insertions(+), 6 deletions(-)
+
+diff --git a/libaudiofile/modules/BlockCodec.cpp b/libaudiofile/modules/BlockCodec.cpp
+index 45925e8..4731be1 100644
+--- a/libaudiofile/modules/BlockCodec.cpp
++++ b/libaudiofile/modules/BlockCodec.cpp
+@@ -52,8 +52,9 @@ void BlockCodec::runPull()
+ // Decompress into m_outChunk.
+ for (int i=0; i<blocksRead; i++)
+ {
+- decodeBlock(static_cast<const uint8_t *>(m_inChunk->buffer) + i * m_bytesPerPacket,
+- static_cast<int16_t *>(m_outChunk->buffer) + i * m_framesPerPacket * m_track->f.channelCount);
++ if (decodeBlock(static_cast<const uint8_t *>(m_inChunk->buffer) + i * m_bytesPerPacket,
++ static_cast<int16_t *>(m_outChunk->buffer) + i * m_framesPerPacket * m_track->f.channelCount)==0)
++ break;
+
+ framesRead += m_framesPerPacket;
+ }
+diff --git a/libaudiofile/modules/MSADPCM.cpp b/libaudiofile/modules/MSADPCM.cpp
+index 8ea3c85..ef9c38c 100644
+--- a/libaudiofile/modules/MSADPCM.cpp
++++ b/libaudiofile/modules/MSADPCM.cpp
+@@ -101,24 +101,60 @@ static const int16_t adaptationTable[] =
+ 768, 614, 512, 409, 307, 230, 230, 230
+ };
+
++int firstBitSet(int x)
++{
++ int position=0;
++ while (x!=0)
++ {
++ x>>=1;
++ ++position;
++ }
++ return position;
++}
++
++#ifndef __has_builtin
++#define __has_builtin(x) 0
++#endif
++
++int multiplyCheckOverflow(int a, int b, int *result)
++{
++#if (defined __GNUC__ && __GNUC__ >= 5) || ( __clang__ && __has_builtin(__builtin_mul_overflow))
++ return __builtin_mul_overflow(a, b, result);
++#else
++ if (firstBitSet(a)+firstBitSet(b)>31) // int is signed, so we can't use 32 bits
++ return true;
++ *result = a * b;
++ return false;
++#endif
++}
++
++
+ // Compute a linear PCM value from the given differential coded value.
+ static int16_t decodeSample(ms_adpcm_state &state,
+- uint8_t code, const int16_t *coefficient)
++ uint8_t code, const int16_t *coefficient, bool *ok=NULL)
+ {
+ int linearSample = (state.sample1 * coefficient[0] +
+ state.sample2 * coefficient[1]) >> 8;
++ int delta;
+
+ linearSample += ((code & 0x08) ? (code - 0x10) : code) * state.delta;
+
+ linearSample = clamp(linearSample, MIN_INT16, MAX_INT16);
+
+- int delta = (state.delta * adaptationTable[code]) >> 8;
++ if (multiplyCheckOverflow(state.delta, adaptationTable[code], &delta))
++ {
++ if (ok) *ok=false;
++ _af_error(AF_BAD_COMPRESSION, "Error decoding sample");
++ return 0;
++ }
++ delta >>= 8;
+ if (delta < 16)
+ delta = 16;
+
+ state.delta = delta;
+ state.sample2 = state.sample1;
+ state.sample1 = linearSample;
++ if (ok) *ok=true;
+
+ return static_cast<int16_t>(linearSample);
+ }
+@@ -212,13 +248,16 @@ int MSADPCM::decodeBlock(const uint8_t *encoded, int16_t *decoded)
+ {
+ uint8_t code;
+ int16_t newSample;
++ bool ok;
+
+ code = *encoded >> 4;
+- newSample = decodeSample(*state[0], code, coefficient[0]);
++ newSample = decodeSample(*state[0], code, coefficient[0], &ok);
++ if (!ok) return 0;
+ *decoded++ = newSample;
+
+ code = *encoded & 0x0f;
+- newSample = decodeSample(*state[1], code, coefficient[1]);
++ newSample = decodeSample(*state[1], code, coefficient[1], &ok);
++ if (!ok) return 0;
+ *decoded++ = newSample;
+
+ encoded++;
+--
+2.11.0
+
--
2.43.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
end of thread, other threads:[~2025-01-25 18:03 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-25 18:02 [meta-oe][styhead][PATCH 01/14] gphoto2: Fix /usr/bin/gphoto2 runtime error Armin Kuster
2025-01-25 18:02 ` [meta-oe][styhead][PATCH 02/14] mpd: Upgrade mpd to 0.23.16 Armin Kuster
2025-01-25 18:02 ` [meta-oe][styhead][PATCH 03/14] libtinyxml: set CVE product to tinyxml Armin Kuster
2025-01-25 18:02 ` [meta-oe][styhead][PATCH 04/14] libtinyxml: patch CVE-2021-42260 Armin Kuster
2025-01-25 18:02 ` [meta-oe][styhead][PATCH 05/14] libtinyxml: patch CVE-2023-34194 Armin Kuster
2025-01-25 18:03 ` [meta-oe][styhead][PATCH 06/14] lapack: fix TMPDIR reference in do_package_qa Armin Kuster
2025-01-25 18:03 ` [meta-oe][styhead][PATCH 07/14] libtinyxml2: set CVE product to tinyxml2 Armin Kuster
2025-01-25 18:03 ` [meta-oe][styhead][PATCH 08/14] procmail: patch CVE-2014-3618 Armin Kuster
2025-01-25 18:03 ` [meta-oe][styhead][PATCH 09/14] procmail: patch CVE-2017-16844 Armin Kuster
2025-01-25 18:03 ` [meta-oe][styhead][PATCH 10/14] audiofile: fix multiple CVEs Armin Kuster
2025-01-25 18:03 ` [meta-oe][styhead][PATCH 11/14] audiofile: patch CVE-2017-6829 Armin Kuster
2025-01-25 18:03 ` [meta-oe][styhead][PATCH 12/14] audiofile: fix multiple CVEs Armin Kuster
2025-01-25 18:03 ` [meta-oe][styhead][PATCH 13/14] audiofile: patch CVE-2017-6831 Armin Kuster
2025-01-25 18:03 ` [meta-oe][styhead][PATCH 14/14] audiofile: patch CVE-2017-6839 Armin Kuster
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.