Introduction
In the realm of cybersecurity, privilege escalation is a feared threat. Imagine: a simple user process on your system could obtain root privileges without even requiring a password. This is exactly what happened with Omarchy, a Linux distribution. Recently, a critical vulnerability was discovered in its default Docker configuration, exposing users to huge security risks. If you are using Omarchy, this article is a must-read for you.
The Discovered Vulnerability
Omarchy's default configuration added the default user to the Linux Docker group. This allowed users to execute Docker commands without sudo. However, the Docker daemon, running with root privileges, listens on /var/run/docker.sock. Members of the Docker group can communicate with this socket, allowing them to run containers as root, mount arbitrary portions of the host filesystem, and execute code with root privileges.
Real-World Example
To illustrate this flaw, let's take a simple example:
``bash $ cat /etc/shadow cat: /etc/shadow: Permission denied ``
However, with Docker:
``bash $ docker run --rm -v /:/hostroot alpine cat /hostroot/etc/shadow root:$6$... bin:!:... daemon:!:... ``
The /etc/shadow file is accessible to an ordinary user process thanks to Docker.
Scope and Implications
Linux supplementary groups are inherited by child processes, meaning every user session is exposed. A compromise on a normal user application could turn into a full machine compromise.
Examples of Affected Applications
- Web browsers
- Code editors and IDEs
- Npm scripts
- Various development tools
Why Does It Matter?
This security configuration was opt-out, not opt-in. Users did not need to use Docker to be exposed. This configuration decision was imposed by default without explanation, which is a misleading practice in security.
How to Protect Yourself?
The solution is simple: update to Omarchy version 4.0.1. This patch fixes the default configuration to prevent this privilege escalation.
Conclusion
In a world where cybersecurity is paramount, it is essential to remain vigilant about system default configurations. This Omarchy flaw highlights the importance of understanding and controlling the privileges granted to user processes.
Let's discuss your project in 15 minutes.