diff --git a/backport-network-add-missing-link-network-checks.patch b/backport-network-add-missing-link-network-checks.patch new file mode 100644 index 0000000..186596b --- /dev/null +++ b/backport-network-add-missing-link-network-checks.patch @@ -0,0 +1,41 @@ +From b1b0b42e48303134731e017a108c6c334ef5f4c8 Mon Sep 17 00:00:00 2001 +From: Yu Watanabe +Date: Tue, 17 Sep 2019 21:29:23 +0900 +Subject: [PATCH] network: add missing link->network checks + +When the function is called, no network file may be assigned to the +link. +--- + src/network/networkd-link.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c +index f1aeb7287e34..46d55f64dc5b 100644 +--- a/src/network/networkd-link.c ++++ b/src/network/networkd-link.c +@@ -2393,9 +2393,9 @@ static int link_drop_foreign_config(Link *link) { + continue; + + if (link_address_is_dynamic(link, address)) { +- if (FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP)) ++ if (link->network && FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP)) + continue; +- } else if (FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_STATIC)) ++ } else if (link->network && FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_STATIC)) + continue; + + if (link_is_static_address_configured(link, address)) { +@@ -2435,11 +2435,11 @@ static int link_drop_foreign_config(Link *link) { + in_addr_equal(AF_INET6, &route->dst, &(union in_addr_union) { .in6 = {{{ 0xff,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 }}} })) + continue; + +- if (route->protocol == RTPROT_STATIC && ++ if (route->protocol == RTPROT_STATIC && link->network && + FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_STATIC)) + continue; + +- if (route->protocol == RTPROT_DHCP && ++ if (route->protocol == RTPROT_DHCP && link->network && + FLAGS_SET(link->network->keep_configuration, KEEP_CONFIGURATION_DHCP)) + continue; + diff --git a/systemd.spec b/systemd.spec index 6b26e74..6422f3b 100644 --- a/systemd.spec +++ b/systemd.spec @@ -16,7 +16,7 @@ Name: systemd Url: https://www.freedesktop.org/wiki/Software/systemd Version: 243 -Release: 45 +Release: 46 License: MIT and LGPLv2+ and GPLv2+ Summary: System and Service Manager @@ -137,6 +137,7 @@ Patch0089: backport-stat-util-add-stat_inode_unmodified-helper-that-chec.pa Patch0090: backport-basic-stat-util-make-mtime-check-stricter-and-use-en.patch Patch0091: backport-udev-make-algorithm-that-selects-highest-priority-de.patch Patch0092: backport-tentatively-ignore-FORCERENEW-command.patch +Patch0093: backport-network-add-missing-link-network-checks.patch #openEuler Patch9002: 1509-fix-journal-file-descriptors-leak-problems.patch @@ -1524,6 +1525,9 @@ fi %exclude /usr/share/man/man3/* %changelog +* Thu Sep 9 2021 yangmingtai - 243-46 +- fix network coredump after install cloud-init + * Mon Aug 16 2021 yangmingtai - 243-45 - Type:CVE - ID:CVE-2020-13529