Stories
Slash Boxes
Comments

SoylentNews is people

posted by Fnord666 on Monday July 03 2017, @10:12PM   Printer-friendly
from the it's-a-feature dept.

Submitted via IRC for TheMightyBuzzard

A bug in Linux's systemd init system causes root permissions to be given to services associated with invalid usernames, and while this could pose a security risk, exploitation is not an easy task.

A developer who uses the online moniker "mapleray" last week discovered a problem related to systemd unit files, the configuration files used to describe resources and their behavior. Mapleray noticed that a systemd unit file containing an invalid username – one that starts with a digit (e.g. "0day") – will initiate the targeted process with root privileges instead of regular user privileges.

Systemd is designed not to allow usernames that start with a numeric character, but Red Hat, CentOS and other Linux distributions do allow such usernames.

"It's systemd's parsing of the User= parameter that determines the naming doesn't follow a set of conventions, and decides to fall back to its default value, root," explained developer Mattias Geniar.

While this sounds like it could be leveraged to obtain root privileges on any Linux installation using systemd, exploiting the bug in an attack is not an easy task. Geniar pointed out that the attacker needs root privileges in the first place to edit the systemd unit file and use it.

[...] Systemd developers have classified this issue as "not-a-bug" and they apparently don't plan on fixing it. Linux users are divided on the matter – some believe this is a vulnerability that could pose a serious security risk, while others agree that a fix is not necessary.

See, this is why we can't have nice init systems.

Source: http://www.securityweek.com/linux-systemd-gives-root-privileges-invalid-usernames


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 0) by Anonymous Coward on Monday July 03 2017, @11:50PM (3 children)

    by Anonymous Coward on Monday July 03 2017, @11:50PM (#534611)

    Hurd has a concept of unprivileged user sort of like Unix 'nobody' except the unprivileged user has an empty user id.

  • (Score: 0) by Anonymous Coward on Tuesday July 04 2017, @10:36AM (2 children)

    by Anonymous Coward on Tuesday July 04 2017, @10:36AM (#534757)

    The user "nobody" is not an unprivileged user. It's a terribly named user with only access to Apache / wwwroot, and should not be used for anything else.

    The user "nobody" should really be named "apache".

    • (Score: 0) by Anonymous Coward on Tuesday July 04 2017, @08:31PM

      by Anonymous Coward on Tuesday July 04 2017, @08:31PM (#534916)

      You know there are boxes that don't run a webserver? Of course you don't.

      Full stack!
      Full stack!
      Full stack!

      Chant with me, moron.

    • (Score: 1) by Deeo Kain on Tuesday July 04 2017, @09:42PM

      by Deeo Kain (5848) on Tuesday July 04 2017, @09:42PM (#534946)

      Wrong. RedHat uses user httpd for the web server processes, Debian uses www.data. User nobody really is nobody.