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] epel9: Security fix for CVE-2025-54310
Date: Wed, 04 Nov 2026 13:48:51 GMT	[thread overview]
Message-ID: <179380013182.1.9530861430969260410.rpms-qbittorrent-a58bcc1adafa@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/qbittorrent
            Branch : epel9
            Commit : a58bcc1adafa512b8f645419720d7e5f3462dc39
            Author : Charalampos Stratakis <cstratak@redhat.com>
            Date   : 2026-10-30T18:17:48+01:00
            Stats  : +261/-2 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/qbittorrent/c/a58bcc1adafa512b8f645419720d7e5f3462dc39?branch=epel9

            Log:
            Security fix for CVE-2025-54310

Resolves: rhbz#2381999

---
diff --git a/CVE-2025-54310.patch b/CVE-2025-54310.patch
new file mode 100644
index 0000000..f7ebf0c
--- /dev/null
+++ b/CVE-2025-54310.patch
@@ -0,0 +1,252 @@
+From d7f60fbd886e80503a4f063b01aa2b2d9a2d5cb4 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
+
+---
+ src/base/rss/rss_article.cpp       | 20 ++++++++++----------
+ src/gui/rss/rsswidget.cpp          |  4 ++--
+ src/gui/search/searchjobwidget.cpp |  8 ++++----
+ 3 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/src/base/rss/rss_article.cpp b/src/base/rss/rss_article.cpp
+index d505239..e132d3a 100644
+--- a/src/base/rss/rss_article.cpp
++++ b/src/base/rss/rss_article.cpp
+@@ -48,16 +48,16 @@ const QString Article::KeyIsRead = u"isRead"_s;
+ 
+ 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 3e4c602..2262809 100644
+--- a/src/gui/rss/rsswidget.cpp
++++ b/src/gui/rss/rsswidget.cpp
+@@ -391,8 +391,8 @@ void RSSWidget::openSelectedArticlesUrls()
+         // Mark as read
+         article->markAsRead();
+ 
+-        if (!article->link().isEmpty())
+-            QDesktopServices::openUrl(QUrl(article->link()));
++        if (const QUrl articleLink {article->link()}; !articleLink.isEmpty() && !articleLink.isLocalFile())
++            QDesktopServices::openUrl(articleLink);
+     }
+ }
+ 
+diff --git a/src/gui/search/searchjobwidget.cpp b/src/gui/search/searchjobwidget.cpp
+index bddaefa..45bd2d5 100644
+--- a/src/gui/search/searchjobwidget.cpp
++++ b/src/gui/search/searchjobwidget.cpp
+@@ -215,13 +215,13 @@ void SearchJobWidget::downloadTorrents(const AddTorrentOption option)
+ 
+ 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();
++        if (const QUrl descrLinkURL {descrLink}; !descrLinkURL.isEmpty() && !descrLinkURL.isLocalFile())
++            QDesktopServices::openUrl(descrLinkURL);
+     }
+ }
+ 
+-- 
+2.56.0
+
+
+From 04ccf45d593566c6a13ad28af9e961184f3dc060 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
+
+---
+ src/gui/rss/rsswidget.cpp          | 43 +++++++++++++++++++++++++--
+ src/gui/search/searchjobwidget.cpp | 47 +++++++++++++++++++++++++++---
+ src/gui/search/searchjobwidget.h   |  2 +-
+ 3 files changed, 84 insertions(+), 8 deletions(-)
+
+diff --git a/src/gui/rss/rsswidget.cpp b/src/gui/rss/rsswidget.cpp
+index 2262809..65f75ba 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"
+@@ -383,16 +384,52 @@ void RSSWidget::downloadSelectedTorrents()
+ // open the url of the selected RSS articles in the Web browser
+ void RSSWidget::openSelectedArticlesUrls()
+ {
++    qsizetype emptyLinkCount = 0;
++    qsizetype badLinkCount = 0;
++    QString articleTitle;   
+     for (QListWidgetItem *item : asConst(m_articleListWidget->selectedItems()))
+     {
+         auto *article = item->data(Qt::UserRole).value<RSS::Article *>();
+         Q_ASSERT(article);
+ 
+-        // Mark as read
+         article->markAsRead();
+ 
+-        if (const QUrl articleLink {article->link()}; !articleLink.isEmpty() && !articleLink.isLocalFile())
+-            QDesktopServices::openUrl(articleLink);
++        const QString articleLink = article->link();
++        const QUrl articleLinkURL {articleLink};
++        if (articleLinkURL.isEmpty()) [[unlikely]]
++        {
++            if (articleTitle.isEmpty())
++                articleTitle = article->title();
++            ++emptyLinkCount;
++        }
++        else if (articleLinkURL.isLocalFile()) [[unlikely]]
++        {
++            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 [[likely]]
++        {
++            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(u"\n" + tr("There are %1 more articles with the same issue.").arg(badLinkCount - 1));
++        QMessageBox::warning(this, u"qBittorrent"_s, 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(u"\n" + tr("There are %1 more articles with the same issue.").arg(emptyLinkCount - 1));
++        QMessageBox::warning(this, u"qBittorrent"_s, message, QMessageBox::Ok);
+     }
+ }
+ 
+diff --git a/src/gui/search/searchjobwidget.cpp b/src/gui/search/searchjobwidget.cpp
+index 45bd2d5..1c50648 100644
+--- a/src/gui/search/searchjobwidget.cpp
++++ b/src/gui/search/searchjobwidget.cpp
+@@ -35,10 +35,12 @@
+ #include <QHeaderView>
+ #include <QKeyEvent>
+ #include <QMenu>
++#include <QMessageBox>
+ #include <QPalette>
+ #include <QStandardItemModel>
+ #include <QUrl>
+ 
++#include "base/logger.h"
+ #include "base/bittorrent/session.h"
+ #include "base/preferences.h"
+ #include "base/search/searchdownloadhandler.h"
+@@ -213,15 +215,52 @@ void SearchJobWidget::downloadTorrents(const AddTorrentOption option)
+         downloadTorrent(rowIndex, option);
+ }
+ 
+-void SearchJobWidget::openTorrentPages() const
++void SearchJobWidget::openTorrentPages()
+ {
+     const QModelIndexList rows = m_ui->resultsBrowser->selectionModel()->selectedRows();
++    qsizetype emptyLinkCount = 0;
++    qsizetype badLinkCount = 0;
++    QString warningEntryName;
+     for (const QModelIndex &rowIndex : rows)
+     {
+-        const QString descrLink = m_proxyModel->data(
+-                m_proxyModel->index(rowIndex.row(), SearchSortModel::DESC_LINK)).toString();
+-        if (const QUrl descrLinkURL {descrLink}; !descrLinkURL.isEmpty() && !descrLinkURL.isLocalFile())
++        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()) [[unlikely]]
++        {
++            if (warningEntryName.isEmpty())
++                warningEntryName = entryName;
++            ++emptyLinkCount;
++        }
++        else if (descrLinkURL.isLocalFile()) [[unlikely]]
++        {
++            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 [[likely]]
++        {
+             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(u"\n" + tr("There are %1 more results with the same issue.").arg(badLinkCount - 1));
++        QMessageBox::warning(this, u"qBittorrent"_s, 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(u"\n" + tr("There are %1 more entries with the same issue.").arg(emptyLinkCount - 1));
++        QMessageBox::warning(this, u"qBittorrent"_s, message, QMessageBox::Ok);
+     }
+ }
+ 
+diff --git a/src/gui/search/searchjobwidget.h b/src/gui/search/searchjobwidget.h
+index 46a6088..49af16c 100644
+--- a/src/gui/search/searchjobwidget.h
++++ b/src/gui/search/searchjobwidget.h
+@@ -122,7 +122,7 @@ private:
+     int visibleColumnsCount() const;
+ 
+     void downloadTorrents(AddTorrentOption option = AddTorrentOption::Default);
+-    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 732057e..b5982b7 100644
--- a/qbittorrent.spec
+++ b/qbittorrent.spec
@@ -30,6 +30,13 @@ Source3: qbittorrent-nox.README
 # https://github.com/qbittorrent/qBittorrent/pull/21364
 Patch1:  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
+Patch2: CVE-2025-54310.patch
+
 ExcludeArch:   %{ix86}
 
 BuildRequires: cmake
@@ -150,8 +157,8 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/org.qbittorren
 %changelog
 * Fri Oct 30 2026 Charalampos Stratakis <cstratak@redhat.com> - 1:4.6.7-1
 - Update to 4.6.7
-- Security fix for CVE-2024-51774
-Resolves: rhbz#2323593
+- Security fixes for CVE-2024-51774 and CVE-2025-54310
+Resolves: rhbz#2323593, rhbz#2381999
 
 * Mon May 27 2024 Leigh Scott <leigh123linux@gmail.com> - 1:4.6.5-1
 - Update to 4.6.5

                 reply	other threads:[~2026-11-04 13:48 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=179380013182.1.9530861430969260410.rpms-qbittorrent-a58bcc1adafa@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