Package: release.debian.org Severity: normal Tags: bullseye User: release.debian.org@packages.debian.org Usertags: pu Dear release managers, Please consider to include the following crash fix of Telegram Desktop to a coming bullseye point release. [ Reason ] A critical issue leading to a crash was revealed in the telegram-desktop package in released stable. See Bug#993243 for detailed information about auto-deleting timers. [ Impact ] When a user receives an incoming message with time to live of 30 days, the application crashes and may fall into unrecoverable state. [ Tests ] A possible test-case is described in the aforementioned bug report. [ Risks ] Minimal. The proposed patch is tiny and it is based on a commit written by an upstream author. [ Checklist ] [x] *all* changes are documented in the d/changelog [x] I reviewed all changes and I approve them [x] attach debdiff against the package in stable [x] the issue is verified as fixed in unstable [ Changes ] New Schedule-TTL-check.patch.
diffstat for telegram-desktop-2.6.1+ds telegram-desktop-2.6.1+ds
changelog | 6 ++++++
patches/Schedule-TTL-check.patch | 25 +++++++++++++++++++++++++
patches/series | 1 +
3 files changed, 32 insertions(+)
diff -Nru telegram-desktop-2.6.1+ds/debian/changelog telegram-desktop-2.6.1+ds/debian/changelog
--- telegram-desktop-2.6.1+ds/debian/changelog 2021-02-27 21:48:45.000000000 +0300
+++ telegram-desktop-2.6.1+ds/debian/changelog 2021-09-07 15:08:28.000000000 +0300
@@ -1,3 +1,9 @@
+telegram-desktop (2.6.1+ds-1+deb11u1) bullseye; urgency=medium
+
+ * Add Schedule-TTL-check.patch (Closes: #993243).
+
+ -- Nicholas Guriev <guriev-ns@ya.ru> Tue, 07 Sep 2021 15:08:28 +0300
+
telegram-desktop (2.6.1+ds-1) unstable; urgency=medium
* New upstream release.
diff -Nru telegram-desktop-2.6.1+ds/debian/patches/Schedule-TTL-check.patch telegram-desktop-2.6.1+ds/debian/patches/Schedule-TTL-check.patch
--- telegram-desktop-2.6.1+ds/debian/patches/Schedule-TTL-check.patch 1970-01-01 03:00:00.000000000 +0300
+++ telegram-desktop-2.6.1+ds/debian/patches/Schedule-TTL-check.patch 2021-09-07 14:09:28.000000000 +0300
@@ -0,0 +1,25 @@
+Description: Check message TTL every 24 hours
+Origin: https://github.com/telegramdesktop/tdesktop/commit/b2e829904fb7976784618dea18700dbb5568b42f#diff-1a8a66ba5ef178212c808f28d2952c728a53d3150033ec0bd15fe2819d67cd38
+Bug-Debian: https://bugs.debian.org/993243
+Author: John Preston <johnprestonmail@gmail.com>
+Acked-By: Nicholas Guriev <guriev-ns@ya.ru>
+Last-Update: Tue, 07 Sep 2021 14:09:28 +0300
+
+diff --git a/Telegram/SourceFiles/data/data_session.cpp b/Telegram/SourceFiles/data/data_session.cpp
+index 421a2096b..1068f1cb3 100644
+--- a/Telegram/SourceFiles/data/data_session.cpp
++++ b/Telegram/SourceFiles/data/data_session.cpp
+@@ -2020,8 +2020,11 @@ void Session::scheduleNextTTLs() {
+ }
+ const auto nearest = _ttlMessages.begin()->first;
+ const auto now = base::unixtime::now();
+- const auto timeout = (std::max(now, nearest) - now) * crl::time(1000);
+- _ttlCheckTimer.callOnce(timeout);
++
++ // Set timer not more than for 24 hours.
++ const auto maxTimeout = TimeId(86400);
++ const auto timeout = std::min(std::max(now, nearest) - now, maxTimeout);
++ _ttlCheckTimer.callOnce(timeout * crl::time(1000));
+ }
+
+ void Session::unregisterMessageTTL(
diff -Nru telegram-desktop-2.6.1+ds/debian/patches/series telegram-desktop-2.6.1+ds/debian/patches/series
--- telegram-desktop-2.6.1+ds/debian/patches/series 2021-02-27 09:31:30.000000000 +0300
+++ telegram-desktop-2.6.1+ds/debian/patches/series 2021-09-07 14:09:28.000000000 +0300
@@ -5,3 +5,4 @@
Ignore-emoji-pack.patch
No-random-popups.patch
Packed-resources.patch
+Schedule-TTL-check.patch
Attachment:
signature.asc
Description: This is a digitally signed message part