rsyslog: set status for CVE-2015-3243
PATCH 1/6 rsyslog: set status for CVE-2015-3243
Details: https://nvd.nist.gov/vuln/detail/CVE-2015-3243
The issue is about file permissions: by default rsyslog creates world-readable files. In case a log message contains some sensitive information, then that's exposed to every user on the system.
However the rsyslog.conf file that is shipped with the recipe solves it: it already sets non-world-readable default permissions on all files, so this vulnerability is fixed in the default OE recipe.
See also this package in OpenSuse[1], where it is solved the same way.
[1]: https://build.opensuse.org/requests/619439/changes (rsyslog.conf.in)
Adapted to Kirkstone (CVE_STATUS -> CVE_CHECK_IGNORE)
--- meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.conf | 1 + meta-oe/recipes-extended/rsyslog/rsyslog_8.2206.0.bb | 3 +++ 2 files changed, 4 insertions(+)
meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.conf +1 -0
@@ -13,6 +13,7 @@ $ModLoad imklog # kernel logging (formerly provided by rklogd) # # Set the default permissions +# Setting the $FileCreateMode not world readable fixes CVE-2015-3243 # $FileOwner root $FileGroup adm
meta-oe/recipes-extended/rsyslog/rsyslog_8.2206.0.bb +3 -0
@@ -36,6 +36,9 @@ SRC_URI[sha256sum] = "a1377218b26c0767a7a3f67d166d5338af7c24b455d35ec99974e18e68 UPSTREAM_CHECK_URI = "https://github.com/rsyslog/rsyslog/releases" UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)" +# The default rsyslog.conf file contains the fix +CVE_CHECK_IGNORE += "CVE-2015-3243" + inherit autotools pkgconfig systemd update-rc.d ptest EXTRA_OECONF += "--disable-generate-man-pages ap_cv_atomic_builtins=yes"
PATCH 2/6 audiofile: patch CVE-2019-13147 and CVE-2022-24599
Details: https://nvd.nist.gov/vuln/detail/CVE-2019-13147
https://nvd.nist.gov/vuln/detail/CVE-2022-24599
These patches are used by opensuse to mitigate the corresponding vulnerabulities.
--- .../audiofile/audiofile_0.3.6.bb | 2 + .../audiofile/files/CVE-2019-13147.patch | 31 ++++++++++++ .../audiofile/files/CVE-2022-24599.patch | 50 +++++++++++++++++++ 3 files changed, 83 insertions(+) create mode 100644 meta-oe/recipes-multimedia/audiofile/files/CVE-2019-13147.patch create mode 100644 meta-oe/recipes-multimedia/audiofile/files/CVE-2022-24599.patch
meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb +2 -0
@@ -18,6 +18,8 @@ SRC_URI = " \ 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 \ + file://CVE-2019-13147.patch \ + file://CVE-2022-24599.patch \ " SRC_URI[md5sum] = "235dde14742317328f0109e9866a8008" SRC_URI[sha256sum] = "ea2449ad3f201ec590d811db9da6d02ffc5e87a677d06b92ab15363d8cb59782"
meta-oe/recipes-multimedia/audiofile/files/CVE-2019-13147.patch new file +31 -0
@@ -0,0 +1,31 @@ +This patch is taken from opensuse: +https://build.opensuse.org/package/show/multimedia:libs/audiofile + +CVE: CVE-2019-13147 +Upstream-Status: Inactive-Upstream [lastcommit: 2016-Aug-30] +Signed-off-by: Gyorgy Sarvari <[email protected]> + +diff --unified --recursive --text --new-file --color audiofile-0.3.6/libaudiofile/NeXT.cpp audiofile-0.3.6.new/libaudiofile/NeXT.cpp +--- audiofile-0.3.6/libaudiofile/NeXT.cpp 2013-03-06 13:30:03.000000000 +0800 ++++ audiofile-0.3.6.new/libaudiofile/NeXT.cpp 2025-05-14 10:45:11.685700984 +0800 +@@ -32,6 +32,7 @@ + #include <stdint.h> + #include <stdlib.h> + #include <string.h> ++#include <limits.h> + + #include "File.h" + #include "Setup.h" +@@ -122,6 +123,12 @@ + _af_error(AF_BAD_CHANNELS, "invalid file with 0 channels"); + return AF_FAIL; + } ++ /* avoid overflow of INT for double size rate */ ++ if (channelCount > (INT32_MAX / (sizeof(double)))) ++ { ++ _af_error(AF_BAD_CHANNELS, "invalid file with %i channels", channelCount); ++ return AF_FAIL; ++ } + + Track *track = allocateTrack(); + if (!track)
meta-oe/recipes-multimedia/audiofile/files/CVE-2022-24599.patch new file +50 -0
50 lines not on this page · raw message
PATCH 3/6 audiofile: add ptest support
In reply to Gyorgy SarvariIt's under 15 seconds to execute it.
--- .../audiofile/audiofile_0.3.6.bb | 18 +++++++++++++++++- .../audiofile/files/run-ptest | 14 ++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-multimedia/audiofile/files/run-ptest
meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb +17 -1
@@ -10,6 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ SRC_URI = " \ ${GNOME_MIRROR}/audiofile/0.3/${BP}.tar.xz \ + file://run-ptest \ file://0001-fix-negative-shift-constants.patch \ file://0002-fix-build-on-gcc6.patch \ file://0003-fix-CVE-2015-7747.patch \
@@ -24,7 +25,7 @@ SRC_URI = " \ SRC_URI[md5sum] = "235dde14742317328f0109e9866a8008" SRC_URI[sha256sum] = "ea2449ad3f201ec590d811db9da6d02ffc5e87a677d06b92ab15363d8cb59782" -inherit autotools lib_package pkgconfig +inherit autotools lib_package pkgconfig ptest DEPENDS = " \ asciidoc-native \
@@ -32,3 +33,18 @@ DEPENDS = " \ libogg \ flac \ " + +do_compile_ptest(){ + oe_runmake -C gtest libgtest.la + cd test + # Query the TESTS variable value, remove the $(...) parts from it, + # compile as make target along with FLAC (which is an optional test) + oe_runmake `make -p | grep "^TESTS = " | sed 's/$([^)]*)//g' | cut -d= -f2` FLAC +} + +do_install_ptest(){ + install -d ${D}${PTEST_PATH}/test + for t in test/.libs/*; do + install $t ${D}${PTEST_PATH}/test/ + done +}
meta-oe/recipes-multimedia/audiofile/files/run-ptest new file +14 -0
@@ -0,0 +1,14 @@ +#!/bin/sh + +RES=0 +cd test +for t in *; do + if ./$t; then + echo PASS: $t + else + echo FAIL: $t + RES=1 + fi +done + +exit $RES
PATCH 4/6 audiofile: backport test for CVE-2015-7747
In reply to Gyorgy SarvariThis is a backported patch from opensuse, which contains a testcase for CVE-2015-7747 (which is already patched in ths recipe, but not tested explicitly).
--- .../audiofile/audiofile_0.3.6.bb | 1 + .../files/test-for-CVE-2015-7747.patch | 166 ++++++++++++++++++ 2 files changed, 167 insertions(+) create mode 100644 meta-oe/recipes-multimedia/audiofile/files/test-for-CVE-2015-7747.patch
meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb +1 -0
@@ -19,6 +19,7 @@ SRC_URI = " \ 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 \ + file://test-for-CVE-2015-7747.patch \ file://CVE-2019-13147.patch \ file://CVE-2022-24599.patch \ "
meta-oe/recipes-multimedia/audiofile/files/test-for-CVE-2015-7747.patch new file +166 -0
166 lines not on this page · raw message
PATCH 5/6 audiofile: patch CVE-2018-13440 and CVE-2018-17059
In reply to Gyorgy SarvariDetails:
https://nvd.nist.gov/vuln/detail/CVE-2018-13440
https://nvd.nist.gov/vuln/detail/CVE-2018-17059
The patches have been backported from Debian - upstream has been inactive for almost a decade by now.
--- .../audiofile/audiofile_0.3.6.bb | 2 ++ .../audiofile/files/CVE-2018-13440.patch | 36 +++++++++++++++++++ .../audiofile/files/CVE-2018-17059.patch | 35 ++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 meta-oe/recipes-multimedia/audiofile/files/CVE-2018-13440.patch create mode 100644 meta-oe/recipes-multimedia/audiofile/files/CVE-2018-17059.patch
meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb +2 -0
@@ -22,6 +22,8 @@ SRC_URI = " \ file://test-for-CVE-2015-7747.patch \ file://CVE-2019-13147.patch \ file://CVE-2022-24599.patch \ + file://CVE-2018-13440.patch \ + file://CVE-2018-17059.patch \ " SRC_URI[md5sum] = "235dde14742317328f0109e9866a8008" SRC_URI[sha256sum] = "ea2449ad3f201ec590d811db9da6d02ffc5e87a677d06b92ab15363d8cb59782"
meta-oe/recipes-multimedia/audiofile/files/CVE-2018-13440.patch new file +36 -0
@@ -0,0 +1,36 @@ +From fde6d79fb8363c4a329a184ef0b107156602b225 Mon Sep 17 00:00:00 2001 +From: Wim Taymans <[email protected]> +Date: Thu, 27 Sep 2018 10:48:45 +0200 +Subject: [PATCH] ModuleState: handle compress/decompress init failure + +When the unit initcompress or initdecompress function fails, +m_fileModule is NULL. Return AF_FAIL in that case instead of +causing NULL pointer dereferences later. + +Fixes #49 + +This patch has been backported from Debian: +https://sources.debian.org/src/audiofile/0.3.6-7/debian/patches/11_CVE-2018-13440.patch + +CVE: CVE-2018-13440 +Upstream-Status: Inactive-Upstream [lastcommit: 2016-Aug-30] +Signed-off-by: Gyorgy Sarvari <[email protected]> + +--- + libaudiofile/modules/ModuleState.cpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/libaudiofile/modules/ModuleState.cpp b/libaudiofile/modules/ModuleState.cpp +index 0c29d7a..070fd9b 100644 +--- a/libaudiofile/modules/ModuleState.cpp ++++ b/libaudiofile/modules/ModuleState.cpp +@@ -75,6 +75,9 @@ status ModuleState::initFileModule(AFfilehandle file, Track *track) + m_fileModule = unit->initcompress(track, file->m_fh, file->m_seekok, + file->m_fileFormat == AF_FILE_RAWDATA, &chunkFrames); + ++ if (!m_fileModule) ++ return AF_FAIL; ++ + if (unit->needsRebuffer) + { + assert(unit->nativeSampleFormat == AF_SAMPFMT_TWOSCOMP);
meta-oe/recipes-multimedia/audiofile/files/CVE-2018-17059.patch new file +35 -0
@@ -0,0 +1,35 @@ +From 822b732fd31ffcb78f6920001e9b1fbd815fa712 Mon Sep 17 00:00:00 2001 +From: Wim Taymans <[email protected]> +Date: Thu, 27 Sep 2018 12:11:12 +0200 +Subject: [PATCH] SimpleModule: set output chunk framecount after pull + +After pulling the data, set the output chunk to the amount of +frames we pulled so that the next module in the chain has the correct +frame count. + +Fixes #50 and #51 + +This patch has been backported from Debian: +https://sources.debian.org/src/audiofile/0.3.6-7/debian/patches/12_CVE-2018-17095.patch + +CVE: CVE-2018-17095 + +Upstream-Status: Inactive-Upstream [lastcommit: 2016-Aug-30] +Signed-off-by: Gyorgy Sarvari <[email protected]> + +--- + libaudiofile/modules/SimpleModule.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libaudiofile/modules/SimpleModule.cpp b/libaudiofile/modules/SimpleModule.cpp +index 2bae1eb..e87932c 100644 +--- a/libaudiofile/modules/SimpleModule.cpp ++++ b/libaudiofile/modules/SimpleModule.cpp +@@ -26,6 +26,7 @@ + void SimpleModule::runPull() + { + pull(m_outChunk->frameCount); ++ m_outChunk->frameCount = m_inChunk->frameCount; + run(*m_inChunk, *m_outChunk); + } +
PATCH 6/6 audiofile: Fix build with clang++
In reply to Gyorgy SarvariFrom: Khem Raj <[email protected]>
When tests are enabled additional C++ code is compiled and clang does not like the code.
--- .../audiofile/audiofile_0.3.6.bb | 1 + ...test-sign.cpp-Fix-C-narrowing-errors.patch | 41 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 meta-oe/recipes-multimedia/audiofile/files/0001-test-sign.cpp-Fix-C-narrowing-errors.patch
meta-oe/recipes-multimedia/audiofile/audiofile_0.3.6.bb +1 -0
@@ -19,6 +19,7 @@ SRC_URI = " \ 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 \ + file://0001-test-sign.cpp-Fix-C-narrowing-errors.patch \ file://test-for-CVE-2015-7747.patch \ file://CVE-2019-13147.patch \ file://CVE-2022-24599.patch \
meta-oe/recipes-multimedia/audiofile/files/0001-test-sign.cpp-Fix-C-narrowing-errors.patch new file +41 -0
41 lines not on this page · raw message