Bug 1380286 (CVE-2016-7795) - CVE-2016-7795 systemd: Assertion failure when PID 1 receives a zero-length message over notify socket
Summary: CVE-2016-7795 systemd: Assertion failure when PID 1 receives a zero-length me...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2016-7795
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1380175 1380287 1381573 1382284
Blocks: 1380288
TreeView+ depends on / blocked
 
Reported: 2016-09-29 08:22 UTC by Adam Mariš
Modified: 2020-02-14 17:58 UTC (History)
34 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-11-09 21:02:54 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2678711 0 None None None 2016-10-03 07:18:28 UTC
Red Hat Product Errata RHSA-2016:2610 0 normal SHIPPED_LIVE Moderate: systemd security and bug fix update 2016-11-03 15:50:26 UTC
Red Hat Product Errata RHSA-2016:2694 0 normal SHIPPED_LIVE Moderate: systemd security and bug fix update 2016-11-09 21:48:16 UTC

Description Adam Mariš 2016-09-29 08:22:54 UTC
It was found that systemd fails an assertion in manager_invoke_notify_message when a zero-length message is received over its notification socket. After failing the assertion, PID 1 hangs in the pause system call, making no longer possible to start and stop daemons or cleanly reboot the system. Inetd-style services managed by systemd no longer accept connections.

Since the notification socket, /run/systemd/notify, is world-writable, this allows a local user to perform a denial-of-service attack against systemd.

PoC:

NOTIFY_SOCKET=/run/systemd/notify systemd-notify ""

Upstream bug report:

https://github.com/systemd/systemd/issues/4234

CVE request:

http://www.openwall.com/lists/oss-security/2016/09/28/9

Comment 1 Adam Mariš 2016-09-29 08:23:33 UTC
Created systemd tracking bugs for this issue:

Affects: fedora-all [bug 1380287]

Comment 3 Tomas Hoger 2016-09-29 10:55:19 UTC
This fix was applied upstream:

https://github.com/systemd/systemd/commit/531ac2b2349da02acc9c382849758e07eb92b020

Upstream bug also indicates that the problem was likely introduced via this change, added in v219:

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

Comment 7 Tomas Hoger 2016-09-30 13:11:23 UTC
Additional upstream fixes:

https://github.com/systemd/systemd/commit/9987750e7a4c62e0eb8473603150596ba7c3a015
https://github.com/systemd/systemd/commit/8523bf7dd514a3a2c6114b7b8fb8f308b4f09fc4

The second commit reverts the original fix linked in comment 3.

Comment 9 Andrej Nemec 2016-10-03 07:26:58 UTC
References:

https://www.agwa.name/blog/post/how_to_crash_systemd_in_one_tweet

Comment 12 Tomas Hoger 2016-10-05 11:49:12 UTC
CVE-2016-7796 was moved to a separate bug 1381911, as those CVEs affect different systemd versions.  Only the fix for CVE-2016-7796 make the assert causing CVE-2016-7795 reachable.

Comment 14 errata-xmlrpc 2016-11-04 08:55:43 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2016:2610 https://rhn.redhat.com/errata/RHSA-2016-2610.html

Comment 15 errata-xmlrpc 2016-11-09 16:49:13 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7.2 Extended Update Support

Via RHSA-2016:2694 https://rhn.redhat.com/errata/RHSA-2016-2694.html


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