diff --git a/If-the-notification-message-length-is-0-ignore-the-m.patch b/If-the-notification-message-length-is-0-ignore-the-m.patch new file mode 100644 index 0000000..17e5acb --- /dev/null +++ b/If-the-notification-message-length-is-0-ignore-the-m.patch @@ -0,0 +1,31 @@ +From 1f74d99193e7d2b0546e641aba25259d9a646e5d 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 f36cf5e320..6bd32ed920 100644 +--- a/src/core/manager.c ++++ b/src/core/manager.c +@@ -1557,6 +1557,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 0481d07..ba91f3c 100644 --- a/systemd.spec +++ b/systemd.spec @@ -12,7 +12,7 @@ Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd Version: 229 -Release: 13%{?gitcommit:.git%{gitcommitshort}}%{?dist} +Release: 14%{?gitcommit:.git%{gitcommitshort}}%{?dist} # For a breakdown of the licensing, see README License: LGPLv2+ and MIT and GPLv2+ Summary: A System and Service Manager @@ -80,6 +80,7 @@ Patch0044: 0044-networkd-add-route-expiration-handler-3242.patch Patch0045: 0045-coredump-ignore-RLIMIT_CORE.patch Patch0046: 0046-networkd-link-fix-handler-typo-for-route_remove-3433.patch Patch0047: 0047-macros.systemd.in-add-systemd_ordering-3776.patch +Patch0048: If-the-notification-message-length-is-0-ignore-the-m.patch Patch0999: 0999-resolved-create-etc-resolv.conf-symlink-at-runtime.patch @@ -964,6 +965,9 @@ getent passwd systemd-journal-upload >/dev/null 2>&1 || useradd -r -l -g systemd /usr/lib/firewalld/services/* %changelog +* Thu Sep 29 2016 Zbigniew Jędrzejewski-Szmek - 229-14 +- Denial-of-service bug against pid1 (#1380286) + * Wed Aug 17 2016 Zbigniew Jędrzejewski-Szmek - 229-13 - Add %%systemd_ordering macro