Skip to contentSkip to conversation

networkmanager: update to 1.22.16

PATCH In review Marta Rybczynska 2 participants 3 messages Nov 3, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 networkmanager: update to 1.22.16

NetworkManager 1.22.16 contains a fix for CVE-2020-10754.

This version includes an additional option by default for firewalld zones, --enable-firewalld-zone that installs additional files. Disable it to keep the old behaviour if no firewalld.

Also include a patch for fixing reallocarray usage from gatesgarth meta-openembedded 165ad9ad4c86c9e63f3afcf3172c8e1d3629f3a5 required for the build.

---
 .../fix_reallocarray_check.patch              | 27 +++++++++++++++++++
 ...r_1.22.10.bb => networkmanager_1.22.16.bb} |  7 ++++-
 2 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 meta-networking/recipes-connectivity/networkmanager/networkmanager/fix_reallocarray_check.patch
 rename meta-networking/recipes-connectivity/networkmanager/{networkmanager_1.22.10.bb => networkmanager_1.22.16.bb} (95%)
meta-networking/recipes-connectivity/networkmanager/networkmanager/fix_reallocarray_check.patch new file +27 -0
new file mode 100644
index 000000000..0a8de5410
@@ -0,0 +1,27 @@
+reallocarray() is coming from stdlib.h which maybe indirectly included
+by malloc.h but not on all libc implementations
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+--- a/meson.build
++++ b/meson.build
+@@ -114,7 +114,7 @@ config_h.set10('HAVE_GETRANDOM', use_sys
+ # FIXME secure_getenv check is not useful?
+ config_h.set('HAVE_SECURE_GETENV', cc.has_function('secure_getenv'))
+ config_h.set('HAVE___SECURE_GETENV', cc.has_function('__secure_getenv'))
+-config_h.set10('HAVE_DECL_REALLOCARRAY', cc.has_function('reallocarray', prefix: '#include <malloc.h>'))
++config_h.set10('HAVE_DECL_REALLOCARRAY', cc.has_function('reallocarray', prefix: '#include <stdlib.h>'))
+ config_h.set10('HAVE_DECL_EXPLICIT_BZERO', cc.has_function('explicit_bzero', prefix: '#include <string.h>'))
+ config_h.set10('HAVE_DECL_MEMFD_CREATE', cc.has_function('memfd_create', prefix: '#include <sys/mman.h>'))
+ 
+--- a/configure.ac
++++ b/configure.ac
+@@ -82,7 +82,7 @@ AC_CHECK_DECLS([
+ AC_CHECK_DECLS([
+ 	reallocarray],
+ 	[], [], [[
+-#include <malloc.h>
++#include <stdlib.h>
+ ]])
+ 
+ AC_CHECK_DECLS([
meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.16.bb renamed from meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.10.bb +6 -1
similarity index 95%
rename from meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.10.bb
rename to meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.16.bb
index 33a2b7c0c..ff784b8ce 100644
@@ -26,6 +26,7 @@ SRC_URI = " \
     file://${BPN}.initd \
     file://0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch \
     file://0002-Do-not-create-settings-settings-property-documentati.patch \
+    file://fix_reallocarray_check.patch \
 "
 SRC_URI_append_libc-musl = " \
     file://musl/0001-Fix-build-with-musl-systemd-specific.patch \
@@ -33,7 +34,7 @@ SRC_URI_append_libc-musl = " \
     file://musl/0003-Fix-build-with-musl-for-n-dhcp4.patch \
     file://musl/0004-Fix-build-with-musl-systemd-specific.patch \
 "
-SRC_URI[sha256sum] = "2b29ccc1531ba7ebba95a97f40c22b963838e8b6833745efe8e6fb71fd8fca77"
+SRC_URI[sha256sum] = "377aa053752eaa304b72c9906f9efcd9fbd5f7f6cb4cd4ad72425a68982cffc6"
 
 S = "${WORKDIR}/NetworkManager-${PV}"
 
@@ -71,6 +72,7 @@ PACKAGECONFIG[bluez5] = "--enable-bluez5-dun,--disable-bluez5-dun,bluez5"
 # consolekit is not picked by shlibs, so add it to RDEPENDS too
 PACKAGECONFIG[consolekit] = "--with-session-tracking=consolekit,,consolekit,consolekit"
 PACKAGECONFIG[modemmanager] = "--with-modem-manager-1=yes,--with-modem-manager-1=no,modemmanager"
+PACKAGECONFIG[firewalld] = "--enable-firewalld-zone,--disable-firewalld-zone,firewalld"
 PACKAGECONFIG[ppp] = "--enable-ppp,--disable-ppp,ppp,ppp"
 # Use full featured dhcp client instead of internal one
 PACKAGECONFIG[dhclient] = "--with-dhclient=${base_sbindir}/dhclient,,,dhcp-client"
@@ -151,6 +153,9 @@ ALTERNATIVE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-co
 ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.NetworkManager','',d)}"
 ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}"
 
+# Issue introduced in 1.26
+CVE_CHECK_WHITELIST = "CVE-2021-20297 "
+
 do_install_append() {
     install -Dm 0755 ${WORKDIR}/${BPN}.initd ${D}${sysconfdir}/init.d/network-manager
 
Signature · 1 line
2.33.0
#1 lore raw

Hi Marta,

Thanks for the patch submission!

Since this is for meta-openembedded, it should be sent to [email protected], not the oe-core list.

Similarly, you shouldn't use the [oe-core] tag, just the [meta-oe] tag.

There are different maintainers for oe-core and meta-openembedded so these two things will make sure that the right person sees the patch.

Best regards,

Steve

Quoted 106 lines · Marta Rybczynska

NetworkManager 1.22.16 contains a fix for CVE-2020-10754.

This version includes an additional option by default for firewalld zones, --enable-firewalld-zone that installs additional files. Disable it to keep the old behaviour if no firewalld.

Also include a patch for fixing reallocarray usage from gatesgarth meta-openembedded 165ad9ad4c86c9e63f3afcf3172c8e1d3629f3a5 required for the build.

---
 .../fix_reallocarray_check.patch              | 27 +++++++++++++++++++
 ...r_1.22.10.bb => networkmanager_1.22.16.bb} |  7 ++++-
 2 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 meta-networking/recipes-connectivity/networkmanager/networkmanager/fix_reallocarray_check.patch
 rename meta-networking/recipes-connectivity/networkmanager/{networkmanager_1.22.10.bb => networkmanager_1.22.16.bb} (95%)
meta-networking/recipes-connectivity/networkmanager/networkmanager/fix_reallocarray_check.patch new file +27 -0
new file mode 100644
index 000000000..0a8de5410
@@ -0,0 +1,27 @@
+reallocarray() is coming from stdlib.h which maybe indirectly included
+by malloc.h but not on all libc implementations
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+--- a/meson.build
++++ b/meson.build
+@@ -114,7 +114,7 @@ config_h.set10('HAVE_GETRANDOM', use_sys
+ # FIXME secure_getenv check is not useful?
+ config_h.set('HAVE_SECURE_GETENV', cc.has_function('secure_getenv'))
+ config_h.set('HAVE___SECURE_GETENV', cc.has_function('__secure_getenv'))
+-config_h.set10('HAVE_DECL_REALLOCARRAY', cc.has_function('reallocarray', prefix: '#include <malloc.h>'))
++config_h.set10('HAVE_DECL_REALLOCARRAY', cc.has_function('reallocarray', prefix: '#include <stdlib.h>'))
+ config_h.set10('HAVE_DECL_EXPLICIT_BZERO', cc.has_function('explicit_bzero', prefix: '#include <string.h>'))
+ config_h.set10('HAVE_DECL_MEMFD_CREATE', cc.has_function('memfd_create', prefix: '#include <sys/mman.h>'))
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -82,7 +82,7 @@ AC_CHECK_DECLS([
+ AC_CHECK_DECLS([
+       reallocarray],
+       [], [], [[
+-#include <malloc.h>
++#include <stdlib.h>
+ ]])
+
+ AC_CHECK_DECLS([
meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.16.bb renamed from meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.10.bb +6 -2
similarity index 95%
rename from meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.10.bb
rename to meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.16.bb
index 33a2b7c0c..ff784b8ce 100644
@@ -26,6 +26,7 @@ SRC_URI = " \
     file://${BPN}.initd \
     file://0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch \
     file://0002-Do-not-create-settings-settings-property-documentati.patch \
+    file://fix_reallocarray_check.patch \
 "
 SRC_URI_append_libc-musl = " \
     file://musl/0001-Fix-build-with-musl-systemd-specific.patch \
@@ -33,7 +34,7 @@ SRC_URI_append_libc-musl = " \
     file://musl/0003-Fix-build-with-musl-for-n-dhcp4.patch \
     file://musl/0004-Fix-build-with-musl-systemd-specific.patch \
 "
-SRC_URI[sha256sum] = "2b29ccc1531ba7ebba95a97f40c22b963838e8b6833745efe8e6fb71fd8fca77"
+SRC_URI[sha256sum] = "377aa053752eaa304b72c9906f9efcd9fbd5f7f6cb4cd4ad72425a68982cffc6"
 
 S = "${WORKDIR}/NetworkManager-${PV}"
 
@@ -71,6 +72,7 @@ PACKAGECONFIG[bluez5] = "--enable-bluez5-dun,--disable-bluez5-dun,bluez5"
 # consolekit is not picked by shlibs, so add it to RDEPENDS too
 PACKAGECONFIG[consolekit] = "--with-session-tracking=consolekit,,consolekit,consolekit"
 PACKAGECONFIG[modemmanager] = "--with-modem-manager-1=yes,--with-modem-manager-1=no,modemmanager"
+PACKAGECONFIG[firewalld] = "--enable-firewalld-zone,--disable-firewalld-zone,firewalld"
 PACKAGECONFIG[ppp] = "--enable-ppp,--disable-ppp,ppp,ppp"
 # Use full featured dhcp client instead of internal one
 PACKAGECONFIG[dhclient] = "--with-dhclient=${base_sbindir}/dhclient,,,dhcp-client"
@@ -151,6 +153,9 @@ ALTERNATIVE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-co
 ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.NetworkManager','',d)}"
 ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}"
 
+# Issue introduced in 1.26
+CVE_CHECK_WHITELIST = "CVE-2021-20297 "
+
 do_install_append() {
     install -Dm 0755 ${WORKDIR}/${BPN}.initd ${D}${sysconfdir}/init.d/network-manager
 
--

2.33.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#157821): https://lists.openembedded.org/g/openembedded-core/message/157821
Mute This Topic: https://lists.openembedded.org/mt/86786130/3617601
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw

Hello Steve,
Thank you for spotting this! The patch has been sent to the other list.

Kind regards,
Marta

Quoted 158 lines · Steve Sakoman

Hi Marta,

Thanks for the patch submission!

Since this is for meta-openembedded, it should be sent to [email protected], not the oe-core list.

Similarly, you shouldn't use the [oe-core] tag, just the [meta-oe] tag.

There are different maintainers for oe-core and meta-openembedded so these two things will make sure that the right person sees the patch.

Best regards,

Steve

Quoted 4 lines · Marta Rybczynska

NetworkManager 1.22.16 contains a fix for CVE-2020-10754.

This version includes an additional option by default for firewalld

zones,

Quoted 7 lines

--enable-firewalld-zone that installs additional files. Disable it to keep the old behaviour if no firewalld.

Also include a patch for fixing reallocarray usage from gatesgarth meta-openembedded 165ad9ad4c86c9e63f3afcf3172c8e1d3629f3a5 required for the build.

Quoted 6 lines
---
 .../fix_reallocarray_check.patch              | 27 +++++++++++++++++++
 ...r_1.22.10.bb => networkmanager_1.22.16.bb} |  7 ++++-
 2 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644

meta-networking/recipes-connectivity/networkmanager/networkmanager/fix_reallocarray_check.patch

Quoted 1 line
 rename meta-networking/recipes-connectivity/networkmanager/{

networkmanager_1.22.10.bb => networkmanager_1.22.16.bb} (95%)

Quoted 2 lines

diff --git

a/meta-networking/recipes-connectivity/networkmanager/networkmanager/fix_reallocarray_check.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/fix_reallocarray_check.patch

Quoted 4 lines

new file mode 100644
index 000000000..0a8de5410
--- /dev/null
+++

b/meta-networking/recipes-connectivity/networkmanager/networkmanager/fix_reallocarray_check.patch

meta-networking/recipes-connectivity/networkmanager/networkmanager/fix_reallocarray_check.patch line 11

Quoted 12 lines
meta-networking/recipes-connectivity/networkmanager/networkmanager/fix_reallocarray_check.patch new file +11 -0
@@ -0,0 +1,27 @@
+reallocarray() is coming from stdlib.h which maybe indirectly included
+by malloc.h but not on all libc implementations
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+--- a/meson.build
++++ b/meson.build
+@@ -114,7 +114,7 @@ config_h.set10('HAVE_GETRANDOM', use_sys
+ # FIXME secure_getenv check is not useful?
+ config_h.set('HAVE_SECURE_GETENV', cc.has_function('secure_getenv'))
+ config_h.set('HAVE___SECURE_GETENV',

cc.has_function('__secure_getenv'))

Review line 12

Quoted 1 line
(quoted diff) +1 -0
+-config_h.set10('HAVE_DECL_REALLOCARRAY',

cc.has_function('reallocarray', prefix: '#include <malloc.h>'))

Review line 13

Quoted 1 line
(quoted diff) +1 -0
++config_h.set10('HAVE_DECL_REALLOCARRAY',

cc.has_function('reallocarray', prefix: '#include <stdlib.h>'))

Review line 14

Quoted 1 line
(quoted diff) +1 -0
+ config_h.set10('HAVE_DECL_EXPLICIT_BZERO',

cc.has_function('explicit_bzero', prefix: '#include <string.h>'))

Review line 15

Quoted 1 line
(quoted diff) +1 -0
+ config_h.set10('HAVE_DECL_MEMFD_CREATE',

cc.has_function('memfd_create', prefix: '#include <sys/mman.h>'))

Review

Quoted 13 lines
meta-networking/recipes-connectivity/networkmanager/networkmanager/fix_reallocarray_check.patch new file +12 -0
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -82,7 +82,7 @@ AC_CHECK_DECLS([
+ AC_CHECK_DECLS([
+       reallocarray],
+       [], [], [[
+-#include <malloc.h>
++#include <stdlib.h>
+ ]])
+
+ AC_CHECK_DECLS([
(quoted diff) +0 -0

networkmanager_1.22.10.bb b/meta-networking/recipes-connectivity/networkmanager/ networkmanager_1.22.16.bb

Quoted 2 lines

similarity index 95%
rename from meta-networking/recipes-connectivity/networkmanager/

networkmanager_1.22.10.bb

Quoted 1 line

rename to meta-networking/recipes-connectivity/networkmanager/

networkmanager_1.22.16.bb

Quoted 2 lines

index 33a2b7c0c..ff784b8ce 100644
--- a/meta-networking/recipes-connectivity/networkmanager/

networkmanager_1.22.10.bb

Quoted 1 line

+++ b/meta-networking/recipes-connectivity/networkmanager/

networkmanager_1.22.16.bb

Review SRC_URI = " \ · line 27

Quoted 3 lines
(quoted diff) +0 -0
@@ -26,6 +26,7 @@ SRC_URI = " \
     file://${BPN}.initd \
 

file://0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch \

Quoted 1 line

file://0002-Do-not-create-settings-settings-property-documentati.patch \

meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.16.bb SRC_URI_append_libc-musl = " \ · line 36

Quoted 9 lines
meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.16.bb renamed from meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.10.bb +1 -1
+    file://fix_reallocarray_check.patch \
 "
 SRC_URI_append_libc-musl = " \
     file://musl/0001-Fix-build-with-musl-systemd-specific.patch \
@@ -33,7 +34,7 @@ SRC_URI_append_libc-musl = " \
     file://musl/0003-Fix-build-with-musl-for-n-dhcp4.patch \
     file://musl/0004-Fix-build-with-musl-systemd-specific.patch \
 "
-SRC_URI[sha256sum] =

"2b29ccc1531ba7ebba95a97f40c22b963838e8b6833745efe8e6fb71fd8fca77"

Review SRC_URI_append_libc-musl = " \ · line 37

Quoted 1 line
(quoted diff) +1 -0
+SRC_URI[sha256sum] =

"377aa053752eaa304b72c9906f9efcd9fbd5f7f6cb4cd4ad72425a68982cffc6"

meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.16.bb PACKAGECONFIG[bluez5] =

Quoted 4 lines
meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.16.bb renamed from meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.10.bb +0 -0
 S = "${WORKDIR}/NetworkManager-${PV}"
 
@@ -71,6 +72,7 @@ PACKAGECONFIG[bluez5] =

"--enable-bluez5-dun,--disable-bluez5-dun,bluez5"

Review PACKAGECONFIG[bluez5] = · line 73

Quoted 2 lines
(quoted diff) +0 -0
 # consolekit is not picked by shlibs, so add it to RDEPENDS too
 PACKAGECONFIG[consolekit] =

"--with-session-tracking=consolekit,,consolekit,consolekit"

Review PACKAGECONFIG[bluez5] = · line 74

Quoted 1 line
(quoted diff) +0 -0
 PACKAGECONFIG[modemmanager] =

"--with-modem-manager-1=yes,--with-modem-manager-1=no,modemmanager"

Review PACKAGECONFIG[bluez5] = · line 75

Quoted 1 line
(quoted diff) +1 -0
+PACKAGECONFIG[firewalld] =

"--enable-firewalld-zone,--disable-firewalld-zone,firewalld"

meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.16.bb PACKAGECONFIG[bluez5] = "--enable-bluez5-dun,--disable-bluez5-dun,bluez5"

Quoted 3 lines
meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.16.bb renamed from meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.10.bb +0 -0
 PACKAGECONFIG[ppp] = "--enable-ppp,--disable-ppp,ppp,ppp"
 # Use full featured dhcp client instead of internal one
 PACKAGECONFIG[dhclient] =

"--with-dhclient=${base_sbindir}/dhclient,,,dhcp-client"

Review ALTERNATIVE_${PN} =

Quoted 1 line
(quoted diff) +0 -0
@@ -151,6 +153,9 @@ ALTERNATIVE_${PN} =

"${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-co

Review ALTERNATIVE_${PN} = · line 153

Quoted 1 line
(quoted diff) +0 -0
 ALTERNATIVE_TARGET[resolv-conf] =

"${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.NetworkManager','',d)}"

Review ALTERNATIVE_${PN} = · line 154

Quoted 1 line
(quoted diff) +0 -0
 ALTERNATIVE_LINK_NAME[resolv-conf] =

"${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}"

meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.16.bb ALTERNATIVE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-co

Quoted 6 lines
meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.16.bb renamed from meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.10.bb +3 -0
+# Issue introduced in 1.26
+CVE_CHECK_WHITELIST = "CVE-2021-20297 "
+
 do_install_append() {
     install -Dm 0755 ${WORKDIR}/${BPN}.initd

${D}${sysconfdir}/init.d/network-manager

Quoted 8 lines
(quoted diff) +0 -1
--

2.33.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#157821):

https://lists.openembedded.org/g/openembedded-core/message/157821

Quoted 3 lines

Mute This Topic: https://lists.openembedded.org/mt/86786130/3617601
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [

[email protected]]

Quoted 2 lines

-=-=-=-=-=-=-=-=-=-=-=-