The case for memory safe desktop Linux distribution

fiedzia1 pts0 comments

Fiedzia on software: The case for memory safe desktop Linux distribution

2026/06/03

The case for memory safe desktop Linux distribution

I am writing this after setting up new laptop, so I have some thought about how I'd like my system to work and decided to write them down. I am not sure if I will follow up in this as making new distro is insane amount of work, but I am starting to think this would be a good idea.

Note: if you think that C/C++ is fine language with no issues, skip this article, it is not for you.

Unix systems (which Linux and its ecosystem draw a lot from) were created in 70's ... and we learned few lessons since, importance of memory safety being one of them.

While there are many initiatives on this front, I believe we can do better and get there faster by having a leader that shows how to do it, and leaving baggage of 70's behind is necessary to do it. So on this premise, let's think how would it look like.

I imagine a new Linux distribution made entirely of software written in memory safe languages. Working name would be Freezing Linux (because there is 0 C in there).

Here is why it makes sense for me:<br>1. While some existing distros make some progress of modernising software, it is slow process. Having a leader that goes further would accelerate this process, uncovered missing parts, showcase some great software that already exists and trail new paths. This is already happening in the server space, but desktops lag behind.<br>2. Having such clean slate allows to fix many unrelated issues and bring new ideas. We don't need to be tied to conventions from decades ago, and this goes beyond memory safety. For example using bash (or any similar shell) comes with so many footguns that I am banning it for anything beside one-line command execution. On a scale of Linux distribution, mistakes caused by bad tools could be counted in billions of dollars. We should fix that.<br>3. This is already happening if you look at Android, Harmony OS and other modern systems. I am accustomed to Linux distributions being managed by community rather than single company and would prefer if they continue to exists. If traditional distros are too slow to evolve, they may be killed by systems designed for phones and tablets.<br>4. I should not fear that clicking one link will hand over my data to some malicious actor just because someone forgot to check buffer size.<br>5. The idea that C/C++ software will somehow fix itself won't work. Not unless there is direct existential threat.

Assuming I am not first one to come with such idea, I've found several distros aiming for this goal, but all designed for servers or containers, not desktops. One of them could perhaps be used as a base.

Obviously this not easy. Significant amount of categories of memory-safe software currently does not exist. To get a glimpse of what's missing, I decided to look what is running on my new Kubuntu 26.04 setup. ps auxf shows about 80 processes, combined with dpkg -S to find package name and apt-cache show to show what it is, here is brief overview:

Systemd. I believe it is necessary part of desktop system, and I am not aware of any memory-safe alternative.Possibly the largest missing part.<br>accountsservice - interface to user management.<br>bluez - bluetooth management. Blitzy Bluez aims to replace it.<br>cron. Tons of alternatives exist.<br>Python. There is RustPython, but probably the scripts it is running are easy to replace. I don't think we need Python at all here.<br>Network dispatchher<br>polkitd<br>smartmontools<br>snapd. Written in Go.<br>switcheroo-control.<br>thermald

udisks2

network-manager<br>wpasupplicant<br>chrony Rust alternatives exist.

modemmanager

bolt<br>rsyslog<br>upower<br>cupsd<br>rtkit

power-profiles-daemon

mbim-proxy<br>dbus-daemon<br>pipewire<br>openssh. Alternatives exist.<br>geoclue<br>apparmor<br>fuse3

knighttime

Fish. Already in Rust<br>KDE. Alternatives exist.

Overall, systemd would be the largest piece to replace though I've found some comments suggesting Rust could added if Debian can support it, and Debian is working on that, but that's a long shot. NetwotkManager, Bluetooth stack, Pipewire are also large projects.<br>Many of the listed apps are projects small in scope, so rewrite is an option. Things look much better on the desktop env front - there is Cosmic and many other parts of the Wayland ecosystem are implemented in Rust.<br>Could this be a spinoff of Ubuntu or Debian? Maybe. Probably a lot of tooling assumes C world below.<br>I also don't think Fil-C is the solution we should aim for.

What should I do next with those thoughts? I am not sure. But I think I'd like to do something.

Posted by<br>Maciej Dziardziel (fiedzia)

at<br>4:48 AM

Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post

Older Post

Home

Subscribe to:<br>Post Comments (Atom)

Fiedzia

Maciej Dziardziel<br>fiedzia@gmail.com<br>software developer, sysadmin<br>cat owner

Pages

About...

memory linux software safe think desktop

Related Articles