Sudo and Su Being Rewritten in Rust for Memory Safety

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • rustsec

    RustSec API & Tooling

  • Yeah your decade old single header libs get so many audits by comparison.

    https://github.com/RustSec/rustsec/tree/main/cargo-audit

    https://mozilla.github.io/cargo-vet/

    cargo is not npm

  • rust

    Empowering everyone to build reliable and efficient software.

  • Well, opinions in the Rust community clearly differ:

    "Rust is blazingly fast and memory-efficient: with no runtime or garbage collector" [0]

    I guess it depends on what you mean by a runtime. Panic handlers and initialisation code is a pretty small runtime.

    [0] https://www.rust-lang.org/

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • nomicon

    The Dark Arts of Advanced and Unsafe Rust Programming

  • That's a really good point that I feel like isn't talked about enough. Unsafe rust is a lot harder to write correctly than bog standard C, because you have to uphold the invariants to avoid undefined behavior (1). It's why there's a whole ebook about it (2).

    That doesn't mean it's impossible to write correct unsafe code, it's just not as obvious as "trust me bro I know better than borrowck." You can't actually elide the invariants Rust upholds, you just have to take over from the compiler when it can't prove them.

    (1) https://doc.rust-lang.org/reference/behavior-considered-unde...

    (2) https://doc.rust-lang.org/nomicon/

  • sudo-rs

    A memory safe implementation of sudo and su.

  • https://github.com/memorysafety/sudo-rs/blob/main/proofs/sud...

    sidenote: why there is no python like syntax language TLA+ and ability to generate a partial implementation you could hook into (complete) from that model.

  • sudo

    Utility to execute a command as another user

  • C-sudo: https://github.com/sudo-project/sudo/graphs/contributors

  • OpenDoas

    A portable fork of the OpenBSD `doas` command

  • Why not port https://github.com/Duncaen/OpenDoas to rust instead?

    If the goal is security, then there is more to it than just using a memory safe language. Otherwise the result of this, possibly unwittingly, seems performative.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts