Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 837914 - net-im/telegram-desktop-3.6.1 crashes/segfaults when multiple accounts in use
Summary: net-im/telegram-desktop-3.6.1 crashes/segfaults when multiple accounts in use
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Esteve Varela Colominas
URL:
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks:
 
Reported: 2022-04-12 06:13 UTC by Joe Kappus
Modified: 2022-04-25 01:43 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix-double-destruction.patch (Fix-double-destruction.patch,1.80 KB, patch)
2022-04-12 06:13 UTC, Joe Kappus
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Kappus 2022-04-12 06:13:11 UTC
Created attachment 770198 [details, diff]
Fix-double-destruction.patch

Debian managed to track down and solve this bug over at : https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1008156

I believe this will only be triggered if a Telegram user has multiple accounts signed in. Opening the sidebar menu and selecting anything will trigger a reproducible segfault, even closing it after the initial opening will trigger it. 

Quick workaround, start telegram with the below exported:

LD_PRELOAD=libjemalloc.so.2 telegram-desktop

I am attaching the patch that fixes this issue. Hopefully can get a revision bump with the patch on Bug #837569 included as well.
Comment 1 Kolan Sh. 2022-04-13 22:07:54 UTC
confirm, patch works for me, thanks!
Comment 2 Larry the Git Cow gentoo-dev 2022-04-25 01:43:48 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35dad0d1895f480f390231f42b3e64b02b148f89

commit 35dad0d1895f480f390231f42b3e64b02b148f89
Author:     Esteve Varela Colominas <esteve.varela@gmail.com>
AuthorDate: 2022-04-24 17:52:29 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2022-04-25 01:42:29 +0000

    net-im/telegram-desktop: Fix use after free affecting multi user
    
    Closes: https://bugs.gentoo.org/837914
    Thanks-to: Joe Kappus <joe@wt.gd>
    Signed-off-by: Esteve Varela Colominas <esteve.varela@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/25184
    Signed-off-by: Georgy Yakovlev <gyakovlev@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(+)