summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0001-bus_open-leak-sd_event_source-when-udevadm-trigger.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0001-bus_open-leak-sd_event_source-when-udevadm-trigger.patch')
-rw-r--r--meta/recipes-core/systemd/systemd/0001-bus_open-leak-sd_event_source-when-udevadm-trigger.patch35
1 files changed, 35 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 0000000..7864140
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-bus_open-leak-sd_event_source-when-udevadm-trigger.patch
@@ -0,0 +1,35 @@
1From 3e9828454dcdaa6cd19ee7ea3e3db30567f22c9f Mon Sep 17 00:00:00 2001
2From: ven <2988994+hexiaowen@users.noreply.github.com>
3Date: Wed, 22 May 2019 14:24:28 +0800
4Subject: =?UTF-8?q?bus=5Fopen=20leak=20sd=5Fevent=5Fsource=20when=20udevad?=
5 =?UTF-8?q?m=20trigger=E3=80=82?=
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10On my host, when executing the udevadm trigger, I only receive the change event, which causes memleak
11
12CVE: CVE-2019-20386
13Upstream-Status: Backport
14Signed-off-by: Adrian Bunk <bunk@stusta.de>
15---
16 src/login/logind-button.c | 3 ++-
17 1 file changed, 2 insertions(+), 1 deletion(-)
18
19diff --git a/src/login/logind-button.c b/src/login/logind-button.c
20index 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--
342.20.1
35