public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/qbittorrent] epel8: Security fix for CVE-2024-51774
@ 2026-11-05  3:54 Charalampos Stratakis
  0 siblings, 0 replies; only message in thread
From: Charalampos Stratakis @ 2026-11-05  3:54 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/qbittorrent
            Branch : epel8
            Commit : 140cdf46f6656f79640f0d0c0a4bae7559bce08b
            Author : Charalampos Stratakis <cstratak@redhat.com>
            Date   : 2026-10-30T19:26:40+01:00
            Stats  : +268/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/qbittorrent/c/140cdf46f6656f79640f0d0c0a4bae7559bce08b?branch=epel8

            Log:
            Security fix for CVE-2024-51774

Resolves: rhbz#2323592

---
diff --git a/CVE-2024-51774.patch b/CVE-2024-51774.patch
new file mode 100644
index 0000000..5dce54c
--- /dev/null
+++ b/CVE-2024-51774.patch
@@ -0,0 +1,257 @@
+From 75458c99000a7c253a579ec9274ceb74da837dff Mon Sep 17 00:00:00 2001
+From: sledgehammer999 <hammered999@gmail.com>
+Date: Thu, 19 Sep 2024 21:10:16 +0300
+Subject: [PATCH 1/2] Don't ignore SSL errors
+
+Backport to qBittorrent 4.2.5 of the fix for CVE-2024-51774.
+
+Upstream pull request: https://github.com/qbittorrent/qBittorrent/pull/21364
+Upstream commit: a65eb6c604e7fd9b69d3cb226010e0e33530da33
+---
+ src/base/net/downloadmanager.cpp             | 16 +++++++++++++---
+ src/base/preferences.cpp                     | 13 +++++++++++++
+ src/base/preferences.h                       |  2 ++
+ src/gui/advancedsettings.cpp                 |  7 +++++++
+ src/gui/advancedsettings.h                   |  2 +-
+ src/webui/api/appcontroller.cpp              |  5 +++++
+ src/webui/www/private/views/preferences.html | 10 ++++++++++
+ 7 files changed, 51 insertions(+), 4 deletions(-)
+
+diff --git a/src/base/net/downloadmanager.cpp b/src/base/net/downloadmanager.cpp
+index f25e71a..a3c49d7 100644
+--- a/src/base/net/downloadmanager.cpp
++++ b/src/base/net/downloadmanager.cpp
+@@ -281,10 +281,20 @@ void Net::DownloadManager::ignoreSslErrors(QNetworkReply *reply, const QList<QSs
+     QStringList errorList;
+     for (const QSslError &error : errors)
+         errorList += error.errorString();
+-    LogMsg(tr("Ignoring SSL error, URL: \"%1\", errors: \"%2\"").arg(reply->url().toString(), errorList.join(". ")), Log::WARNING);
+ 
+-    // Ignore all SSL errors
+-    reply->ignoreSslErrors();
++    QString errorMsg;
++    if (!Preferences::instance()->isIgnoreSSLErrors())
++    {
++        errorMsg = tr("SSL error, URL: \"%1\", errors: \"%2\"");
++    }
++    else
++    {
++        errorMsg = tr("Ignoring SSL error, URL: \"%1\", errors: \"%2\"");
++        // Ignore all SSL errors
++        reply->ignoreSslErrors();
++    }
++
++    LogMsg(errorMsg.arg(reply->url().toString(), errorList.join(". ")), Log::WARNING);
+ }
+ 
+ Net::DownloadRequest::DownloadRequest(const QString &url)
+diff --git a/src/base/preferences.cpp b/src/base/preferences.cpp
+index 54c2a79..7a6e379 100644
+--- a/src/base/preferences.cpp
++++ b/src/base/preferences.cpp
+@@ -1116,6 +1116,19 @@ void Preferences::setTrackerPort(const int port)
+     setValue("Preferences/Advanced/trackerPort", port);
+ }
+ 
++bool Preferences::isIgnoreSSLErrors() const
++{
++    return value("Preferences/Advanced/IgnoreSSLErrors", false).toBool();
++}
++
++void Preferences::setIgnoreSSLErrors(const bool enabled)
++{
++    if (enabled == isIgnoreSSLErrors())
++        return;
++
++    setValue("Preferences/Advanced/IgnoreSSLErrors", enabled);
++}
++
+ #if defined(Q_OS_WIN) || defined(Q_OS_MACOS)
+ bool Preferences::isUpdateCheckEnabled() const
+ {
+diff --git a/src/base/preferences.h b/src/base/preferences.h
+index f0744f9..92a8368 100644
+--- a/src/base/preferences.h
++++ b/src/base/preferences.h
+@@ -292,6 +292,8 @@ public:
+ #endif
+     int getTrackerPort() const;
+     void setTrackerPort(int port);
++    bool isIgnoreSSLErrors() const;
++    void setIgnoreSSLErrors(bool enabled);
+ #if defined(Q_OS_WIN) || defined(Q_OS_MACOS)
+     bool isUpdateCheckEnabled() const;
+     void setUpdateCheckEnabled(bool enabled);
+diff --git a/src/gui/advancedsettings.cpp b/src/gui/advancedsettings.cpp
+index 5aae09d..27f9bf4 100644
+--- a/src/gui/advancedsettings.cpp
++++ b/src/gui/advancedsettings.cpp
+@@ -111,6 +111,7 @@ enum AdvSettingsRows
+     // embedded tracker
+     TRACKER_STATUS,
+     TRACKER_PORT,
++    IGNORE_SSL_ERRORS,
+     // seeding
+     CHOKING_ALGORITHM,
+     SEED_CHOKING_ALGORITHM,
+@@ -256,6 +257,8 @@ void AdvancedSettings::saveAdvancedSettings()
+     // Tracker
+     pref->setTrackerPort(m_spinBoxTrackerPort.value());
+     session->setTrackerEnabled(m_checkBoxTrackerStatus.isChecked());
++    // Ignore SSL errors
++    pref->setIgnoreSSLErrors(m_checkBoxIgnoreSSLErrors.isChecked());
+     // Choking algorithm
+     session->setChokingAlgorithm(static_cast<BitTorrent::ChokingAlgorithm>(m_comboBoxChokingAlgorithm.currentIndex()));
+     // Seed choking algorithm
+@@ -569,6 +572,10 @@ void AdvancedSettings::loadAdvancedSettings()
+     m_spinBoxTrackerPort.setMaximum(65535);
+     m_spinBoxTrackerPort.setValue(pref->getTrackerPort());
+     addRow(TRACKER_PORT, tr("Embedded tracker port"), &m_spinBoxTrackerPort);
++    // Ignore SSL errors
++    m_checkBoxIgnoreSSLErrors.setChecked(pref->isIgnoreSSLErrors());
++    m_checkBoxIgnoreSSLErrors.setToolTip(tr("Affects certificate validation and non-torrent protocol activities (e.g. RSS feeds, program updates, torrent files, geoip db, etc)"));
++    addRow(IGNORE_SSL_ERRORS, tr("Ignore SSL errors"), &m_checkBoxIgnoreSSLErrors);
+     // Choking algorithm
+     m_comboBoxChokingAlgorithm.addItems({tr("Fixed slots"), tr("Upload rate based")});
+     m_comboBoxChokingAlgorithm.setCurrentIndex(static_cast<int>(session->chokingAlgorithm()));
+diff --git a/src/gui/advancedsettings.h b/src/gui/advancedsettings.h
+index 0d46635..4b10dab 100644
+--- a/src/gui/advancedsettings.h
++++ b/src/gui/advancedsettings.h
+@@ -63,7 +63,7 @@ private:
+              m_spinBoxSendBufferWatermarkFactor, m_spinBoxSocketBacklogSize, m_spinBoxStopTrackerTimeout, m_spinBoxSavePathHistoryLength;
+     QCheckBox m_checkBoxOsCache, m_checkBoxRecheckCompleted, m_checkBoxResolveCountries, m_checkBoxResolveHosts,
+               m_checkBoxProgramNotifications, m_checkBoxTorrentAddedNotifications, m_checkBoxTrackerFavicon, m_checkBoxTrackerStatus,
+-              m_checkBoxConfirmTorrentRecheck, m_checkBoxConfirmRemoveAllTags, m_checkBoxAnnounceAllTrackers, m_checkBoxAnnounceAllTiers,
++              m_checkBoxIgnoreSSLErrors, m_checkBoxConfirmTorrentRecheck, m_checkBoxConfirmRemoveAllTags, m_checkBoxAnnounceAllTrackers, m_checkBoxAnnounceAllTiers,
+               m_checkBoxMultiConnectionsPerIp, m_checkBoxPieceExtentAffinity, m_checkBoxSuggestMode, m_checkBoxCoalesceRW, m_checkBoxSpeedWidgetEnabled;
+     QComboBox m_comboBoxInterface, m_comboBoxInterfaceAddress, m_comboBoxUtpMixedMode, m_comboBoxChokingAlgorithm, m_comboBoxSeedChokingAlgorithm;
+     QLineEdit m_lineEditAnnounceIP;
+diff --git a/src/webui/api/appcontroller.cpp b/src/webui/api/appcontroller.cpp
+index 83d6170..847f7b2 100644
+--- a/src/webui/api/appcontroller.cpp
++++ b/src/webui/api/appcontroller.cpp
+@@ -273,6 +273,8 @@ void AppController::preferencesAction()
+     data["recheck_completed_torrents"] = pref->recheckTorrentsOnCompletion();
+     // Resolve peer countries
+     data["resolve_peer_countries"] = pref->resolvePeerCountries();
++    // Ignore SSL errors
++    data["ignore_ssl_errors"] = pref->isIgnoreSSLErrors();
+ 
+     // libtorrent preferences
+     // Async IO threads
+@@ -688,6 +690,9 @@ void AppController::setPreferencesAction()
+     // Resolve peer countries
+     if (hasKey("resolve_peer_countries"))
+         pref->resolvePeerCountries(it.value().toBool());
++    // Ignore SSL errors
++    if (hasKey("ignore_ssl_errors"))
++        pref->setIgnoreSSLErrors(it.value().toBool());
+ 
+     // libtorrent preferences
+     // Async IO threads
+diff --git a/src/webui/www/private/views/preferences.html b/src/webui/www/private/views/preferences.html
+index 6873211..5bbb9fa 100644
+--- a/src/webui/www/private/views/preferences.html
++++ b/src/webui/www/private/views/preferences.html
+@@ -1050,6 +1050,14 @@
+                     <input type="text" id="embeddedTrackerPort" style="width: 15em;" />
+                 </td>
+             </tr>
++            <tr>
++                <td>
++                    <label for="ignoreSSLErrors">QBT_TR(Ignore SSL errors:)QBT_TR[CONTEXT=OptionsDialog]</label>
++                </td>
++                <td>
++                    <input type="checkbox" id="ignoreSSLErrors" />
++                </td>
++            </tr>
+             <tr>
+                 <td>
+                     <label for="uploadSlotsBehavior">QBT_TR(Upload slots behavior:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#choking_algorithm" target="_blank">(?)</a></label>
+@@ -1792,6 +1800,7 @@
+                         $('allowMultipleConnectionsFromTheSameIPAddress').setProperty('checked', pref.enable_multi_connections_from_same_ip);
+                         $('enableEmbeddedTracker').setProperty('checked', pref.enable_embedded_tracker);
+                         $('embeddedTrackerPort').setProperty('value', pref.embedded_tracker_port);
++                        $('ignoreSSLErrors').setProperty('checked', pref.ignore_ssl_errors);
+                         $('uploadSlotsBehavior').setProperty('value', pref.upload_slots_behavior);
+                         $('uploadChokingAlgorithm').setProperty('value', pref.upload_choking_algorithm);
+                         $('announceAllTrackers').setProperty('checked', pref.announce_to_all_trackers);
+@@ -2165,6 +2174,7 @@
+             settings.set('enable_multi_connections_from_same_ip', $('allowMultipleConnectionsFromTheSameIPAddress').getProperty('checked'));
+             settings.set('enable_embedded_tracker', $('enableEmbeddedTracker').getProperty('checked'));
+             settings.set('embedded_tracker_port', $('embeddedTrackerPort').getProperty('value'));
++            settings.set('ignore_ssl_errors', $('ignoreSSLErrors').getProperty('checked'));
+             settings.set('upload_slots_behavior', $('uploadSlotsBehavior').getProperty('value'));
+             settings.set('upload_choking_algorithm', $('uploadChokingAlgorithm').getProperty('value'));
+             settings.set('announce_to_all_trackers', $('announceAllTrackers').getProperty('checked'));
+-- 
+2.56.0
+
+
+From ec966b954f68645b0592405ffc1912c529005e0a Mon Sep 17 00:00:00 2001
+From: sledgehammer999 <hammered999@gmail.com>
+Date: Thu, 26 Sep 2024 18:49:42 +0300
+Subject: [PATCH 2/2] Reorder code to match UI
+
+Backport to qBittorrent 4.2.5. The embedded_tracker_port_forwarding field
+and the WebUI JavaScript reordering do not apply here (the former does not
+exist in 4.2.5, the latter is already in UI order), so only the WebUI API
+field order in appcontroller.cpp changes.
+
+Upstream commit: 2388ad0aab34b0cb38f035b13d2ff8889d29c501
+---
+ src/webui/api/appcontroller.cpp | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/src/webui/api/appcontroller.cpp b/src/webui/api/appcontroller.cpp
+index 847f7b2..b44ee86 100644
+--- a/src/webui/api/appcontroller.cpp
++++ b/src/webui/api/appcontroller.cpp
+@@ -273,6 +273,9 @@ void AppController::preferencesAction()
+     data["recheck_completed_torrents"] = pref->recheckTorrentsOnCompletion();
+     // Resolve peer countries
+     data["resolve_peer_countries"] = pref->resolvePeerCountries();
++    // Embedded tracker
++    data["enable_embedded_tracker"] = session->isTrackerEnabled();
++    data["embedded_tracker_port"] = pref->getTrackerPort();
+     // Ignore SSL errors
+     data["ignore_ssl_errors"] = pref->isIgnoreSSLErrors();
+ 
+@@ -309,9 +312,6 @@ void AppController::preferencesAction()
+     data["utp_tcp_mixed_mode"] = static_cast<int>(session->utpMixedMode());
+     // Multiple connections per IP
+     data["enable_multi_connections_from_same_ip"] = session->multiConnectionsPerIpEnabled();
+-    // Embedded tracker
+-    data["enable_embedded_tracker"] = session->isTrackerEnabled();
+-    data["embedded_tracker_port"] = pref->getTrackerPort();
+     // Choking algorithm
+     data["upload_slots_behavior"] = static_cast<int>(session->chokingAlgorithm());
+     // Seed choking algorithm
+@@ -690,6 +690,11 @@ void AppController::setPreferencesAction()
+     // Resolve peer countries
+     if (hasKey("resolve_peer_countries"))
+         pref->resolvePeerCountries(it.value().toBool());
++    // Embedded tracker
++    if (hasKey("embedded_tracker_port"))
++        pref->setTrackerPort(it.value().toInt());
++    if (hasKey("enable_embedded_tracker"))
++        session->setTrackerEnabled(it.value().toBool());
+     // Ignore SSL errors
+     if (hasKey("ignore_ssl_errors"))
+         pref->setIgnoreSSLErrors(it.value().toBool());
+@@ -745,11 +750,6 @@ void AppController::setPreferencesAction()
+     // Multiple connections per IP
+     if (hasKey("enable_multi_connections_from_same_ip"))
+         session->setMultiConnectionsPerIpEnabled(it.value().toBool());
+-    // Embedded tracker
+-    if (hasKey("embedded_tracker_port"))
+-        pref->setTrackerPort(it.value().toInt());
+-    if (hasKey("enable_embedded_tracker"))
+-        session->setTrackerEnabled(it.value().toBool());
+     // Choking algorithm
+     if (hasKey("upload_slots_behavior"))
+         session->setChokingAlgorithm(static_cast<BitTorrent::ChokingAlgorithm>(it.value().toInt()));
+-- 
+2.56.0
+

diff --git a/qbittorrent.spec b/qbittorrent.spec
index 9d24662..ce6c678 100644
--- a/qbittorrent.spec
+++ b/qbittorrent.spec
@@ -4,7 +4,7 @@ Name:    qbittorrent
 Summary: A Bittorrent Client
 Epoch:   1
 Version: 4.2.5
-Release: 5%{?dist}
+Release: 6%{?dist}
 License: GPLv2+
 URL:     http://www.qbittorrent.org
 Source0: %{giturl}/archive/release-%{version}/%{name}-%{version}.tar.gz
@@ -15,6 +15,11 @@ Patch0:  qbittorrent-3.3.11-build_flags.patch
 # disable silent qmake config, enable verbose build
 Patch1:  qbittorrent-3.3.1-verbose_build.patch
 
+# Security fix for CVE-2024-51774
+# RCE Vulnerability in qBittorrent Due to Improper SSL/TLS Certificate Validation
+# Fixed upstream in the 4.6+ branches
+# https://github.com/qbittorrent/qBittorrent/pull/21364
+Patch2:  CVE-2024-51774.patch
 
 BuildRequires: cmake3
 BuildRequires: gcc-c++
@@ -55,6 +60,7 @@ mv qBittorrent-release-%{version} build
 pushd build
 %patch0 -p1
 %patch1 -p1 -b .verbose_build
+%patch2 -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
@@ -118,6 +124,10 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/org.qbittorren
 %{_mandir}/man1/qbittorrent-nox.1*
 
 %changelog
+* Fri Oct 30 2026 Charalampos Stratakis <cstratak@redhat.com> - 1:4.2.5-6
+- Security fix for CVE-2024-51774
+Resolves: rhbz#2323592
+
 * Fri Oct  9 2020 Leigh Scott <leigh123linux@gmail.com> - 1:4.2.5-5
 - Switch to cmake
 - Disable webui for gui build

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

only message in thread, other threads:[~2026-11-05  3:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-05  3:54 [rpms/qbittorrent] epel8: Security fix for CVE-2024-51774 Charalampos Stratakis

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