Merge ~fourdollars/ubuntu/+source/systemd:ubuntu-disco into ~ubuntu-core-dev/ubuntu/+source/systemd:ubuntu-disco

Proposed by Shih-Yuan Lee
Status: Merged
Merged at revision: ff3f611956d9483bf5f8e780e9d5b67ab996b17c
Proposed branch: ~fourdollars/ubuntu/+source/systemd:ubuntu-disco
Merge into: ~ubuntu-core-dev/ubuntu/+source/systemd:ubuntu-disco
Diff against target: 176 lines (+141/-0)
4 files modified
debian/changelog (+19/-0)
debian/patches/0001-shared-but-util-drop-trusted-annotation-from-bus_ope.patch (+31/-0)
debian/patches/debian/Revert-udev-network-device-renaming-immediately-give.patch (+89/-0)
debian/patches/series (+2/-0)
Reviewer Review Type Date Requested Status
Robert Ancell (community) Approve
Review via email: mp+372334@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Robert Ancell (robert-ancell) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 26816f5..0b600be 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,22 @@
1systemd (240-6ubuntu5.7) disco; urgency=medium
2
3 * d/p/d/Revert-udev-network-device-renaming-immediately-give.patch:
4 - udev: add Revert-udev-network-device-renaming-immediately-give.patch back
5 Dropping this patch will cause the persistent network regression.
6 (LP: #1842651)
7
8 -- Shih-Yuan Lee (FourDollars) <sylee@canonical.com> Thu, 05 Sep 2019 19:01:29 +0800
9
10systemd (240-6ubuntu5.6) disco-security; urgency=medium
11
12 * SECURITY UPDATE: Unprivileged users are granted access to privileged
13 systemd-resolved D-Bus methods
14 - d/p/0001-shared-but-util-drop-trusted-annotation-from-bus_ope.patch:
15 drop trusted annotation from bus_open_system_watch_bind_with_description()
16 - CVE-2019-15718
17
18 -- Chris Coulson <chris.coulson@canonical.com> Thu, 29 Aug 2019 23:29:13 +0100
19
1systemd (240-6ubuntu5.4) disco; urgency=medium20systemd (240-6ubuntu5.4) disco; urgency=medium
221
3 [ You-Sheng Yang ]22 [ You-Sheng Yang ]
diff --git a/debian/patches/0001-shared-but-util-drop-trusted-annotation-from-bus_ope.patch b/debian/patches/0001-shared-but-util-drop-trusted-annotation-from-bus_ope.patch
4new file mode 10064423new file mode 100644
index 0000000..8186f70
--- /dev/null
+++ b/debian/patches/0001-shared-but-util-drop-trusted-annotation-from-bus_ope.patch
@@ -0,0 +1,31 @@
1From 35e528018f315798d3bffcb592b32a0d8f5162bd Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
3Date: Tue, 27 Aug 2019 19:00:34 +0200
4Subject: [PATCH] shared/but-util: drop trusted annotation from
5 bus_open_system_watch_bind_with_description()
6
7https://bugzilla.redhat.com/show_bug.cgi?id=1746057
8
9This only affects systemd-resolved. bus_open_system_watch_bind_with_description()
10is also used in timesyncd, but it has no methods, only read-only properties, and
11in networkd, but it annotates all methods with SD_BUS_VTABLE_UNPRIVILEGED and does
12polkit checks.
13---
14 src/shared/bus-util.c | 4 ----
15 1 file changed, 4 deletions(-)
16
17diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c
18index 6af115e7aa..821339d4ae 100644
19--- a/src/shared/bus-util.c
20+++ b/src/shared/bus-util.c
21@@ -1705,10 +1705,6 @@ int bus_open_system_watch_bind_with_description(sd_bus **ret, const char *descri
22 if (r < 0)
23 return r;
24
25- r = sd_bus_set_trusted(bus, true);
26- if (r < 0)
27- return r;
28-
29 r = sd_bus_negotiate_creds(bus, true, SD_BUS_CREDS_UID|SD_BUS_CREDS_EUID|SD_BUS_CREDS_EFFECTIVE_CAPS);
30 if (r < 0)
31 return r;
diff --git a/debian/patches/debian/Revert-udev-network-device-renaming-immediately-give.patch b/debian/patches/debian/Revert-udev-network-device-renaming-immediately-give.patch
0new file mode 10064432new file mode 100644
index 0000000..e8bf17b
--- /dev/null
+++ b/debian/patches/debian/Revert-udev-network-device-renaming-immediately-give.patch
@@ -0,0 +1,89 @@
1From: Michael Biebl <biebl@debian.org>
2Date: Thu, 18 Jul 2013 01:04:07 +0200
3Subject: Revert "udev: network device renaming - immediately give up if the
4 target name isn't available"
5
6This reverts commit 97595710b77aa162ca5e20da57d0a1ed7355eaad.
7
8We need to keep supporting systems with 75-persistent-net-generator.rules
9generated names for a while after switching to net.ifnames. Re-apply this old
10hack to make the renaming less likely to fail.
11---
12 src/udev/udev-event.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++-----
13 1 file changed, 46 insertions(+), 5 deletions(-)
14
15diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
16index 07b7365..f67b295 100644
17--- a/src/udev/udev-event.c
18+++ b/src/udev/udev-event.c
19@@ -680,6 +680,7 @@ static int rename_netif(UdevEvent *event) {
20 const char *action, *oldname;
21 char name[IFNAMSIZ];
22 int ifindex, r;
23+ int loop;
24
25 if (!event->name)
26 return 0; /* No new name is requested. */
27@@ -705,17 +706,57 @@ static int rename_netif(UdevEvent *event) {
28 return log_device_error_errno(dev, r, "Failed to get ifindex: %m");
29
30 strscpy(name, IFNAMSIZ, event->name);
31+
32 r = rtnl_set_link_name(&event->rtnl, ifindex, name);
33- if (r < 0)
34- return log_device_error_errno(dev, r, "Failed to rename network interface %i from '%s' to '%s': %m", ifindex, oldname, name);
35+ if (r >= 0) {
36+ r = device_rename(dev, event->name);
37+ if (r < 0)
38+ return log_warning_errno(r, "Network interface %i is renamed from '%s' to '%s', but could not update sd_device object: %m", ifindex, oldname, name);
39+
40+ log_device_debug(dev, "Network interface %i is renamed from '%s' to '%s'", ifindex, oldname, name);
41+
42+ return 1;
43+ }
44+
45+ /* keep trying if the destination interface name already exists */
46+ if (r != -EEXIST)
47+ goto out;
48
49- r = device_rename(dev, event->name);
50+ /* free our own name, another process may wait for us */
51+ snprintf(name, IFNAMSIZ, "rename%u", ifindex);
52+ r = rtnl_set_link_name(&event->rtnl, ifindex, name);
53 if (r < 0)
54- return log_warning_errno(r, "Network interface %i is renamed from '%s' to '%s', but could not update sd_device object: %m", ifindex, oldname, name);
55+ goto out;
56
57+ /* log temporary name */
58 log_device_debug(dev, "Network interface %i is renamed from '%s' to '%s'", ifindex, oldname, name);
59
60- return 1;
61+ /* wait a maximum of 90 seconds for our target to become available */
62+ strscpy(name, IFNAMSIZ, event->name);
63+ loop = 90 * 20;
64+ while (loop--) {
65+ const struct timespec duration = { 0, 1000 * 1000 * 1000 / 20 };
66+
67+ nanosleep(&duration, NULL);
68+
69+ r = rtnl_set_link_name(&event->rtnl, ifindex, name);
70+ if (r >= 0) {
71+ r = device_rename(dev, event->name);
72+ if (r < 0)
73+ return log_warning_errno(r, "Network interface %i is renamed from '%s' to '%s', but could not update sd_device object: %m", ifindex, oldname, name);
74+
75+ log_device_debug(dev, "Network interface %i is renamed from '%s' to '%s'", ifindex, oldname, name);
76+
77+ return 1;
78+ }
79+ if (r != -EEXIST)
80+ goto out;
81+ }
82+
83+out:
84+ if (r < 0)
85+ return log_device_error_errno(dev, r, "Failed to rename network interface %i from '%s' to '%s': %m", ifindex, oldname, name);
86+ return r;
87 }
88
89 static int update_devnode(UdevEvent *event) {
diff --git a/debian/patches/series b/debian/patches/series
index 3a69a3a..eaf2648 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -54,6 +54,7 @@ core-when-we-uninstall-a-job-add-unit-to-dbus-queue.patch
54debian/Use-Debian-specific-config-files.patch54debian/Use-Debian-specific-config-files.patch
55debian/Bring-tmpfiles.d-tmp.conf-in-line-with-Debian-defaul.patch55debian/Bring-tmpfiles.d-tmp.conf-in-line-with-Debian-defaul.patch
56debian/Make-run-lock-tmpfs-an-API-fs.patch56debian/Make-run-lock-tmpfs-an-API-fs.patch
57debian/Revert-udev-network-device-renaming-immediately-give.patch
57debian/Add-support-for-TuxOnIce-hibernation.patch58debian/Add-support-for-TuxOnIce-hibernation.patch
58debian/Re-enable-journal-forwarding-to-syslog.patch59debian/Re-enable-journal-forwarding-to-syslog.patch
59debian/Don-t-enable-audit-by-default.patch60debian/Don-t-enable-audit-by-default.patch
@@ -149,3 +150,4 @@ ask-password-prevent-buffer-overrow-when-reading-fro.patch
149rdrand-workaround-on-amd.patch150rdrand-workaround-on-amd.patch
150lp1835581-src-network-networkd-dhcp4.c-set-prefsrc-for-classle.patch151lp1835581-src-network-networkd-dhcp4.c-set-prefsrc-for-classle.patch
151lp1668771-resolved-switch-cache-option-to-a-tri-state-option-s.patch152lp1668771-resolved-switch-cache-option-to-a-tri-state-option-s.patch
1530001-shared-but-util-drop-trusted-annotation-from-bus_ope.patch

Subscribers

People subscribed via source and target branches