Files
pmaports-rtwo/main
Aster Boese 30e5479de2 main/postmarketos-base: switch from doas to sudo-rs
The version of OpenBSD's doas packaged by Alpine had its last commit
21-02-2022. This in itself is not bad, but the issue is that in that time,
there have been many MRs and issues filed to the repo that see no action.
One major MR, that being a hardening patch against rowhammer attacks,
has layed stale since 03-03-2024. After Natanael Copa asked if the repo
was still maintained, the response was that it is low-priority.

As such switching to sudo-rs, despite its larger size and attack surface, makes
sense due to more users and thus more eyes on it performing analysis and fixing
security issues quicker. OpenBSD doas does not have this itself, and a low-usage
fork of it definitely does not. While there are snazzier, more modern
alternatives like run0, capsudo, or s6-sudo, none of these are in a state where
they can fully replace all the features that sudo provides.

sudo-rs was chosen over the original sudo due to a few factors. The first is
memory safety, as Rust generally solves that issue in the codebase, so a whole
class of possible vulns are eliminated. Second is that sudo-rs is already in
use by larger distributions like Canonical's Ubuntu, meaning that the user base
is already quite large, leading to similar amounts of eyes on the source code.
Third, sudo-rs has had support from the original authors of sudo, allowing the
project to avoid the pitfalls of the legacy C codebase. Finally, sudo-rs has
already had two fairly recent independent security audits, meaning that their
security posture is diligent enough to be trusted.

See https://github.com/trifectatechfoundation/sudo-rs/tree/main/docs/audit

In the future, any further switch in the privilege-escalation tool should keep
the sudo command, be it through a symlink, shim, or a binary itself. This is
maintained currently due to having installed doas-sudo-shim by default, but
more care should be taken in the future to not break user workflows.

Partially reverts 0f327af853

See https://gitlab.postmarketos.org/postmarketOS/pmaports/-/issues/4144

Signed-off-by: Aster Boese <asterboese@mailbox.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7967>
2026-03-18 17:36:30 +00:00
..
2026-02-07 23:56:13 +00:00
2026-02-14 02:09:52 +00:00
2026-01-12 17:01:35 +01:00
2026-01-12 17:01:35 +01:00
2026-02-27 16:39:27 +00:00
2026-01-12 17:01:35 +01:00
2026-01-11 18:52:28 +01:00
2026-03-06 19:51:31 +00:00