diff options
Diffstat (limited to 'net-libs/libquotient')
-rw-r--r-- | net-libs/libquotient/Manifest | 5 | ||||
-rw-r--r-- | net-libs/libquotient/files/libquotient-0.6.3-use-after-free.patch | 92 | ||||
-rw-r--r-- | net-libs/libquotient/libquotient-0.6.5.ebuild (renamed from net-libs/libquotient/libquotient-0.6.3.ebuild) | 5 |
3 files changed, 4 insertions, 98 deletions
diff --git a/net-libs/libquotient/Manifest b/net-libs/libquotient/Manifest index c9ecae4d5f7a..b94b59c94887 100644 --- a/net-libs/libquotient/Manifest +++ b/net-libs/libquotient/Manifest @@ -1,8 +1,7 @@ AUX libquotient-0.6.3-no-android.patch 930 BLAKE2B 15ae94889d5543b9d8e6113752df00fef0bcabd2c44adf4146d2751077ec08db17048d4c8716bd245b4f6856e581970c1d230511a681dbb6ae64178bc3fcf75e SHA512 ef3414f3e3dda3926c246d0360be227c52a1ce0aa970f65aff29d2dcbe2c605fc2f583cebba4ad3f8934b872a035a3cc7a9895847eaf9faddf0f46023647f7b9 AUX libquotient-0.6.3-no-tests.patch 1421 BLAKE2B 97f6b9c3cfe5b32607d64fadbd8e72aa0d1f5d14382edd2792fd564cc226cc473ccda18e770d1b449c158b156bb67dcbbbc36f8587436bec28295b8737279f9e SHA512 76d47d6837c4cfb86be95253ad89fb31de60181b12433a579072b567d18c49a040aafeeb51f333ae4038b141724fbaf68a28a440a1a986f5c61eb25b093b2139 -AUX libquotient-0.6.3-use-after-free.patch 3310 BLAKE2B b76cedab7211b24c152fe33fe326e6b9ca487f33a4a15ea51aea73a6e1753967a107a6a23fca85bb3c1f450221d5241d7dd76b3b5fb0ca3daaee9d52dca77feb SHA512 91df36b149e3595e68a4743e88a921bc6fcb4fdd7a0506bae6fdf3d48e1c21a8fddf815999f9f650372a9782c91ec9ec41bb7e83cb5f18b8555684b0e53d5c23 -DIST libquotient-0.6.3.tar.gz 559142 BLAKE2B 77ba0583a90e9d29d44ce9a70909d6b51462a1f16dbc2e9d321eb9d638329af41fe7b0c4f7569e5d46f3a9c12d32b1ef0b926c5e285bc3ed9b70ba6d4dbe8024 SHA512 a81d88b00edc2af8ad9a6a297f1d65ef5d96fb305f503b46f29381df1bb007b42e44b207fb649316c38c977a5b03c93f884407dccdc48ab066af6b004dd9a9d6 DIST libquotient-0.6.4.tar.gz 559830 BLAKE2B 23a2d5bed5a5bcd30ffa00465291f5670d187d44991fe424bce5a2ce1ffc9d4fc09b0cc1e44e7b2b2470f82f6a3bcf4be2d6d9185d2952761a9a94d6f4fae2ce SHA512 6f505a697b6bd123004faaaae4ea6788ed985dafd965c5768cc838be98d6b27f65d5fb04c02d41c6a9ca2ce622acbd49264a9a14a99a087126d2852a926184ce -EBUILD libquotient-0.6.3.ebuild 907 BLAKE2B 0dda7e3e5ddec21ce6c3e445f020208e293cbbdd180ad18d49116e962da27adabefdcd7a02811a47f851b115f0deb37b9b03df0ed5ad12090cecbc7cbf7c0c90 SHA512 2f97f71e4769fada4336381ca3a568b1119152d8575fea8fea6fb854cf27c1d669757a3c0a835769219249d16d1375bba846ccc3f8469de483d261c19f5a2b9c +DIST libquotient-0.6.5.tar.gz 560003 BLAKE2B b23437c3ef204da731723946e372685cb492ee5feab3f71f5770a27c1fa2d2810676ed2c9dbdb95499055e05a3589db92c75190471ba4dc14f3aaea8f2282216 SHA512 9079de0eec103f15cb7092319546b8be213b460ab172444e4f2f2b10d06db85485fda48546b3291db9014fddd8b22542119d6bbeb69bee1f2a208ac87990c3e4 EBUILD libquotient-0.6.4.ebuild 865 BLAKE2B 2431de16f13e607f793b629182c954b0488c8dd107123398b7d5e9d13c88c3c70d7e92c2d3f519552a8dc12c581dc323f67b41b09624338cd254a539e5d5dd68 SHA512 7befebbee995aa9b4211c05149d119556ed30e50656ba0a534ba08acd60ac4a495006a9324b2201b7273df5673af22d2cf77c597e7d8a7467894986f368c0e8d +EBUILD libquotient-0.6.5.ebuild 865 BLAKE2B 2431de16f13e607f793b629182c954b0488c8dd107123398b7d5e9d13c88c3c70d7e92c2d3f519552a8dc12c581dc323f67b41b09624338cd254a539e5d5dd68 SHA512 7befebbee995aa9b4211c05149d119556ed30e50656ba0a534ba08acd60ac4a495006a9324b2201b7273df5673af22d2cf77c597e7d8a7467894986f368c0e8d MISC metadata.xml 249 BLAKE2B ad415db89e5dee1627aa77f44ded9d4e1e5b8217d06c7ca25bbaa3fe92ce67c2b1090957c45a821b407d7927e5af798498aa6a5b903895ee1af8ee20a446c7f7 SHA512 76a5a340b13f0053ca3c5e94ed24380ea8d29b45ac8655419e22eaadb1e4a827c04d2e7e36b65145c4964e6526f656618fc6ac144e277ef53cb7373e6239e3c3 diff --git a/net-libs/libquotient/files/libquotient-0.6.3-use-after-free.patch b/net-libs/libquotient/files/libquotient-0.6.3-use-after-free.patch deleted file mode 100644 index 12046a102121..000000000000 --- a/net-libs/libquotient/files/libquotient-0.6.3-use-after-free.patch +++ /dev/null @@ -1,92 +0,0 @@ -From f286ef4c5b3c71510d6ef15e8cc12cada84f3682 Mon Sep 17 00:00:00 2001 -From: Nicolas Fella <nicolas.fella@gmx.de> -Date: Sun, 27 Dec 2020 21:24:06 +0100 -Subject: [PATCH] Fix use-after-free of QNetworkReply in BaseJob - -Usually QNetworkAccessManager expects the user to delete the replies, but when the QNetworkAccessManager itself is deleted it deletes all pending replies (https://code.woboq.org/qt5/qtbase/src/network/access/qnetworkaccessmanager.cpp.html#529). - -This can lead to use-after-free crashes when d->reply is accessed. By putting the reply into a QPointer the exiting if(d->reply) checks can work properly. - -(cherry picked from commit 9d854e778d8d6ef8e03e1ea74fe958675b24fd45) ---- - lib/jobs/basejob.cpp | 33 +++++++++++++++++++-------------- - 1 file changed, 19 insertions(+), 14 deletions(-) - -diff --git a/lib/jobs/basejob.cpp b/lib/jobs/basejob.cpp -index 3fa1cd94..2ac942f5 100644 ---- a/lib/jobs/basejob.cpp -+++ b/lib/jobs/basejob.cpp -@@ -24,6 +24,7 @@ - #include <QtCore/QTimer> - #include <QtCore/QStringBuilder> - #include <QtCore/QMetaEnum> -+#include <QtCore/QPointer> - #include <QtNetwork/QNetworkAccessManager> - #include <QtNetwork/QNetworkReply> - #include <QtNetwork/QNetworkRequest> -@@ -76,15 +77,6 @@ QDebug BaseJob::Status::dumpToLog(QDebug dbg) const - return dbg << ": " << message; - } - --struct NetworkReplyDeleter : public QScopedPointerDeleteLater { -- static inline void cleanup(QNetworkReply* reply) -- { -- if (reply && reply->isRunning()) -- reply->abort(); -- QScopedPointerDeleteLater::cleanup(reply); -- } --}; -- - template <typename... Ts> - constexpr auto make_array(Ts&&... items) - { -@@ -112,6 +104,16 @@ class BaseJob::Private { - retryTimer.setSingleShot(true); - } - -+ ~Private() -+ { -+ if (reply) { -+ if (reply->isRunning()) { -+ reply->abort(); -+ } -+ delete reply; -+ } -+ } -+ - void sendRequest(); - /*! \brief Parse the response byte array into JSON - * -@@ -140,7 +142,10 @@ class BaseJob::Private { - - QByteArrayList expectedKeys; - -- QScopedPointer<QNetworkReply, NetworkReplyDeleter> reply; -+ // When the QNetworkAccessManager is destroyed it destroys all pending replies. -+ // Using QPointer allows us to know when that happend. -+ QPointer<QNetworkReply> reply; -+ - Status status = Unprepared; - QByteArray rawResponse; - /// Contains a null document in case of non-JSON body (for a successful -@@ -315,16 +320,16 @@ void BaseJob::Private::sendRequest() - - switch (verb) { - case HttpVerb::Get: -- reply.reset(connection->nam()->get(req)); -+ reply = connection->nam()->get(req); - break; - case HttpVerb::Post: -- reply.reset(connection->nam()->post(req, requestData.source())); -+ reply = connection->nam()->post(req, requestData.source()); - break; - case HttpVerb::Put: -- reply.reset(connection->nam()->put(req, requestData.source())); -+ reply = connection->nam()->put(req, requestData.source()); - break; - case HttpVerb::Delete: -- reply.reset(connection->nam()->sendCustomRequest(req, "DELETE", requestData.source())); -+ reply = connection->nam()->sendCustomRequest(req, "DELETE", requestData.source()); - break; - } - } diff --git a/net-libs/libquotient/libquotient-0.6.3.ebuild b/net-libs/libquotient/libquotient-0.6.5.ebuild index 9ab95317dc78..0474fff2b604 100644 --- a/net-libs/libquotient/libquotient-0.6.3.ebuild +++ b/net-libs/libquotient/libquotient-0.6.5.ebuild @@ -24,10 +24,9 @@ DEPEND=" RDEPEND="${DEPEND}" PATCHES=( - "${FILESDIR}"/${P}-use-after-free.patch # 0.6.x branch # downstream patches - "${FILESDIR}"/${P}-no-android.patch - "${FILESDIR}"/${P}-no-tests.patch + "${FILESDIR}"/${PN}-0.6.3-no-android.patch + "${FILESDIR}"/${PN}-0.6.3-no-tests.patch ) src_configure() { |