Skip to content

Conversation

vah13
Copy link

@vah13 vah13 commented Oct 10, 2025

This adds fuzzing support for Telegram Desktop's MTProto protocol and encryption implementation.

Project repository: https://github.com/telegramdesktop/tdesktop
Fuzzer branch: https://github.com/telegramdesktop/tdesktop/tree/ossFuzz/fuzzing

Fuzzers included (8 total):
MTProto Protocol Stack:

  • mtproto_v0_fuzzer: Basic MTProto v0 protocol parsing
  • mtproto_v1_obfuscated_fuzzer: SHA256-based obfuscated handshake
  • mtproto_vd_padded_fuzzer: Padded protocol with anti-DPI
  • tl_serialization_fuzzer: Type Language binary serialization
  • aes_ctr_obfuscation_fuzzer: AES-256-CTR connection obfuscation

Private Message Encryption:

  • aes_ige_encryption_fuzzer: AES-IGE mode used for all messages
  • message_key_derivation_fuzzer: SHA1/SHA256 key derivation
  • auth_key_management_fuzzer: 2048-bit authorization key handling

Technical details:

  • Standalone design with zero dependencies on tdesktop codebase
  • Fast build time (~10 seconds for all 8 fuzzers)
  • Performance: 17,000 - 326,000 exec/sec depending on fuzzer
  • Sanitizers: AddressSanitizer, UndefinedBehaviorSanitizer, MemorySanitizer
  • Total fuzzer code: 2,435 lines

All fuzzers have been tested locally with libFuzzer and pass check_build verification.

This adds fuzzing support for Telegram Desktop's MTProto protocol and encryption implementation.

Project repository: https://github.com/telegramdesktop/tdesktop
Fuzzer branch: https://github.com/telegramdesktop/tdesktop/tree/ossFuzz/fuzzing

Fuzzers included (8 total):
MTProto Protocol Stack:
 - mtproto_v0_fuzzer: Basic MTProto v0 protocol parsing
 - mtproto_v1_obfuscated_fuzzer: SHA256-based obfuscated handshake
 - mtproto_vd_padded_fuzzer: Padded protocol with anti-DPI
 - tl_serialization_fuzzer: Type Language binary serialization
 - aes_ctr_obfuscation_fuzzer: AES-256-CTR connection obfuscation

Private Message Encryption:
  - aes_ige_encryption_fuzzer: AES-IGE mode used for all messages
  - message_key_derivation_fuzzer: SHA1/SHA256 key derivation
  - auth_key_management_fuzzer: 2048-bit authorization key handling

Technical details:
  - Standalone design with zero dependencies on tdesktop codebase
  - Fast build time (~10 seconds for all 8 fuzzers)
  - Performance: 17,000 - 326,000 exec/sec depending on fuzzer
  - Sanitizers: AddressSanitizer, UndefinedBehaviorSanitizer, MemorySanitizer
  - Total fuzzer code: 2,435 lines

All fuzzers have been tested locally with libFuzzer and pass check_build verification.
Copy link

vah13 is integrating a new project:
- Main repo: https://github.com/telegramdesktop/tdesktop
- Criticality score: 0.63039

@vah13
Copy link
Author

vah13 commented Oct 10, 2025

#14110

Copy link
Collaborator

@DavidKorczynski DavidKorczynski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you a Telegram maintainer? we need approval from maintainers that they are okay with this integration and will respond to issues found.

I assume we're waiting for telegramdesktop/tdesktop#29878 as well?


help_url: "https://github.com/telegramdesktop/tdesktop/"

view_restrictions: none
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you double confirm this is intended and also matches the policy of Telegram?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a telegram maintainer, but I'm on the way to integrating OSS-Fuzz with TG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants