From 7915bcecf5b25eb525c5700fc4196422596b5a38 Mon Sep 17 00:00:00 2001 From: Wang Mingyu Date: Tue, 18 Nov 2025 17:08:18 +0800 Subject: corosync: upgrade 3.1.9 -> 3.1.10 CVE-2025-30472.patch removed since it's included in 3.1.10 Signed-off-by: Wang Mingyu Signed-off-by: Khem Raj --- .../corosync/corosync/CVE-2025-30472.patch | 69 ---------------------- .../recipes-extended/corosync/corosync_3.1.10.bb | 59 ++++++++++++++++++ .../recipes-extended/corosync/corosync_3.1.9.bb | 60 ------------------- 3 files changed, 59 insertions(+), 129 deletions(-) delete mode 100644 meta-networking/recipes-extended/corosync/corosync/CVE-2025-30472.patch create mode 100644 meta-networking/recipes-extended/corosync/corosync_3.1.10.bb delete mode 100644 meta-networking/recipes-extended/corosync/corosync_3.1.9.bb diff --git a/meta-networking/recipes-extended/corosync/corosync/CVE-2025-30472.patch b/meta-networking/recipes-extended/corosync/corosync/CVE-2025-30472.patch deleted file mode 100644 index 9b36dbe3fb..0000000000 --- a/meta-networking/recipes-extended/corosync/corosync/CVE-2025-30472.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 7839990f9cdf34e55435ed90109e82709032466a Mon Sep 17 00:00:00 2001 -From: Jan Friesse -Date: Mon, 24 Mar 2025 12:05:08 +0100 -Subject: [PATCH] totemsrp: Check size of orf_token msg - -orf_token message is stored into preallocated array on endian convert -so carefully crafted malicious message can lead to crash of corosync. - -Solution is to check message size beforehand. - -Signed-off-by: Jan Friesse -Reviewed-by: Christine Caulfield - -CVE: CVE-2025-30472 -Upstream-Status: Backport [https://github.com/corosync/corosync/commits/7839990f9cdf34e55435ed90109e82709032466a] -Signed-off-by: Peter Marko ---- - exec/totemsrp.c | 18 +++++++++++++++++- - 1 file changed, 17 insertions(+), 1 deletion(-) - -diff --git a/exec/totemsrp.c b/exec/totemsrp.c -index 962d0e2a..364528ce 100644 ---- a/exec/totemsrp.c -+++ b/exec/totemsrp.c -@@ -3679,12 +3679,20 @@ static int check_orf_token_sanity( - const struct totemsrp_instance *instance, - const void *msg, - size_t msg_len, -+ size_t max_msg_len, - int endian_conversion_needed) - { - int rtr_entries; - const struct orf_token *token = (const struct orf_token *)msg; - size_t required_len; - -+ if (msg_len > max_msg_len) { -+ log_printf (instance->totemsrp_log_level_security, -+ "Received orf_token message is too long... ignoring."); -+ -+ return (-1); -+ } -+ - if (msg_len < sizeof(struct orf_token)) { - log_printf (instance->totemsrp_log_level_security, - "Received orf_token message is too short... ignoring."); -@@ -3698,6 +3706,13 @@ static int check_orf_token_sanity( - rtr_entries = token->rtr_list_entries; - } - -+ if (rtr_entries > RETRANSMIT_ENTRIES_MAX) { -+ log_printf (instance->totemsrp_log_level_security, -+ "Received orf_token message rtr_entries is corrupted... ignoring."); -+ -+ return (-1); -+ } -+ - required_len = sizeof(struct orf_token) + rtr_entries * sizeof(struct rtr_item); - if (msg_len < required_len) { - log_printf (instance->totemsrp_log_level_security, -@@ -3868,7 +3883,8 @@ static int message_handler_orf_token ( - "Time since last token %0.4f ms", tv_diff / (float)QB_TIME_NS_IN_MSEC); - #endif - -- if (check_orf_token_sanity(instance, msg, msg_len, endian_conversion_needed) == -1) { -+ if (check_orf_token_sanity(instance, msg, msg_len, sizeof(token_storage), -+ endian_conversion_needed) == -1) { - return (0); - } - diff --git a/meta-networking/recipes-extended/corosync/corosync_3.1.10.bb b/meta-networking/recipes-extended/corosync/corosync_3.1.10.bb new file mode 100644 index 0000000000..07d9333ec8 --- /dev/null +++ b/meta-networking/recipes-extended/corosync/corosync_3.1.10.bb @@ -0,0 +1,59 @@ +SUMMARY = "The Corosync Cluster Engine and Application Programming Interfaces" +DESCRIPTION = "This package contains the Corosync Cluster Engine Executive, several default \ +APIs and libraries, default configuration files, and an init script." +HOMEPAGE = "http://corosync.github.io/corosync/" + +SECTION = "base" + +inherit autotools pkgconfig systemd github-releases + +SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${BP}.tar.gz \ + file://corosync.conf \ + " +SRC_URI[sha256sum] = "be361c827f99b215b3bd3fa2fb071c03dac6831c2a351963d938caef62604bc8" +UPSTREAM_CHECK_GITTAGREGEX = "v(?P\d+(\.\d+)+)" + +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=d9c2cca5d3448c43e52a399ad611658a" + +DEPENDS = "groff-native nss libqb kronosnet" + +SYSTEMD_SERVICE:${PN} = "corosync.service corosync-notifyd.service" +SYSTEMD_AUTO_ENABLE = "disable" + +INITSCRIPT_NAME = "corosync-daemon" + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ + dbus snmp \ +" + +PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus" +PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp" +PACKAGECONFIG[systemd] = "--enable-systemd --with-systemddir=${systemd_system_unitdir},--disable-systemd --without-systemddir,systemd" + +EXTRA_OECONF = "ac_cv_path_BASHPATH=${base_bindir}/bash ap_cv_cc_pie=no" +EXTRA_OEMAKE = "tmpfilesdir_DATA=" + +do_install:append() { + install -D -m 0644 ${UNPACKDIR}/corosync.conf ${D}${sysconfdir}/corosync/corosync.conf.example + install -d ${D}${sysconfdir}/sysconfig/ + install -m 0644 ${S}/init/corosync.sysconfig.example ${D}${sysconfdir}/sysconfig/corosync + install -m 0644 ${S}/tools/corosync-notifyd.sysconfig.example ${D}${sysconfdir}/sysconfig/corosync-notifyd + + rmdir ${D}${localstatedir}/log/cluster ${D}${localstatedir}/log + rmdir --ignore-fail-on-non-empty ${D}${localstatedir} + + install -d ${D}${sysconfdir}/default/volatiles + echo "d root root 0755 ${localstatedir}/log/cluster none" > ${D}${sysconfdir}/default/volatiles/05_corosync + + if [ ${@bb.utils.filter('DISTRO_FEATURES','systemd',d)} ]; then + install -d ${D}${sysconfdir}/tmpfiles.d + echo "d ${localstatedir}/log/cluster - - - -" > ${D}${sysconfdir}/tmpfiles.d/corosync.conf + fi +} + +RDEPENDS:${PN} += "bash ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit-pidof', 'procps', d)}" + +FILES:${PN} += "${datadir}/dbus-1" +FILES:${PN}-dbg += "${libexecdir}/lcrso/.debug" +FILES:${PN}-doc += "${datadir}/snmp/mibs/COROSYNC-MIB.txt" diff --git a/meta-networking/recipes-extended/corosync/corosync_3.1.9.bb b/meta-networking/recipes-extended/corosync/corosync_3.1.9.bb deleted file mode 100644 index 1699701c9d..0000000000 --- a/meta-networking/recipes-extended/corosync/corosync_3.1.9.bb +++ /dev/null @@ -1,60 +0,0 @@ -SUMMARY = "The Corosync Cluster Engine and Application Programming Interfaces" -DESCRIPTION = "This package contains the Corosync Cluster Engine Executive, several default \ -APIs and libraries, default configuration files, and an init script." -HOMEPAGE = "http://corosync.github.io/corosync/" - -SECTION = "base" - -inherit autotools pkgconfig systemd github-releases - -SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${BP}.tar.gz \ - file://corosync.conf \ - file://CVE-2025-30472.patch \ - " -SRC_URI[sha256sum] = "203354bbddee1a97b3c50a076eae89c635f406dd674ccaefc94bb9092acd9535" -UPSTREAM_CHECK_GITTAGREGEX = "v(?P\d+(\.\d+)+)" - -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=d9c2cca5d3448c43e52a399ad611658a" - -DEPENDS = "groff-native nss libqb kronosnet" - -SYSTEMD_SERVICE:${PN} = "corosync.service corosync-notifyd.service" -SYSTEMD_AUTO_ENABLE = "disable" - -INITSCRIPT_NAME = "corosync-daemon" - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ - dbus snmp \ -" - -PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus" -PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp" -PACKAGECONFIG[systemd] = "--enable-systemd --with-systemddir=${systemd_system_unitdir},--disable-systemd --without-systemddir,systemd" - -EXTRA_OECONF = "ac_cv_path_BASHPATH=${base_bindir}/bash ap_cv_cc_pie=no" -EXTRA_OEMAKE = "tmpfilesdir_DATA=" - -do_install:append() { - install -D -m 0644 ${UNPACKDIR}/corosync.conf ${D}${sysconfdir}/corosync/corosync.conf.example - install -d ${D}${sysconfdir}/sysconfig/ - install -m 0644 ${S}/init/corosync.sysconfig.example ${D}${sysconfdir}/sysconfig/corosync - install -m 0644 ${S}/tools/corosync-notifyd.sysconfig.example ${D}${sysconfdir}/sysconfig/corosync-notifyd - - rmdir ${D}${localstatedir}/log/cluster ${D}${localstatedir}/log - rmdir --ignore-fail-on-non-empty ${D}${localstatedir} - - install -d ${D}${sysconfdir}/default/volatiles - echo "d root root 0755 ${localstatedir}/log/cluster none" > ${D}${sysconfdir}/default/volatiles/05_corosync - - if [ ${@bb.utils.filter('DISTRO_FEATURES','systemd',d)} ]; then - install -d ${D}${sysconfdir}/tmpfiles.d - echo "d ${localstatedir}/log/cluster - - - -" > ${D}${sysconfdir}/tmpfiles.d/corosync.conf - fi -} - -RDEPENDS:${PN} += "bash ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit-pidof', 'procps', d)}" - -FILES:${PN} += "${datadir}/dbus-1" -FILES:${PN}-dbg += "${libexecdir}/lcrso/.debug" -FILES:${PN}-doc += "${datadir}/snmp/mibs/COROSYNC-MIB.txt" -- cgit v1.2.3-54-g00ecf