From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C20C115808E for ; Mon, 25 Apr 2022 01:44:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 614ADE093E; Mon, 25 Apr 2022 01:44:03 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7CAC4E093E for ; Mon, 25 Apr 2022 01:43:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8326D341813 for ; Mon, 25 Apr 2022 01:43:50 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E25A975 for ; Mon, 25 Apr 2022 01:43:48 +0000 (UTC) From: "Georgy Yakovlev" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Georgy Yakovlev" Message-ID: <1650850949.35dad0d1895f480f390231f42b3e64b02b148f89.gyakovlev@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-im/telegram-desktop/files/, net-im/telegram-desktop/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-im/telegram-desktop/files/tdesktop-3.6.1-fix-use-after-free.patch net-im/telegram-desktop/telegram-desktop-3.6.1-r1.ebuild net-im/telegram-desktop/telegram-desktop-3.6.1.ebuild X-VCS-Directories: net-im/telegram-desktop/ net-im/telegram-desktop/files/ X-VCS-Committer: gyakovlev X-VCS-Committer-Name: Georgy Yakovlev X-VCS-Revision: 35dad0d1895f480f390231f42b3e64b02b148f89 X-VCS-Branch: master Date: Mon, 25 Apr 2022 01:43:48 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0df54ea8-3cb0-49fa-b330-68b14344e076 X-Archives-Hash: 7a92fcd4a79bcce30b59e047f62d3b88 commit: 35dad0d1895f480f390231f42b3e64b02b148f89 Author: Esteve Varela Colominas gmail com> AuthorDate: Sun Apr 24 17:52:29 2022 +0000 Commit: Georgy Yakovlev gentoo org> CommitDate: Mon Apr 25 01:42:29 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35dad0d1 net-im/telegram-desktop: Fix use after free affecting multi user Closes: https://bugs.gentoo.org/837914 Thanks-to: Joe Kappus wt.gd> Signed-off-by: Esteve Varela Colominas gmail.com> Closes: https://github.com/gentoo/gentoo/pull/25184 Signed-off-by: Georgy Yakovlev gentoo.org> .../files/tdesktop-3.6.1-fix-use-after-free.patch | 44 ++++++++++++++++++++++ ...6.1.ebuild => telegram-desktop-3.6.1-r1.ebuild} | 1 + 2 files changed, 45 insertions(+) diff --git a/net-im/telegram-desktop/files/tdesktop-3.6.1-fix-use-after-free.patch b/net-im/telegram-desktop/files/tdesktop-3.6.1-fix-use-after-free.patch new file mode 100644 index 000000000000..5a8e6ceedd66 --- /dev/null +++ b/net-im/telegram-desktop/files/tdesktop-3.6.1-fix-use-after-free.patch @@ -0,0 +1,44 @@ +Description: Do not capture buttons in AccountsList that belong to inner VerticalLayout widget + This fixes a use-after-free error (double destruction) in the main menu right after account switching. +Bug-Debian: https://bugs.debian.org/1008156 +Bug-Ubuntu: https://launchpad.net/bugs/1967673 +Forwarded: https://github.com/telegramdesktop/tdesktop/pull/24301 +Author: Nicholas Guriev +Last-Update: Sat, 09 Apr 2022 13:47:55 +0300 + +--- tdesktop-3.6.1-full.orig/Telegram/SourceFiles/settings/settings_information.cpp ++++ tdesktop-3.6.1-full/Telegram/SourceFiles/settings/settings_information.cpp +@@ -78,9 +78,7 @@ + int _outerIndex = 0; + + Ui::SlideWrap *_addAccount = nullptr; +- base::flat_map< +- not_null, +- base::unique_qptr> _watched; ++ base::flat_map, Ui::SettingsButton*> _watched; + + base::unique_qptr _contextMenu; + std::unique_ptr _reorder; +@@ -730,7 +728,7 @@ + order.reserve(inner->count()); + for (auto i = 0; i < inner->count(); i++) { + for (const auto &[account, button] : _watched) { +- if (button.get() == inner->widgetAt(i)) { ++ if (button == inner->widgetAt(i)) { + order.push_back(account->session().uniqueId()); + } + } +@@ -769,11 +767,11 @@ + account, + std::move(activate)); + }; +- button.reset(inner->add(MakeAccountButton( ++ button = inner->add(MakeAccountButton( + inner, + _controller, + account, +- std::move(callback)))); ++ std::move(callback))); + } + } + inner->resizeToWidth(_outer->width()); diff --git a/net-im/telegram-desktop/telegram-desktop-3.6.1.ebuild b/net-im/telegram-desktop/telegram-desktop-3.6.1-r1.ebuild similarity index 98% rename from net-im/telegram-desktop/telegram-desktop-3.6.1.ebuild rename to net-im/telegram-desktop/telegram-desktop-3.6.1-r1.ebuild index d2fc536e145f..4a14450d8da3 100644 --- a/net-im/telegram-desktop/telegram-desktop-3.6.1.ebuild +++ b/net-im/telegram-desktop/telegram-desktop-3.6.1-r1.ebuild @@ -77,6 +77,7 @@ PATCHES=( "${FILESDIR}/tdesktop-3.5.2-musl.patch" "${FILESDIR}/tdesktop-3.6.0-support-ffmpeg5.patch" "${FILESDIR}/tdesktop-3.6.1-fix-kwayland-5.93.patch" + "${FILESDIR}/tdesktop-3.6.1-fix-use-after-free.patch" ) # Current desktop-file-utils-0.26 does not understand Version=1.5