public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/mkvtoolnix] f43: backport security fix for FLAC and MKV readers
@ 2026-11-25  9:45 Dominik 'Rathann' Mierzejewski
  0 siblings, 0 replies; only message in thread
From: Dominik 'Rathann' Mierzejewski @ 2026-11-25  9:45 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/mkvtoolnix
Branch : f43
Commit : beb7caec56059c19e087aefb5dd4afa43fdfb06b
Author : Dominik 'Rathann' Mierzejewski <dominik@greysector.net>
Date   : 2026-11-25T10:45:09+01:00
Stats  : +60/-0 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/mkvtoolnix/c/beb7caec56059c19e087aefb5dd4afa43fdfb06b?branch=f43

Log:
backport security fix for FLAC and MKV readers

---
diff --git a/mkvtoolnix-readers-strip-path.patch b/mkvtoolnix-readers-strip-path.patch
new file mode 100644
index 0000000..a87fc7d
--- /dev/null
+++ b/mkvtoolnix-readers-strip-path.patch
@@ -0,0 +1,58 @@
+From 5664bd90850078d29f4e7bf4ca0dcc251025ad5c Mon Sep 17 00:00:00 2001
+From: Moritz Bunkus <mo@bunkus.online>
+Date: Sun, 22 Nov 2026 11:32:47 +0100
+Subject: [PATCH] FLAC, Matroska readers: strip path components from copied
+ attachment file names
+
+This is not a security issue on our end, but it can prevent security
+issues in other software reading the files produced by mkvmerge. This
+is good hygiene.
+
+Reported by Prakash Tomar <prakash_tomar@outlook.com>.
+---
+ src/input/r_flac.cpp     | 3 ++-
+ src/input/r_matroska.cpp | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/input/r_flac.cpp b/src/input/r_flac.cpp
+index 950e7a5ca..83e04fdea 100644
+--- a/src/input/r_flac.cpp
++++ b/src/input/r_flac.cpp
+@@ -32,6 +32,7 @@
+ #include "common/id3.h"
+ #include "common/list_utils.h"
+ #include "common/mime.h"
++#include "common/path.h"
+ #include "common/tags/tags.h"
+ #include "common/tags/vorbis.h"
+ #include "merge/input_x.h"
+@@ -255,7 +256,7 @@ flac_reader_c::handle_picture_metadata(FLAC__StreamMetadata const *metadata) {
+   auto attachment         = std::make_shared<attachment_t>();
+   attachment->description = std::string{ picture.description ? reinterpret_cast<char const *>(picture.description) : "" };
+   attachment->mime_type   = picture.mime_type;
+-  attachment->name        = attachment_name_from_metadata(picture);
++  attachment->name        = mtx::fs::to_path(attachment_name_from_metadata(picture)).filename().string();
+   attachment->data        = memory_c::clone(picture.data, picture.data_length);
+   attachment->ui_id       = m_attachment_id;
+ 
+diff --git a/src/input/r_matroska.cpp b/src/input/r_matroska.cpp
+index e09f5e6d0..206312c96 100644
+--- a/src/input/r_matroska.cpp
++++ b/src/input/r_matroska.cpp
+@@ -61,6 +61,7 @@
+ #include "common/math.h"
+ #include "common/mime.h"
+ #include "common/mm_io.h"
++#include "common/path.h"
+ #include "common/qt.h"
+ #include "common/random.h"
+ #include "common/strings/formatting.h"
+@@ -995,7 +996,7 @@ kax_reader_c::handle_attachments(mm_io_c *io,
+       continue;
+ 
+     auto matt         = std::make_shared<attachment_t>();
+-    matt->name        = to_utf8(find_child_value<libmatroska::KaxFileName>(att));
++    matt->name        = mtx::fs::to_path(to_utf8(find_child_value<libmatroska::KaxFileName>(att))).filename().string();
+     matt->description = to_utf8(find_child_value<libmatroska::KaxFileDescription>(att));
+     matt->mime_type   = ::mtx::mime::get_font_mime_type_to_use(find_child_value<libmatroska::KaxMimeType>(att), g_use_legacy_font_mime_types ? mtx::mime::font_mime_type_type_e::legacy : mtx::mime::font_mime_type_type_e::current);
+     matt->id          = find_child_value<libmatroska::KaxFileUID>(att);

diff --git a/mkvtoolnix.spec b/mkvtoolnix.spec
index 8a2009d..0dea900 100644
--- a/mkvtoolnix.spec
+++ b/mkvtoolnix.spec
@@ -9,6 +9,8 @@ Source2: https://mkvtoolnix.download/gpg-pub-moritzbunkus.txt
 # backport fixes for CVE-2026-90783
 Patch0: https://codeberg.org/mbunkus/mkvtoolnix/commit/13fd81db3ae2b79d41536a9663719df11780797e.patch
 Patch1: https://codeberg.org/mbunkus/mkvtoolnix/commit/1495126138e086080f0163bee27fafbdf956a1d0.patch
+# https://codeberg.org/mbunkus/mkvtoolnix/commit/5664bd90850078d29f4e7bf4ca0dcc251025ad5c
+Patch2: mkvtoolnix-readers-strip-path.patch
 URL: https://mkvtoolnix.download/
 BuildRequires: boost-devel
 BuildRequires: cmake(Qt6Concurrent)

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-25  9:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-25  9:45 [rpms/mkvtoolnix] f43: backport security fix for FLAC and MKV readers Dominik 'Rathann' Mierzejewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox