Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Olm Olm
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 6
    • Issues 6
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • matrix-orgmatrix-org
  • OlmOlm
  • Merge requests
  • !39

Support building a "disarmed" target via the `OLM_FUZZING` macro.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Denis Kasak requested to merge dkasak/disarmed-variant-support-for-fuzzing into master Jul 13, 2021
  • Overview 2
  • Commits 1
  • Pipelines 1
  • Changes 1

Like other crypto libs, libolm contains many obstacles which a fuzzer is unlikely to be able to surmount but which are not important for the end goal of fuzzing. The easiest and most robust way around this is to remove these obstacles conditionally when building the fuzzer binaries.

This commit adds a preprocessor macro OLM_FUZZING which can be used to conditionally disables problematic bits of code during compile-time for easier fuzzing. For ease of reference, I'm calling such a variant of the code "disarmed" (as in the MR title).

Currently the only thing it disables is the encryption/decryption and base64 encoding/decoding when processing pickled Megolm keys. This allows the fuzzers to fuzz the unpickling functionality directly without inadvertently fuzzing the base64 encoder and encryption (which should be fuzzed separately).

The macro is set in the Makefile only when building fuzzer binaries.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: dkasak/disarmed-variant-support-for-fuzzing