libde265: patch CVE-2023-43887
PATCH 1/5 libde265: patch CVE-2023-43887
From: Ankur Tyagi <[email protected]>
Details: https://nvd.nist.gov/vuln/detail/CVE-2023-43887
--- .../libde265/libde265/CVE-2023-43887.patch | 39 +++++++++++++++++++ .../libde265/libde265_1.0.12.bb | 4 +- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 meta-multimedia/recipes-multimedia/libde265/libde265/CVE-2023-43887.patch
meta-multimedia/recipes-multimedia/libde265/libde265/CVE-2023-43887.patch new file +39 -0
@@ -0,0 +1,39 @@ +From e31a5389f2a4967b9ca298a3435d1af2f9a04cda Mon Sep 17 00:00:00 2001 +From: Dirk Farin <[email protected]> +Date: Fri, 1 Sep 2023 21:18:48 +0200 +Subject: [PATCH] fix #418 + +CVE: CVE-2023-43887 +Upstream-Status: Backport [https://github.com/strukturag/libde265/commit/63b596c915977f038eafd7647d1db25488a8c133] +(cherry picked from commit 63b596c915977f038eafd7647d1db25488a8c133) +Signed-off-by: Ankur Tyagi <[email protected]> +--- + libde265/decctx.cc | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/libde265/decctx.cc b/libde265/decctx.cc +index 223a6aaf..350f7e7a 100644 +--- a/libde265/decctx.cc ++++ b/libde265/decctx.cc +@@ -582,16 +582,17 @@ de265_error decoder_context::read_pps_NAL(bitreader& reader) + std::shared_ptr<pic_parameter_set> new_pps = std::make_shared<pic_parameter_set>(); + + bool success = new_pps->read(&reader,this); ++ if (!success) { ++ return DE265_WARNING_PPS_HEADER_INVALID; ++ } + + if (param_pps_headers_fd>=0) { + new_pps->dump(param_pps_headers_fd); + } + +- if (success) { +- pps[ (int)new_pps->pic_parameter_set_id ] = new_pps; +- } ++ pps[ (int)new_pps->pic_parameter_set_id ] = new_pps; + +- return success ? DE265_OK : DE265_WARNING_PPS_HEADER_INVALID; ++ return DE265_OK; + } + + de265_error decoder_context::read_sei_NAL(bitreader& reader, bool suffix)
meta-multimedia/recipes-multimedia/libde265/libde265_1.0.12.bb +3 -1
@@ -8,7 +8,9 @@ LICENSE = "LGPL-3.0-only & MIT" LICENSE_FLAGS = "commercial" LIC_FILES_CHKSUM = "file://COPYING;md5=695b556799abb2435c97a113cdca512f" -SRC_URI = "git://github.com/strukturag/libde265.git;branch=master;protocol=https" +SRC_URI = "git://github.com/strukturag/libde265.git;branch=master;protocol=https \ + file://CVE-2023-43887.patch \ +" SRCREV = "a267c84707ab264928fa9b86de2ee749c48c318c" S = "${WORKDIR}/git"
PATCH 2/5 libde265: patch CVE-2023-47471
From: Ankur Tyagi <[email protected]>
Details: https://nvd.nist.gov/vuln/detail/CVE-2023-47471
--- .../libde265/libde265/CVE-2023-47471.patch | 42 +++++++++++++++++++ .../libde265/libde265_1.0.12.bb | 1 + 2 files changed, 43 insertions(+) create mode 100644 meta-multimedia/recipes-multimedia/libde265/libde265/CVE-2023-47471.patch
meta-multimedia/recipes-multimedia/libde265/libde265/CVE-2023-47471.patch new file +42 -0
@@ -0,0 +1,42 @@ +From 78bd5752157f34e822cefd8ff8959a96a26b4841 Mon Sep 17 00:00:00 2001 +From: Dirk Farin <[email protected]> +Date: Sat, 4 Nov 2023 15:20:50 +0100 +Subject: [PATCH] null-pointer check in debug output (fixes #426) + +CVE: CVE-2023-47471 +Upstream-Status: Backport [https://github.com/strukturag/libde265/commit/e36b4a1b0bafa53df47514c419d5be3e8916ebc7] +(cherry picked from commit e36b4a1b0bafa53df47514c419d5be3e8916ebc7) +Signed-off-by: Ankur Tyagi <[email protected]> +--- + libde265/slice.cc | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/libde265/slice.cc b/libde265/slice.cc +index 280b7417..435123dc 100644 +--- a/libde265/slice.cc ++++ b/libde265/slice.cc +@@ -1277,14 +1277,23 @@ void slice_segment_header::dump_slice_segment_header(const decoder_context* ctx, + #define LOG3(t,d1,d2,d3) log2fh(fh, t,d1,d2,d3) + #define LOG4(t,d1,d2,d3,d4) log2fh(fh, t,d1,d2,d3,d4) + ++ LOG0("----------------- SLICE -----------------\n"); ++ + const pic_parameter_set* pps = ctx->get_pps(slice_pic_parameter_set_id); ++ if (!pps) { ++ LOG0("invalid PPS referenced\n"); ++ return; ++ } + assert(pps->pps_read); // TODO: error handling + + const seq_parameter_set* sps = ctx->get_sps((int)pps->seq_parameter_set_id); ++ if (!sps) { ++ LOG0("invalid SPS referenced\n"); ++ return; ++ } + assert(sps->sps_read); // TODO: error handling + + +- LOG0("----------------- SLICE -----------------\n"); + LOG1("first_slice_segment_in_pic_flag : %d\n", first_slice_segment_in_pic_flag); + if (ctx->get_nal_unit_type() >= NAL_UNIT_BLA_W_LP && + ctx->get_nal_unit_type() <= NAL_UNIT_RESERVED_IRAP_VCL23) {
meta-multimedia/recipes-multimedia/libde265/libde265_1.0.12.bb +1 -0
@@ -10,6 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=695b556799abb2435c97a113cdca512f" SRC_URI = "git://github.com/strukturag/libde265.git;branch=master;protocol=https \ file://CVE-2023-43887.patch \ + file://CVE-2023-47471.patch \ " SRCREV = "a267c84707ab264928fa9b86de2ee749c48c318c"
PATCH 3/5 sox: extend CVE_PRODUCT
In reply to [email protected]From: Peter Marko <[email protected]>
Add all relevant items from queries:
$ sqlite3 nvdcve_2-2.db sqlite> select vendor, product, count(*) from products where product like '%sox%' group by vendor, product; commugen|sox_365|1 libsox_project|libsox|1 sox|sox|3 sox_project|sox|10 sqlite> select vendor, product, count(*) from products where product like '%sound_exchange%' group by vendor, product; sound_exchange_project|sound_exchange|16
--- meta-multimedia/recipes-multimedia/sox/sox_14.4.2.bb | 2 ++ 1 file changed, 2 insertions(+)
meta-multimedia/recipes-multimedia/sox/sox_14.4.2.bb +2 -0
@@ -34,6 +34,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/sox/sox-${PV}.tar.gz \ SRC_URI[md5sum] = "d04fba2d9245e661f245de0577f48a33" SRC_URI[sha256sum] = "b45f598643ffbd8e363ff24d61166ccec4836fea6d3888881b8df53e3bb55f6c" +CVE_PRODUCT:append = " libsox_project:libsox sound_exchange_project:sound_exchange" + inherit autotools pkgconfig # Enable largefile support
PATCH 4/5 vlc: patch CVE-2024-46461
In reply to [email protected]From: Ankur Tyagi <[email protected]>
Details: https://nvd.nist.gov/vuln/detail/CVE-2024-46461
Backport the patch mentioned in the news[1] that fixes this vulnerabililty.
https://code.videolan.org/videolan/vlc/-/blob/3.0.21/NEWS?ref_type=tags#L44
--- .../vlc/vlc/CVE-2024-46461.patch | 44 +++++++++++++++++++ .../recipes-multimedia/vlc/vlc_3.0.20.bb | 1 + 2 files changed, 45 insertions(+) create mode 100644 meta-multimedia/recipes-multimedia/vlc/vlc/CVE-2024-46461.patch
meta-multimedia/recipes-multimedia/vlc/vlc/CVE-2024-46461.patch new file +44 -0
@@ -0,0 +1,44 @@ +From aafb226321a525169fd68bf4708e7c6f15e4307a Mon Sep 17 00:00:00 2001 +From: Thomas Guillem <[email protected]> +Date: Tue, 9 Jan 2024 06:58:39 +0100 +Subject: [PATCH] mms: fix potential integer overflow + +That could lead to a heap buffer overflow. + +Thanks Andreas Fobian for the security report. + +(cherry picked from commit 467b24dd0f9b0b3d8ba11dd813b393892f7f1ed2) +Signed-off-by: Jean-Baptiste Kempf <[email protected]> + +CVE: CVE-2024-46461 +Upstream-Status: Backport [https://code.videolan.org/videolan/vlc/-/commit/e7f98f3632d793c3921bfe72595721af191e670e] +(cherry picked from commit e7f98f3632d793c3921bfe72595721af191e670e) +Signed-off-by: Ankur Tyagi <[email protected]> +--- + modules/access/mms/mmstu.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/modules/access/mms/mmstu.c b/modules/access/mms/mmstu.c +index f795b0bd43..f10e38cd43 100644 +--- a/modules/access/mms/mmstu.c ++++ b/modules/access/mms/mmstu.c +@@ -1316,14 +1316,16 @@ static int mms_ParsePacket( stream_t *p_access, + + if( i_packet_id == p_sys->i_header_packet_id_type ) + { +- uint8_t *p_reaced = realloc( p_sys->p_header, +- p_sys->i_header + i_packet_length - 8 ); ++ size_t new_header_size; ++ if( add_overflow( p_sys->i_header, i_packet_length, &new_header_size ) ) ++ return -1; ++ uint8_t *p_reaced = realloc( p_sys->p_header, new_header_size ); + if( !p_reaced ) + return VLC_ENOMEM; + + memcpy( &p_reaced[p_sys->i_header], p_data + 8, i_packet_length - 8 ); + p_sys->p_header = p_reaced; +- p_sys->i_header += i_packet_length - 8; ++ p_sys->i_header = new_header_size; + + /* msg_Dbg( p_access, + "receive header packet (%d bytes)",
meta-multimedia/recipes-multimedia/vlc/vlc_3.0.20.bb +1 -0
@@ -25,6 +25,7 @@ SRC_URI = "https://get.videolan.org/${BPN}/${PV}/${BP}.tar.xz \ file://0006-configure-Disable-incompatible-function-pointer-type.patch \ file://taglib-2.patch \ file://0001-taglib-Fix-build-on-x86-32-bit.patch \ + file://CVE-2024-46461.patch \ " SRC_URI[sha256sum] = "adc7285b4d2721cddf40eb5270cada2aaa10a334cb546fd55a06353447ba29b5"
PATCH 5/5 opusfile: patch CVE-2022-47021
In reply to [email protected]From: Ankur Tyagi <[email protected]>
Details: https://nvd.nist.gov/vuln/detail/CVE-2022-47021
--- .../opusfile/opusfile/CVE-2022-47021.patch | 45 +++++++++++++++++++ .../opusfile/opusfile_0.12.bb | 4 +- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 meta-multimedia/recipes-multimedia/opusfile/opusfile/CVE-2022-47021.patch
meta-multimedia/recipes-multimedia/opusfile/opusfile/CVE-2022-47021.patch new file +45 -0
@@ -0,0 +1,45 @@ +From 84392e8ce385707de855865dd16d586f9331f2e5 Mon Sep 17 00:00:00 2001 +From: Ralph Giles <[email protected]> +Date: Tue, 6 Sep 2022 19:04:31 -0700 +Subject: [PATCH] Propagate allocation failure from ogg_sync_buffer. + +Instead of segfault, report OP_EFAULT if ogg_sync_buffer returns +a null pointer. This allows more graceful recovery by the caller +in the unlikely event of a fallible ogg_malloc call. + +We do check the return value elsewhere in the code, so the new +checks make the code more consistent. + +Thanks to https://github.com/xiph/opusfile/issues/36 for reporting. + +Signed-off-by: Timothy B. Terriberry <[email protected]> +Signed-off-by: Mark Harris <[email protected]> + +CVE: CVE-2022-47021 +Upstream-Status: Backport [https://github.com/xiph/opusfile/commit/0a4cd796df5b030cb866f3f4a5e41a4b92caddf5] +(cherry picked from commit 0a4cd796df5b030cb866f3f4a5e41a4b92caddf5) +Signed-off-by: Ankur Tyagi <[email protected]> +--- + src/opusfile.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/opusfile.c b/src/opusfile.c +index 642c784..edda2d3 100644 +--- a/src/opusfile.c ++++ b/src/opusfile.c +@@ -148,6 +148,7 @@ static int op_get_data(OggOpusFile *_of,int _nbytes){ + int nbytes; + OP_ASSERT(_nbytes>0); + buffer=(unsigned char *)ogg_sync_buffer(&_of->oy,_nbytes); ++ if(OP_UNLIKELY(buffer==NULL))return OP_EFAULT; + nbytes=(int)(*_of->callbacks.read)(_of->stream,buffer,_nbytes); + OP_ASSERT(nbytes<=_nbytes); + if(OP_LIKELY(nbytes>0))ogg_sync_wrote(&_of->oy,nbytes); +@@ -1527,6 +1528,7 @@ static int op_open1(OggOpusFile *_of, + if(_initial_bytes>0){ + char *buffer; + buffer=ogg_sync_buffer(&_of->oy,(long)_initial_bytes); ++ if(OP_UNLIKELY(buffer==NULL))return OP_EFAULT; + memcpy(buffer,_initial_data,_initial_bytes*sizeof(*buffer)); + ogg_sync_wrote(&_of->oy,(long)_initial_bytes); + }
meta-multimedia/recipes-multimedia/opusfile/opusfile_0.12.bb +3 -1
@@ -7,7 +7,9 @@ DEPENDS = "libogg openssl libopus" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=6ac22b992dde6a891f8949c3e2da8576" -SRC_URI = "https://downloads.xiph.org/releases/opus/${BP}.tar.gz" +SRC_URI = "https://downloads.xiph.org/releases/opus/${BP}.tar.gz \ + file://CVE-2022-47021.patch \ +" SRC_URI[md5sum] = "45e8c62f6cd413395223c82f06bfa8ec" SRC_URI[sha256sum] = "118d8601c12dd6a44f52423e68ca9083cc9f2bfe72da7a8c1acb22a80ae3550b"