Closed aiooord closed 9 months ago
plz enable beta, restart telegram and send crash id on next start and post id here.
Crash ID: 6b51b7f2-5233-49fd-849e-e2dc1d390961
This crash, that you reported, was reproduced in that version with any other message as well, it was fixed here:
https://github.com/telegramdesktop/tdesktop/commit/a7090c5fbaf2d47216ab99f9bb0a3331ea2d6daf
It has nothing to do with the png image.
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.
Steps to reproduce
This vulnerability/bug exists in telegram v4.11.5 x64 desktop for Windows. The following steps lead to this bug:
First, we should create a group with topics enabled. After that, we should make a new topic and then put some corrupted PNG-based photos on the newly created topic in the group. The PNG photos must be large enough and have some corrupted format to trigger this bug effectively because when triggered, this vulnerability made some errors about libpng processing sRGB colors, which we can see in the following windbg debug session.
However, based on my analysis, I think this vulnerability is caused by libpng. For example, if a corrupt PNG is presented to be decoded (The photos I feed to Telegram), it ends up crashing. I put windbg crash analysis here:
As we can see here, libpng made some warnings about iCCP. The "libpng warning: iCCP: known incorrect sRGB profile" indicates an issue related to the International Color Consortium Profile (iCCP) in the PNG image handling library libpng. This warning relates to the PNG image's color profile and how the libpng library interprets it. So, this warning message might indicate that the crash is related to the handling or processing of PNG images within the application. However, based on call stacks, this vulnerability will be triggered when this rlottie calls the height() method in the Surface class. I put the call stack in the following section, which shows exactly the execution path that will trigger this vulnerability:
Also, I put the analysis of windbg on this crash here:
The exception appears to be an access violation (c0000005) involving a null pointer read in the Telegram.exe process. The exception occurred at memory address 0000000000000000, indicating an attempt to read from a null pointer. Further analysis of the call stack and the specific function Telegram!rlottie::Surface::height+0x0000000000a249bf may be necessary to understand the root cause of the exception and identify potential fixes or mitigations by developers.
Expected behaviour
The application should render photos and then publish them in the newly created topic in the group.
Actual behaviour
The whole application will crash with a crafted PNG. It's important to address and remediate null pointer dereference vulnerability to prevent potential exploitation and improve the overall security posture of the telegram.
Operating system
Windows 10 x64
Version of Telegram Desktop
v4.11.5 x64 Desktop for Windows
Installation source
Static binary from official website
Crash ID
No response
Logs
No response