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: 5, Insightful) by vux984 on Tuesday July 04 2017, @01:02AM (5 children)

    by vux984 (5045) on Tuesday July 04 2017, @01:02AM (#534625)

    This Exactly.

    Throw/log an error and don't start the process should be the default behavior. Starting as root if the user name is invalid is beyond the pale.

    Starting Score:    1  point
    Moderation   +3  
       Insightful=2, Informative=1, Total=3
    Extra 'Insightful' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   5  
  • (Score: 2) by kaszz on Tuesday July 04 2017, @02:59AM (1 child)

    by kaszz (4211) on Tuesday July 04 2017, @02:59AM (#534657) Journal

    No log as it binary.. remember? total clusterfuck. Shit like this is what forces administrators to do late nighter to clean up after the braindamage writes code that scriptkids use. (which usually some pointy haired type decided must be used..)

    • (Score: 2) by butthurt on Tuesday July 04 2017, @08:57PM

      by butthurt (6141) on Tuesday July 04 2017, @08:57PM (#534928) Journal

      > No log as it binary.. remember?

      The binary "journal" is a log.

  • (Score: 2) by SDRefugee on Tuesday July 04 2017, @01:06PM (1 child)

    by SDRefugee (4477) on Tuesday July 04 2017, @01:06PM (#534784)

    Starting as root if the user name is invalid is beyond the pale.

    Sounds like something that bunch of psychos in Redmond, Washington would do...

    --
    America should be proud of Edward Snowden, the hero, whether they know it or not..
    • (Score: 0) by Anonymous Coward on Tuesday July 04 2017, @07:48PM

      by Anonymous Coward on Tuesday July 04 2017, @07:48PM (#534903)

      Software requirements specification met!

  • (Score: 2) by Thexalon on Tuesday July 04 2017, @07:51PM

    by Thexalon (636) on Tuesday July 04 2017, @07:51PM (#534906)

    At the very least, if I were going to default to anything at all, I'd default to "nobody".

    --
    The only thing that stops a bad guy with a compiler is a good guy with a compiler.