From 161ff2124664d99d6b8c9abdecf38e79e8164884 Mon Sep 17 00:00:00 2001 From: Michal Ruprich Date: Wed, 13 May 2026 11:10:46 +0200 Subject: [PATCH] Resolves: RHEL-173221 - CVE-2026-5656 Improper Limitation of a Pathname to a Restricted Directory --- wireshark-0015-cve-2026-5656.patch | 49 ++++++++++++++++++++++++++++++ wireshark.spec | 8 ++++- 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 wireshark-0015-cve-2026-5656.patch diff --git a/wireshark-0015-cve-2026-5656.patch b/wireshark-0015-cve-2026-5656.patch new file mode 100644 index 0000000..12bca04 --- /dev/null +++ b/wireshark-0015-cve-2026-5656.patch @@ -0,0 +1,49 @@ +From 9c458883e8ecaf86c08092420d92408c70ffa7fc Mon Sep 17 00:00:00 2001 +From: Roland Knall +Date: Mon, 23 Mar 2026 13:11:05 +0000 +Subject: [PATCH] Qt::Guard better when loading zip files + +Prevent traversal attacks using malicously created zip-files + +Closes #21115 +AI-Assisted: no + +AI-Assisted: no|yes [tool(s)] + + +(cherry picked from commit 70c86bd39c74fc0052c9a212afc911b41d612388) + +Co-authored-by: Roland Knall +--- + ui/qt/utils/wireshark_zip_helper.cpp | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/ui/qt/utils/wireshark_zip_helper.cpp b/ui/qt/utils/wireshark_zip_helper.cpp +index a295001cfcc..773cff3172b 100644 +--- a/ui/qt/utils/wireshark_zip_helper.cpp ++++ b/ui/qt/utils/wireshark_zip_helper.cpp +@@ -86,6 +86,7 @@ bool WiresharkZipHelper::unzip(QString zipFile, QString directory, bool (*fileCh + return false; + + QMap cleanPaths; ++ QString canonicalDir = QFileInfo(di.path()).canonicalFilePath(); + + for (unsigned int cnt = 0; cnt < nmbr; cnt++) + { +@@ -112,6 +113,13 @@ bool WiresharkZipHelper::unzip(QString zipFile, QString directory, bool (*fileCh + continue; + } + ++#ifndef _WIN32 ++ /* Reject paths outside the extraction root, to prevent directory traversal attacks on Posix systems */ ++ if (!QFileInfo(fileInZip).absoluteFilePath().startsWith(canonicalDir + "/")) { ++ continue; ++ } ++#endif ++ + if (di.exists()) + { + #ifdef _WIN32 +-- +GitLab + diff --git a/wireshark.spec b/wireshark.spec index 8fedce4..576fe4c 100644 --- a/wireshark.spec +++ b/wireshark.spec @@ -6,7 +6,7 @@ Summary: Network traffic analyzer Name: wireshark Version: 4.4.2 -Release: 9%{?dist} +Release: 10%{?dist} Epoch: 1 License: BSD-1-Clause AND BSD-2-Clause AND BSD-3-Clause AND MIT AND GPL-2.0-or-later AND LGPL-2.0-or-later AND Zlib AND ISC AND (BSD-3-Clause OR GPL-2.0-only) AND (GPL-2.0-or-later AND Zlib) Url: http://www.wireshark.org/ @@ -33,7 +33,10 @@ Patch10: wireshark-0010-cve-2025-13499.patch Patch11: wireshark-0011-cve-2025-9817.patch Patch12: wireshark-0012-cve-2026-3201.patch Patch13: wireshark-0013-cve-2026-3203.patch +# Upstream fix: https://gitlab.com/wireshark/wireshark/-/commit/45eb952 Patch14: wireshark-0014-cve-2026-5405.patch +# Upstream fix: https://gitlab.com/wireshark/wireshark/-/commit/9c45888 +Patch15: wireshark-0015-cve-2026-5656.patch #install tshark together with wireshark GUI Requires: %{name}-cli = %{epoch}:%{version}-%{release} @@ -286,6 +289,9 @@ fi %{_libdir}/pkgconfig/%{name}.pc %changelog +* Wed May 13 2026 Michal Ruprich - 1:4.4.2-10 +- Resolves: RHEL-173221 - CVE-2026-5656 Improper Limitation of a Pathname to a Restricted Directory + * Wed May 13 2026 Michal Ruprich - 1:4.4.2-9 - Resolves: RHEL-173218 - CVE-2026-5405 Heap-based Buffer Overflow