diff options
author | Adrian Bunk <bunk@stusta.de> | 2020-03-21 21:58:35 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-04-09 00:07:12 +0100 |
commit | 85a317dbcc4d682a014a141341f3e6181ce56033 (patch) | |
tree | c9685b8c290f317292d93cc5b7ce4b3a41772133 | |
parent | aaf587913d6e8b5cc3fc7cee2e7416593208a4d4 (diff) | |
download | poky-85a317dbcc4d682a014a141341f3e6181ce56033.tar.gz |
systemd: Backport the CVE-2019-20386 fix
(From OE-Core rev: 891200e728c520a02f24028e7d430a4a7e3c20fd)
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-core/systemd/systemd/0001-bus_open-leak-sd_event_source-when-udevadm-trigger.patch | 35 | ||||
-rw-r--r-- | meta/recipes-core/systemd/systemd_241.bb | 1 |
2 files changed, 36 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/0001-bus_open-leak-sd_event_source-when-udevadm-trigger.patch b/meta/recipes-core/systemd/systemd/0001-bus_open-leak-sd_event_source-when-udevadm-trigger.patch new file mode 100644 index 0000000000..7864140bd1 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-bus_open-leak-sd_event_source-when-udevadm-trigger.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 3e9828454dcdaa6cd19ee7ea3e3db30567f22c9f Mon Sep 17 00:00:00 2001 | ||
2 | From: ven <2988994+hexiaowen@users.noreply.github.com> | ||
3 | Date: Wed, 22 May 2019 14:24:28 +0800 | ||
4 | Subject: =?UTF-8?q?bus=5Fopen=20leak=20sd=5Fevent=5Fsource=20when=20udevad?= | ||
5 | =?UTF-8?q?m=20trigger=E3=80=82?= | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Type: text/plain; charset=UTF-8 | ||
8 | Content-Transfer-Encoding: 8bit | ||
9 | |||
10 | On my host, when executing the udevadm trigger, I only receive the change event, which causes memleak | ||
11 | |||
12 | CVE: CVE-2019-20386 | ||
13 | Upstream-Status: Backport | ||
14 | Signed-off-by: Adrian Bunk <bunk@stusta.de> | ||
15 | --- | ||
16 | src/login/logind-button.c | 3 ++- | ||
17 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/src/login/logind-button.c b/src/login/logind-button.c | ||
20 | index daffbf0668..1624a31cc3 100644 | ||
21 | --- a/src/login/logind-button.c | ||
22 | +++ b/src/login/logind-button.c | ||
23 | @@ -341,7 +341,8 @@ int button_open(Button *b) { | ||
24 | } | ||
25 | |||
26 | (void) button_set_mask(b); | ||
27 | - | ||
28 | + | ||
29 | + b->io_event_source = sd_event_source_unref(b->io_event_source); | ||
30 | r = sd_event_add_io(b->manager->event, &b->io_event_source, b->fd, EPOLLIN, button_dispatch, b); | ||
31 | if (r < 0) { | ||
32 | log_error_errno(r, "Failed to add button event: %m"); | ||
33 | -- | ||
34 | 2.20.1 | ||
35 | |||
diff --git a/meta/recipes-core/systemd/systemd_241.bb b/meta/recipes-core/systemd/systemd_241.bb index eb3242d624..e0dc936294 100644 --- a/meta/recipes-core/systemd/systemd_241.bb +++ b/meta/recipes-core/systemd/systemd_241.bb | |||
@@ -24,6 +24,7 @@ SRC_URI += "file://touchscreen.rules \ | |||
24 | file://0005-rules-watch-metadata-changes-in-ide-devices.patch \ | 24 | file://0005-rules-watch-metadata-changes-in-ide-devices.patch \ |
25 | file://0001-meson-declare-version.h-as-dep-for-various-targets-t.patch \ | 25 | file://0001-meson-declare-version.h-as-dep-for-various-targets-t.patch \ |
26 | file://0001-meson-declare-version.h-as-dependency-for-systemd.patch \ | 26 | file://0001-meson-declare-version.h-as-dependency-for-systemd.patch \ |
27 | file://0001-bus_open-leak-sd_event_source-when-udevadm-trigger.patch \ | ||
27 | " | 28 | " |
28 | 29 | ||
29 | # patches needed by musl | 30 | # patches needed by musl |