Laser

joined 2 weeks ago
[–] [email protected] 1 points 13 hours ago (1 children)

Regarding Secure Boot, that's definitely a problem. However, not all distros support it OOTB. I might have dismissed it earlier because I consider FDE to be more important than Secure Boot. But I'm aware that this is not on technical merits.

I'd consider FDE more important as well (apart from some fringe use cases). But it doesn't cover all possible attacks, as unlikely as some of them are. However, together they create a solution that is both convenient and sufficiently secure, as long as you can't just intercept the keys on the hardware.

FDE protects the confidentiality of your data in offline attacks, Secure Boot protects integrity and authenticity of binaries started by UEFI. These complement, they don't compete.

[–] [email protected] 2 points 1 day ago* (last edited 1 day ago) (3 children)

Back when I was looking to switch distributions a year ago and it came to the choice between NixOS and Guix System, the latter unfortunately lost due to lack of features I considered essential for me. These were availability of proprietary packages (notably Steam, though I guess this could be rectified with a flatpak version or something), and no support for secure boot, which was the prime reason to switch in the first place, as I wanted to enable passwordless FDE unlock on boot for my machines (at least for the desktop, this should be secure because of fTPM).

Secure Boot is a bit of a more involved process with Lanzaboote, it's not just another "enable = true;", but at least after initial setup it just keeps on working.

I recently spun up another server for various uses, one being backups using restic. According to https://packages.guix.gnu.org/search/?query=restic, it's at 0.9.6 in their repos. NixPKGs has 0.16.5. 0.9.6 turns 5 years old this year.

The other services (yes, they are sketchy, but all GPL) aren't even in Guix at all. Yes, that's a network effect, but if switching the distribution forces me write half of it myself (exaggerating here) it's not suited for my case. The Nix ecosystem has issues but at least it enables me to build the system I want. Guix unfortunately is just another GNU project that's more focused on ideals than practical reality, which, given GNU's nature, is completely understandable and justified. But probably also the main reason for why in the real world, Nix is dominant in its niche while Guix System is a footnote.

[–] [email protected] 7 points 3 days ago* (last edited 3 days ago) (1 children)

also from my totally surface level understanding both sudo and doas “elevate your privileges” which is supposedly unnecessary attack surface. run0 does it in a better way which I do not understand.

sudo and doasare setuid binaries, a special privileged bit to tell the kernel that this binary is not run as the user starting it, but as the owner. A lot of care has to be incorporated into these to make sure you don't escalate your privileges as the default interface is very limited, being a single bit.

Another issue with this approach is that since you're running this from your shell, the process will by default inherit all environment variables, which can be convenient, but also annoying (since a privileged process might write into your $HOME) or upright dangerous.

run0doesn't use that mechanism. systemd is, being a service manager at its core, something launching binaries in specialized environments, e.g. it will start an nginx process under the nginx user with a private tmp, protecting the system from writes by that service, maybe restrict it to a given address family etc. So the infrastructure to launch processes – even for users via systemd-run– is already there. run0 just goes one step further and implements an interface to request to start elevated (or rather with permissions different from their own) processes from a user's shell.

Classic solutions do it like this:

  1. user starts binary with setuid (let's say sudo) that runs with root (because that's the owner of the binary) privileges in their shell. Since this is a child process of their shell, it inherits all environment variables by default.
  2. sudochecks /etc/sudoers if that user is authorized to perform the requested action and either denies the request, performs it or asks for authentication.
  3. a new process is spawned from it, again inheriting the environment variables that were not cleaned, as you can't get rid of variables by forking (this is often an issue if you have services that have their secrets configured via environment variables)

With run0:

  1. user starts run0 binary as a user process. This process inherits the environment variables.
  2. run0 forwards the user's request via interface to the running systemd process (pid 1 I guess). That process however does not inherit any variables by default, since it was started outside the user's shell.
  3. systemd checks if the user who started the run0 binary is allowed to perform the requested operation and again, either denies the request, performs it or asks for authentication.
  4. a new process is spawned from it, but it will only receive the environment variables that were explicitly requested as there's no inheritance.

At least that's my understanding, I haven't looked too much into it or used it yet.

[–] [email protected] 2 points 4 days ago

but you obviously don't want 14 year olds to get drunk.

Which is totally legal here as long as the 14 year old is under supervision of a legal guardian.

[–] [email protected] 5 points 4 days ago

German here with similar laws to yours, though wine and beer legal with 16: legal age of 21 is in line with experts' recommendations regarding brain development, however it's questionable if this approach achieves the goal. If you want to discourage teenage drinking, make it unappealing, not illegal; but then we might have to acknowledge that we have an industry that heavily profits from a risky substance that puts a huge burden on society (several billion in damages each year) and we might have to regulate some aspects instead of just blaming the unfortunate people who got screwed over.

[–] [email protected] 1 points 1 week ago

I guess that's where the advantages come into play the most. I only use it for a handful of machines (2 notebooks, one workstation, an SBC and 2 VPSs) and it's still a great solution, though there is quite the overhead for the first setup.

Anyhow, that doesn't mean that it's more work in total than other distributions. The module system catches a lot of configuration errors for you which means you basically never and up with a "broken" configuration, and even if you did, you could select an older generation (more correct way to say rolling back on NixOS). Sure, the configuration might not do want you intended, but it will most likely be functional.

This even goes so far that some modules detect common configuration pitfalls for applications, like headers not being inherited because they got redefined.

[–] [email protected] 47 points 1 week ago (1 children)

Hence the comment about "bias automation"