Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1416044 - (CVE-2016-10156) CVE-2016-10156 systemd: systemd creates world-writable suid files allowing root privilege escalation
CVE-2016-10156 systemd: systemd creates world-writable suid files allowing ro...
Status: CLOSED NOTABUG
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
high Severity high
: ---
: ---
Assigned To: Red Hat Product Security
impact=important,public=20170124,repo...
: Security
Depends On:
Blocks: 1416047
  Show dependency treegraph
 
Reported: 2017-01-24 08:12 EST by Adam Mariš
Modified: 2017-01-25 05:01 EST (History)
10 users (show)

See Also:
Fixed In Version: systemd 229
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-01-24 08:54:52 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Adam Mariš 2017-01-24 08:12:52 EST
It was found that systemd creates world-writable SUID files that allows local attacker to dump binaries into them and run arbitrary code as root.

This issue affects systemd v228 and was introduced by:

https://github.com/systemd/systemd/commit/ee735086f8670be1591fa9593e80dd60163a7a2f

and fixed by:

https://github.com/systemd/systemd/commit/06eeacb6fe029804f296b065b3ce91e796e1cd0e

Original bug report:

https://bugzilla.novell.com/show_bug.cgi?id=1020601
Comment 1 Zbigniew Jędrzejewski-Szmek 2017-01-24 08:25:57 EST
Does this apply to any Fedora versions?
Comment 2 Tomas Hoger 2017-01-24 08:48:48 EST
(In reply to Zbigniew Jędrzejewski-Szmek from comment #1)
> Does this apply to any Fedora versions?

F24 already has 229 and also GAed with 229, AFAICS.  I see 222 was the latest version in F23.  It does not seem any released Fedora version was affected.  Sanity check from you as a package maintainer would definitely be good.
Comment 3 Tomas Hoger 2017-01-24 08:54:52 EST
systemd in Red Hat Enterprise Linux 7 is not affected - all touch_file() calls use either mode 0 or mode 644.
Comment 4 Adam Mariš 2017-01-24 08:56:46 EST
Reference:

http://seclists.org/oss-sec/2017/q1/175
Comment 6 Bat.Men 2017-01-24 15:20:33 EST
(In reply to Tomas Hoger from comment #3)
> systemd in Red Hat Enterprise Linux 7 is not affected - all touch_file()
> calls use either mode 0 or mode 644.

Hello :) does it mean Centos 7 is not affected too ? Thanks
Comment 7 Bat.Men 2017-01-24 17:22:14 EST
(In reply to Bat.Men from comment #6)
> (In reply to Tomas Hoger from comment #3)
> > systemd in Red Hat Enterprise Linux 7 is not affected - all touch_file()
> > calls use either mode 0 or mode 644.
> 
> Hello :) does it mean Centos 7 is not affected too ? Thanks

I forget to write/mention that i watched into systemd-219-19.el7_2.13.src.rpm and i found in source folder systemd-219\src\shared\util.c the same source line wich had to be patched ...

fd = open(path, O_WRONLY|O_CREAT|O_CLOEXEC|O_NOCTTY, mode > 0 ? mode : 0644);

the .patch files did not contain an update for this line, too. 
So i'm not sure - i'm not a system developer ;)
Comment 8 Adam Mariš 2017-01-25 05:01:52 EST
(In reply to Bat.Men from comment #7)
> (In reply to Bat.Men from comment #6)
> > (In reply to Tomas Hoger from comment #3)
> > > systemd in Red Hat Enterprise Linux 7 is not affected - all touch_file()
> > > calls use either mode 0 or mode 644.
> > 
> > Hello :) does it mean Centos 7 is not affected too ? Thanks
> 
> I forget to write/mention that i watched into
> systemd-219-19.el7_2.13.src.rpm and i found in source folder
> systemd-219\src\shared\util.c the same source line wich had to be patched ...
> 
> fd = open(path, O_WRONLY|O_CREAT|O_CLOEXEC|O_NOCTTY, mode > 0 ? mode : 0644);
> 
> the .patch files did not contain an update for this line, too. 
> So i'm not sure - i'm not a system developer ;)

systemd-219 doesn't contain the patch that introduced this vulnerability. When you grep the source code for all calls to touch_file, you can see that mode is always set to either 0 or 0644, which means that `mode > 0 ? mode : 0644` will always return 0644, thus no world-writable files are created.

Note You need to log in before you can comment on or make changes to this bug.