Skip to content
This repository was archived by the owner on Oct 24, 2019. It is now read-only.
This repository was archived by the owner on Oct 24, 2019. It is now read-only.

Build setup is susceptible to backdooring #12

@infinity0

Description

@infinity0

In general, we want to be sure that a binary corresponds to the source that it claims to be built from. This is a hard problem (Thompson's "Trusting Trust" paper), but (e.g.) Debian's reproducible builds effort and "Diverse Double Compilation" can help improve our confidence in this security property.

However, the current build system is such that even if we assume outside tools (kernel, C compiler) are clean, we can still end up with a backdoored Nim compiler. This can be done similarly to "Trusting Trust" - it is possible to poison this csources repo (call this B0, which is effectively an opaque unverifiable binary), such that when a clean C compiler builds it into executable code (call this B1), B1 will run on the Nim compiler sources (Araq/Nim) in such a way that the resulting binary Nim compiler (call this B2) contains a backdoor. Further, B2 then can regenerate this csources repo exactly as B0, containing the exact same backdoor, which is still undetectable (opaque autogenerated C code), yet it "looks legit" since you have a converging bootstrapping process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions