Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/systemd/files/CVE-2019-6454/
Date: Wed, 20 Feb 2019 16:41:43
Message-Id: 1550680875.694f750a433d770d4c72d8d00f403a2ccbac2a4f.floppym@gentoo
1 commit: 694f750a433d770d4c72d8d00f403a2ccbac2a4f
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 20 16:41:15 2019 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 20 16:41:15 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=694f750a
7
8 sys-apps/systemd: remove unused patch
9
10 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
11
12 ...e-receive-an-invalid-dbus-message-ignore-.patch | 54 ----------------------
13 1 file changed, 54 deletions(-)
14
15 diff --git a/sys-apps/systemd/files/CVE-2019-6454/0003-sd-bus-if-we-receive-an-invalid-dbus-message-ignore-.patch b/sys-apps/systemd/files/CVE-2019-6454/0003-sd-bus-if-we-receive-an-invalid-dbus-message-ignore-.patch
16 deleted file mode 100644
17 index cc03893a588..00000000000
18 --- a/sys-apps/systemd/files/CVE-2019-6454/0003-sd-bus-if-we-receive-an-invalid-dbus-message-ignore-.patch
19 +++ /dev/null
20 @@ -1,54 +0,0 @@
21 -From 8d3cea620ab661897fb485ece7332a9073c1783d Mon Sep 17 00:00:00 2001
22 -From: Lennart Poettering <lennart@××××××××××.net>
23 -Date: Wed, 13 Feb 2019 16:51:22 +0100
24 -Subject: [PATCH 3/3] sd-bus: if we receive an invalid dbus message, ignore and
25 - proceeed
26 -
27 -dbus-daemon might have a slightly different idea of what a valid msg is
28 -than us (for example regarding valid msg and field sizes). Let's hence
29 -try to proceed if we can and thus drop messages rather than fail the
30 -connection if we fail to validate a message.
31 -
32 -Hopefully the differences in what is considered valid are not visible
33 -for real-life usecases, but are specific to exploit attempts only.
34 ----
35 - src/libsystemd/sd-bus/bus-socket.c | 9 ++++++---
36 - 1 file changed, 6 insertions(+), 3 deletions(-)
37 -
38 -diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c
39 -index 30d6455b6f..441b4a816f 100644
40 ---- a/src/libsystemd/sd-bus/bus-socket.c
41 -+++ b/src/libsystemd/sd-bus/bus-socket.c
42 -@@ -1072,7 +1072,7 @@ static int bus_socket_read_message_need(sd_bus *bus, size_t *need) {
43 - }
44 -
45 - static int bus_socket_make_message(sd_bus *bus, size_t size) {
46 -- sd_bus_message *t;
47 -+ sd_bus_message *t = NULL;
48 - void *b;
49 - int r;
50 -
51 -@@ -1097,7 +1097,9 @@ static int bus_socket_make_message(sd_bus *bus, size_t size) {
52 - bus->fds, bus->n_fds,
53 - NULL,
54 - &t);
55 -- if (r < 0) {
56 -+ if (r == -EBADMSG)
57 -+ log_debug_errno(r, "Received invalid message from connection %s, dropping.", strna(bus->description));
58 -+ else if (r < 0) {
59 - free(b);
60 - return r;
61 - }
62 -@@ -1108,7 +1110,8 @@ static int bus_socket_make_message(sd_bus *bus, size_t size) {
63 - bus->fds = NULL;
64 - bus->n_fds = 0;
65 -
66 -- bus->rqueue[bus->rqueue_size++] = t;
67 -+ if (t)
68 -+ bus->rqueue[bus->rqueue_size++] = t;
69 -
70 - return 1;
71 - }
72 ---
73 -2.20.1
74 -