public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Charalampos Stratakis <cstratak@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/qbittorrent] epel8: Security fix for CVE-2025-54310
Date: Thu, 05 Nov 2026 03:54:56 GMT [thread overview]
Message-ID: <179385089674.1.14449547224709587862.rpms-qbittorrent-5d748141541c@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/qbittorrent
Branch : epel8
Commit : 5d748141541c85f64694b6ba9a23356ea7812e51
Author : Charalampos Stratakis <cstratak@redhat.com>
Date : 2026-11-05T04:15:11+01:00
Stats : +274/-2 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/qbittorrent/c/5d748141541c85f64694b6ba9a23356ea7812e51?branch=epel8
Log:
Security fix for CVE-2025-54310
Resolves: rhbz#2381995
---
diff --git a/CVE-2025-54310.patch b/CVE-2025-54310.patch
new file mode 100644
index 0000000..db3ce94
--- /dev/null
+++ b/CVE-2025-54310.patch
@@ -0,0 +1,264 @@
+From 21cd0d2541ab73646ed75331f9528c89fdc7482a Mon Sep 17 00:00:00 2001
+From: "Vladimir Golovnev (Glassez)" <glassez@yandex.ru>
+Date: Mon, 23 Jun 2025 13:14:37 +0300
+Subject: [PATCH 1/2] Prevent opening local files if web page is expected
+
+Backport to qBittorrent 4.2.5 of the fix for CVE-2025-54310. The upstream
+C++17 if-with-initializer statements are split into separate declarations
+for the EPEL 8 C++14 toolchain.
+
+Upstream commit: d7f60fbd886e80503a4f063b01aa2b2d9a2d5cb4
+---
+ src/base/rss/rss_article.cpp | 20 ++++++++++----------
+ src/gui/rss/rsswidget.cpp | 5 +++--
+ src/gui/search/searchjobwidget.cpp | 9 +++++----
+ 3 files changed, 18 insertions(+), 16 deletions(-)
+
+diff --git a/src/base/rss/rss_article.cpp b/src/base/rss/rss_article.cpp
+index 9e88adc..224050b 100644
+--- a/src/base/rss/rss_article.cpp
++++ b/src/base/rss/rss_article.cpp
+@@ -61,16 +61,16 @@ const QString Article::KeyIsRead(QStringLiteral("isRead"));
+
+ Article::Article(Feed *feed, const QVariantHash &varHash)
+ : QObject(feed)
+- , m_feed(feed)
+- , m_guid(varHash.value(KeyId).toString())
+- , m_date(varHash.value(KeyDate).toDateTime())
+- , m_title(varHash.value(KeyTitle).toString())
+- , m_author(varHash.value(KeyAuthor).toString())
+- , m_description(varHash.value(KeyDescription).toString())
+- , m_torrentURL(varHash.value(KeyTorrentURL).toString())
+- , m_link(varHash.value(KeyLink).toString())
+- , m_isRead(varHash.value(KeyIsRead, false).toBool())
+- , m_data(varHash)
++ , m_feed {feed}
++ , m_guid {varHash.value(KeyId).toString()}
++ , m_date {varHash.value(KeyDate).toDateTime()}
++ , m_title {varHash.value(KeyTitle).toString()}
++ , m_author {varHash.value(KeyAuthor).toString()}
++ , m_description {varHash.value(KeyDescription).toString()}
++ , m_torrentURL {varHash.value(KeyTorrentURL).toString()}
++ , m_link {varHash.value(KeyLink).toString()}
++ , m_isRead {varHash.value(KeyIsRead, false).toBool()}
++ , m_data {varHash}
+ {
+ }
+
+diff --git a/src/gui/rss/rsswidget.cpp b/src/gui/rss/rsswidget.cpp
+index 45267a3..00f3f38 100644
+--- a/src/gui/rss/rsswidget.cpp
++++ b/src/gui/rss/rsswidget.cpp
+@@ -370,8 +370,9 @@ void RSSWidget::openSelectedArticlesUrls()
+ // Mark as read
+ article->markAsRead();
+
+- if (!article->link().isEmpty())
+- QDesktopServices::openUrl(QUrl(article->link()));
++ const QUrl articleLink {article->link()};
++ if (!articleLink.isEmpty() && !articleLink.isLocalFile())
++ QDesktopServices::openUrl(articleLink);
+ }
+ }
+
+diff --git a/src/gui/search/searchjobwidget.cpp b/src/gui/search/searchjobwidget.cpp
+index ebd97c7..7d1465a 100644
+--- a/src/gui/search/searchjobwidget.cpp
++++ b/src/gui/search/searchjobwidget.cpp
+@@ -219,12 +219,13 @@ void SearchJobWidget::downloadTorrents()
+
+ void SearchJobWidget::openTorrentPages() const
+ {
+- const QModelIndexList rows {m_ui->resultsBrowser->selectionModel()->selectedRows()};
++ const QModelIndexList rows = m_ui->resultsBrowser->selectionModel()->selectedRows();
+ for (const QModelIndex &rowIndex : rows) {
+ const QString descrLink = m_proxyModel->data(
+- m_proxyModel->index(rowIndex.row(), SearchSortModel::DESC_LINK)).toString();
+- if (!descrLink.isEmpty())
+- QDesktopServices::openUrl(QUrl::fromEncoded(descrLink.toUtf8()));
++ m_proxyModel->index(rowIndex.row(), SearchSortModel::DESC_LINK)).toString();
++ const QUrl descrLinkURL {descrLink};
++ if (!descrLinkURL.isEmpty() && !descrLinkURL.isLocalFile())
++ QDesktopServices::openUrl(descrLinkURL);
+ }
+ }
+
+--
+2.56.0
+
+
+From 66e69662d22f95c0a8b21cff065b76a4f8b03f44 Mon Sep 17 00:00:00 2001
+From: "Vladimir Golovnev (Glassez)" <glassez@yandex.ru>
+Date: Tue, 24 Jun 2025 21:51:08 +0300
+Subject: [PATCH 2/2] Show warning message box on opening inappropriate URL
+
+Backport to qBittorrent 4.2.5. Adapted for the EPEL 8 C++14 / Qt 5 toolchain:
+qsizetype counters become int, the [[likely]]/[[unlikely]] attributes are
+dropped, and the u"..."_s string literals are replaced with plain QString
+literals (matching the surrounding code style).
+
+Upstream commit: 04ccf45d593566c6a13ad28af9e961184f3dc060
+---
+ src/gui/rss/rsswidget.cpp | 44 +++++++++++++++++++++++++---
+ src/gui/search/searchjobwidget.cpp | 46 +++++++++++++++++++++++++++---
+ src/gui/search/searchjobwidget.h | 2 +-
+ 3 files changed, 83 insertions(+), 9 deletions(-)
+
+diff --git a/src/gui/rss/rsswidget.cpp b/src/gui/rss/rsswidget.cpp
+index 00f3f38..073aa39 100644
+--- a/src/gui/rss/rsswidget.cpp
++++ b/src/gui/rss/rsswidget.cpp
+@@ -41,6 +41,7 @@
+
+ #include "base/bittorrent/session.h"
+ #include "base/global.h"
++#include "base/logger.h"
+ #include "base/net/downloadmanager.h"
+ #include "base/preferences.h"
+ #include "base/rss/rss_article.h"
+@@ -363,16 +364,51 @@ void RSSWidget::downloadSelectedTorrents()
+ // open the url of the selected RSS articles in the Web browser
+ void RSSWidget::openSelectedArticlesUrls()
+ {
++ int emptyLinkCount = 0;
++ int badLinkCount = 0;
++ QString articleTitle;
+ for (QListWidgetItem *item : asConst(m_articleListWidget->selectedItems())) {
+ auto article = reinterpret_cast<RSS::Article *>(item->data(Qt::UserRole).value<quintptr>());
+ Q_ASSERT(article);
+
+- // Mark as read
+ article->markAsRead();
+
+- const QUrl articleLink {article->link()};
+- if (!articleLink.isEmpty() && !articleLink.isLocalFile())
+- QDesktopServices::openUrl(articleLink);
++ const QString articleLink = article->link();
++ const QUrl articleLinkURL {articleLink};
++ if (articleLinkURL.isEmpty())
++ {
++ if (articleTitle.isEmpty())
++ articleTitle = article->title();
++ ++emptyLinkCount;
++ }
++ else if (articleLinkURL.isLocalFile())
++ {
++ if (badLinkCount == 0)
++ articleTitle = article->title();
++ ++badLinkCount;
++
++ LogMsg(tr("Blocked opening RSS article URL. URL pointing to local file might be malicious behaviour. Article: \"%1\". URL: \"%2\".")
++ .arg(article->title(), articleLink), Log::WARNING);
++ }
++ else
++ {
++ QDesktopServices::openUrl(articleLinkURL);
++ }
++ }
++
++ if (badLinkCount > 0)
++ {
++ QString message = tr("Blocked opening RSS article URL. The following article URL is pointing to local file and it may be malicious behaviour:\n%1").arg(articleTitle);
++ if (badLinkCount > 1)
++ message.append("\n" + tr("There are %1 more articles with the same issue.").arg(badLinkCount - 1));
++ QMessageBox::warning(this, "qBittorrent", message, QMessageBox::Ok);
++ }
++ else if (emptyLinkCount > 0)
++ {
++ QString message = tr("The following article has no news URL provided:\n%1").arg(articleTitle);
++ if (emptyLinkCount > 1)
++ message.append("\n" + tr("There are %1 more articles with the same issue.").arg(emptyLinkCount - 1));
++ QMessageBox::warning(this, "qBittorrent", message, QMessageBox::Ok);
+ }
+ }
+
+diff --git a/src/gui/search/searchjobwidget.cpp b/src/gui/search/searchjobwidget.cpp
+index 7d1465a..c0d0383 100644
+--- a/src/gui/search/searchjobwidget.cpp
++++ b/src/gui/search/searchjobwidget.cpp
+@@ -35,11 +35,13 @@
+ #include <QHeaderView>
+ #include <QKeyEvent>
+ #include <QMenu>
++#include <QMessageBox>
+ #include <QPalette>
+ #include <QStandardItemModel>
+ #include <QTableView>
+ #include <QUrl>
+
++#include "base/logger.h"
+ #include "base/bittorrent/session.h"
+ #include "base/preferences.h"
+ #include "base/search/searchdownloadhandler.h"
+@@ -217,15 +219,51 @@ void SearchJobWidget::downloadTorrents()
+ downloadTorrent(rowIndex);
+ }
+
+-void SearchJobWidget::openTorrentPages() const
++void SearchJobWidget::openTorrentPages()
+ {
+ const QModelIndexList rows = m_ui->resultsBrowser->selectionModel()->selectedRows();
++ int emptyLinkCount = 0;
++ int badLinkCount = 0;
++ QString warningEntryName;
+ for (const QModelIndex &rowIndex : rows) {
+- const QString descrLink = m_proxyModel->data(
+- m_proxyModel->index(rowIndex.row(), SearchSortModel::DESC_LINK)).toString();
++ const QString entryName = m_proxyModel->index(rowIndex.row(), SearchSortModel::NAME).data().toString();
++ const QString descrLink = m_proxyModel->index(rowIndex.row(), SearchSortModel::DESC_LINK).data().toString();
++
+ const QUrl descrLinkURL {descrLink};
+- if (!descrLinkURL.isEmpty() && !descrLinkURL.isLocalFile())
++ if (descrLinkURL.isEmpty())
++ {
++ if (warningEntryName.isEmpty())
++ warningEntryName = entryName;
++ ++emptyLinkCount;
++ }
++ else if (descrLinkURL.isLocalFile())
++ {
++ if (badLinkCount == 0)
++ warningEntryName = entryName;
++ ++badLinkCount;
++
++ LogMsg(tr("Blocked opening search result description page URL. URL pointing to local file might be malicious behaviour. Name: \"%1\". URL: \"%2\".")
++ .arg(entryName, descrLink), Log::WARNING);
++ }
++ else
++ {
+ QDesktopServices::openUrl(descrLinkURL);
++ }
++ }
++
++ if (badLinkCount > 0)
++ {
++ QString message = tr("Blocked opening search result description page URL. The following result URL is pointing to local file and it may be malicious behaviour:\n%1").arg(warningEntryName);
++ if (badLinkCount > 1)
++ message.append("\n" + tr("There are %1 more results with the same issue.").arg(badLinkCount - 1));
++ QMessageBox::warning(this, "qBittorrent", message, QMessageBox::Ok);
++ }
++ else if (emptyLinkCount > 0)
++ {
++ QString message = tr("Entry \"%1\" has no description page URL provided.").arg(warningEntryName);
++ if (emptyLinkCount > 1)
++ message.append("\n" + tr("There are %1 more entries with the same issue.").arg(emptyLinkCount - 1));
++ QMessageBox::warning(this, "qBittorrent", message, QMessageBox::Ok);
+ }
+ }
+
+diff --git a/src/gui/search/searchjobwidget.h b/src/gui/search/searchjobwidget.h
+index e1021ec..70c5cb8 100644
+--- a/src/gui/search/searchjobwidget.h
++++ b/src/gui/search/searchjobwidget.h
+@@ -111,7 +111,7 @@ private:
+ void setRowColor(int row, const QColor &color);
+
+ void downloadTorrents();
+- void openTorrentPages() const;
++ void openTorrentPages();
+ void copyTorrentURLs() const;
+ void copyTorrentDownloadLinks() const;
+ void copyTorrentNames() const;
+--
+2.56.0
+
diff --git a/qbittorrent.spec b/qbittorrent.spec
index ce6c678..daa0362 100644
--- a/qbittorrent.spec
+++ b/qbittorrent.spec
@@ -21,6 +21,13 @@ Patch1: qbittorrent-3.3.1-verbose_build.patch
# https://github.com/qbittorrent/qBittorrent/pull/21364
Patch2: CVE-2024-51774.patch
+# Security fix for CVE-2025-54310
+# qBittorrent local file access
+# Fixed upstream in 5.1+
+# https://github.com/qbittorrent/qBittorrent/commit/ad68813fe879ba245a4f41f105ed8d2114a92971
+# https://github.com/qbittorrent/qBittorrent/commit/6ad073e0bc26c1f9d3530490ece611b49f5bfcab
+Patch3: CVE-2025-54310.patch
+
BuildRequires: cmake3
BuildRequires: gcc-c++
BuildRequires: ninja-build
@@ -61,6 +68,7 @@ pushd build
%patch0 -p1
%patch1 -p1 -b .verbose_build
%patch2 -p1
+%patch3 -p1
sed -i -e 's@Exec=qbittorrent %U@Exec=env TMPDIR=/var/tmp qbittorrent %U@g' dist/unix/org.qbittorrent.qBittorrent.desktop
cp README.md NEWS AUTHORS TODO Changelog COPYING ..
popd
@@ -125,8 +133,8 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/org.qbittorren
%changelog
* Fri Oct 30 2026 Charalampos Stratakis <cstratak@redhat.com> - 1:4.2.5-6
-- Security fix for CVE-2024-51774
-Resolves: rhbz#2323592
+- Security fixes for CVE-2024-51774 and CVE-2025-54310
+Resolves: rhbz#2323592, rhbz#2381995
* Fri Oct 9 2020 Leigh Scott <leigh123linux@gmail.com> - 1:4.2.5-5
- Switch to cmake
reply other threads:[~2026-11-05 3:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179385089674.1.14449547224709587862.rpms-qbittorrent-5d748141541c@fedoraproject.org \
--to=cstratak@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox