Ubuntu Makes the Swap: From C-Primarily based sudo to Rust-Primarily based sudo-rs

Ubuntu Makes the Swap: From C-Primarily based sudo to Rust-Primarily based sudo-rs

Last Updated: August 30, 2025By

Rust continues its deeper integration into the preferred Linux distribution

Ubuntu is advancing its dedication to system safety by changing one among its core elements. Experimental builds of the upcoming Ubuntu 25.10 now use sudo-rs by default — a Rust-based rewrite of the traditional sudo utility.

This choice is a part of an initiative to transition to safer and dependable implementations of important utilities, eliminating typical C code vulnerabilities comparable to buffer overflows, use-after-free errors, and different safety flaws.

What’s sudo-rs and Why Do We Want It?

The sudo-rs mission is developed with full compatibility with the unique sudo in thoughts, nevertheless it’s written in Rust, which gives strict reminiscence administration and a protected sort system.

Canonical (Ubuntu’s developer) formally permitted the transition to sudo-rs again in Could 2025, however the full alternative solely started lately with the implementation of all crucial options:

  • Help for older Linux kernel variations (down to five.9)
  • Help for NOEXEC and AppArmor
  • Stability bug fixes
  • Migration of sudo-rs to the primary repository after safety audit

What About Common sudo?

The traditional sudo remains to be accessible within the system. Customers can revert to it utilizing the command:

sudo update-alternatives --set sudo /usr/bin/sudo.ws

Nevertheless, in Ubuntu 26.10, builders plan to utterly take away the traditional model from the primary repository, leaving solely sudo-rs.

What’s Subsequent?

There are additionally discussions about changing the su command with an identical Rust implementation — su-rs. For now, /usr/bin/su stays the traditional model, however experiments with the choice are already deliberate.

Ubuntu is not the primary system transitioning to Rust implementations of core elements. Related developments have been established by:

  • Fedora, which is testing Rust-based systemd modules
  • System76 Pop!_OS, the place some consumer instruments are already written in Rust
  • Redox OS, an working system constructed from scratch in Rust

Why This Issues

The Rust implementation of sudo is not only a “fashionable” rewrite. It is a step towards eliminating a whole class of vulnerabilities which have plagued Linux infrastructure for many years.

Utilities like sudo, su, and passwd deal with privileges and consumer enter, making them main targets for assaults.

Utilizing Rust in such utilities permits for:

  • Eliminating complete lessons of vulnerabilities at compile time
  • Enhancing reliability and readability of system code
  • Simplifying subsequent auditing and upkeep

If no crucial bugs emerge, sudo-rs will seem within the Ubuntu 26.04 LTS launch by default and completely.

In case you’ve got discovered a mistake within the textual content, please ship a message to the writer by choosing the error and urgent Ctrl-Enter.

You have to be logged in to remark.