From 20fa84800330969e399a86a8f222d306ed400a9d Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Sep 29 2016 09:34:51 +0000 Subject: Fix for the empty notify message fuckup --- diff --git a/0016-If-the-notification-message-length-is-0-ignore-the-m.patch b/0016-If-the-notification-message-length-is-0-ignore-the-m.patch new file mode 100644 index 0000000..470988d --- /dev/null +++ b/0016-If-the-notification-message-length-is-0-ignore-the-m.patch @@ -0,0 +1,31 @@ +From d22ed4fb5c503575bc4d62b599d790ebce8cbab4 Mon Sep 17 00:00:00 2001 +From: Jorge Niedbalski +Date: Wed, 28 Sep 2016 18:25:50 -0300 +Subject: [PATCH] If the notification message length is 0, ignore the message + (#4237) + +Fixes #4234. + +Signed-off-by: Jorge Niedbalski +--- + src/core/manager.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/core/manager.c b/src/core/manager.c +index 4d84a0b37e..a085ed899a 100644 +--- a/src/core/manager.c ++++ b/src/core/manager.c +@@ -1648,6 +1648,10 @@ static int manager_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t + + return -errno; + } ++ if (n == 0) { ++ log_debug("Got zero-length notification message. Ignoring."); ++ return 0; ++ } + + CMSG_FOREACH(cmsg, &msghdr) { + if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) { +-- +2.9.0 + diff --git a/systemd.spec b/systemd.spec index 8a9f6a3..ae4d383 100644 --- a/systemd.spec +++ b/systemd.spec @@ -12,7 +12,7 @@ Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd Version: 231 -Release: 4%{?gitcommit:.git%{gitcommitshort}}%{?dist} +Release: 5%{?gitcommit:.git%{gitcommitshort}}%{?dist} # For a breakdown of the licensing, see README License: LGPLv2+ and MIT and GPLv2+ Summary: A System and Service Manager @@ -51,6 +51,7 @@ Patch0012: 0012-shared-install-properly-report-masked-units-listed-i.patch Patch0013: 0013-Revert-pid1-reconnect-to-the-console-before-being-re.patch Patch0014: 0014-systemd-ignore-lack-of-tty-when-checking-whether-col.patch Patch0015: 0015-shared-install-do-not-enable-masked-instances-4005.patch +Patch0016: 0016-If-the-notification-message-length-is-0-ignore-the-m.patch Patch0998: 0998-resolved-create-etc-resolv.conf-symlink-at-runtime.patch @@ -945,6 +946,9 @@ getent passwd systemd-journal-upload >/dev/null 2>&1 || useradd -r -l -g systemd %{_mandir}/man[1578]/systemd-nspawn.* %changelog +* Thu Sep 29 2016 Zbigniew Jędrzejewski-Szmek - 231-5 +- Denial-of-service bug against pid1 (#1380286) + * Thu Aug 25 2016 Zbigniew Jędrzejewski-Szmek - 231-4 - Fix preset-all (#1363858) - Fix issue with daemon-reload messing up graphics (#1367766)