From 84f7aaaf11e6bb59f99ffee9d9a0d0e2107dec17 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 15 Mar 2025 07:13:41 +0000 Subject: ofono: upgrade 2.14 -> 2.15 (From OE-Core rev: d2eb70c70a5632edc6fe118aae3f3c8a816ac8ba) Signed-off-by: Richard Purdie --- .../ofono/ofono/CVE-2024-7539.patch | 88 ---------------------- ...CVE-2024-7540_CVE-2024-7541_CVE-2024-7542.patch | 52 ------------- meta/recipes-connectivity/ofono/ofono/rmnet.patch | 45 ----------- meta/recipes-connectivity/ofono/ofono_2.14.bb | 51 ------------- meta/recipes-connectivity/ofono/ofono_2.15.bb | 47 ++++++++++++ 5 files changed, 47 insertions(+), 236 deletions(-) delete mode 100644 meta/recipes-connectivity/ofono/ofono/CVE-2024-7539.patch delete mode 100644 meta/recipes-connectivity/ofono/ofono/CVE-2024-7540_CVE-2024-7541_CVE-2024-7542.patch delete mode 100644 meta/recipes-connectivity/ofono/ofono/rmnet.patch delete mode 100644 meta/recipes-connectivity/ofono/ofono_2.14.bb create mode 100644 meta/recipes-connectivity/ofono/ofono_2.15.bb (limited to 'meta') diff --git a/meta/recipes-connectivity/ofono/ofono/CVE-2024-7539.patch b/meta/recipes-connectivity/ofono/ofono/CVE-2024-7539.patch deleted file mode 100644 index e41596959b..0000000000 --- a/meta/recipes-connectivity/ofono/ofono/CVE-2024-7539.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 389e2344f86319265fb72ae590b470716e038fdc Mon Sep 17 00:00:00 2001 -From: Sicelo A. Mhlongo -Date: Tue, 17 Dec 2024 11:31:29 +0200 -Subject: [PATCH] ussd: ensure ussd content fits in buffers - -Fixes: CVE-2024-7539 - -CVE: CVE-2024-7539 -Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/ofono/ofono.git/commit/?id=389e2344f86319265fb72ae590b470716e038fdc] - -Signed-off-by: Yogita Urade ---- - drivers/atmodem/ussd.c | 5 ++++- - drivers/huaweimodem/ussd.c | 5 ++++- - drivers/speedupmodem/ussd.c | 5 ++++- - 3 files changed, 12 insertions(+), 3 deletions(-) - -diff --git a/drivers/atmodem/ussd.c b/drivers/atmodem/ussd.c -index 32a9fe9..99da559 100644 ---- a/drivers/atmodem/ussd.c -+++ b/drivers/atmodem/ussd.c -@@ -93,7 +93,7 @@ static void cusd_parse(GAtResult *result, struct ofono_ussd *ussd) - const char *content; - int dcs; - enum sms_charset charset; -- unsigned char msg[160]; -+ unsigned char msg[160] = {0}; - const unsigned char *msg_ptr = NULL; - long msg_len; - -@@ -113,6 +113,9 @@ static void cusd_parse(GAtResult *result, struct ofono_ussd *ussd) - if (!g_at_result_iter_next_number(&iter, &dcs)) - dcs = 0; - -+ if (strlen(content) > sizeof(msg) * 2) -+ goto out; -+ - if (!cbs_dcs_decode(dcs, NULL, NULL, &charset, NULL, NULL, NULL)) { - ofono_error("Unsupported USSD data coding scheme (%02x)", dcs); - status = 4; /* Not supported */ -diff --git a/drivers/huaweimodem/ussd.c b/drivers/huaweimodem/ussd.c -index 5e1c907..3d165c8 100644 ---- a/drivers/huaweimodem/ussd.c -+++ b/drivers/huaweimodem/ussd.c -@@ -38,7 +38,7 @@ static void cusd_parse(GAtResult *result, struct ofono_ussd *ussd) - int status; - int dcs = 0; - const char *content; -- unsigned char msg[160]; -+ unsigned char msg[160] = {0}; - const unsigned char *msg_ptr = NULL; - long msg_len; - -@@ -55,6 +55,9 @@ static void cusd_parse(GAtResult *result, struct ofono_ussd *ussd) - - g_at_result_iter_next_number(&iter, &dcs); - -+ if (strlen(content) > sizeof(msg) * 2) -+ goto out; -+ - msg_ptr = decode_hex_own_buf(content, -1, &msg_len, 0, msg); - - out: -diff --git a/drivers/speedupmodem/ussd.c b/drivers/speedupmodem/ussd.c -index aafa4bc..a5efde0 100644 ---- a/drivers/speedupmodem/ussd.c -+++ b/drivers/speedupmodem/ussd.c -@@ -37,7 +37,7 @@ static void cusd_parse(GAtResult *result, struct ofono_ussd *ussd) - int status; - int dcs = 0; - const char *content; -- unsigned char msg[160]; -+ unsigned char msg[160] = {0}; - const unsigned char *msg_ptr = NULL; - long msg_len; - -@@ -54,6 +54,9 @@ static void cusd_parse(GAtResult *result, struct ofono_ussd *ussd) - - g_at_result_iter_next_number(&iter, &dcs); - -+ if (strlen(content) > sizeof(msg) * 2) -+ goto out; -+ - msg_ptr = decode_hex_own_buf(content, -1, &msg_len, 0, msg); - - out: --- -2.40.0 diff --git a/meta/recipes-connectivity/ofono/ofono/CVE-2024-7540_CVE-2024-7541_CVE-2024-7542.patch b/meta/recipes-connectivity/ofono/ofono/CVE-2024-7540_CVE-2024-7541_CVE-2024-7542.patch deleted file mode 100644 index fd97d4b51b..0000000000 --- a/meta/recipes-connectivity/ofono/ofono/CVE-2024-7540_CVE-2024-7541_CVE-2024-7542.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 29ff6334b492504ace101be748b256e6953d2c2f Mon Sep 17 00:00:00 2001 -From: "Sicelo A. Mhlongo" -Date: Tue, 17 Dec 2024 11:31:28 +0200 -Subject: [PATCH] atmodem: sms: ensure buffer is initialized before use - -Fixes: CVE-2024-7540 -Fixes: CVE-2024-7541 -Fixes: CVE-2024-7542 - -CVE: CVE-2024-7540 -CVE: CVE-2024-7541 -CVE: CVE-2024-7542 -Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/ofono/ofono.git/commit/?id=29ff6334b492504ace101be748b256e6953d2c2f] -Signed-off-by: Peter Marko ---- - drivers/atmodem/sms.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/drivers/atmodem/sms.c b/drivers/atmodem/sms.c -index d994856b..0668c631 100644 ---- a/drivers/atmodem/sms.c -+++ b/drivers/atmodem/sms.c -@@ -399,7 +399,7 @@ static void at_cmt_notify(GAtResult *result, gpointer user_data) - struct sms_data *data = ofono_sms_get_data(sms); - GAtResultIter iter; - const char *hexpdu; -- unsigned char pdu[176]; -+ unsigned char pdu[176] = {0}; - long pdu_len; - int tpdu_len; - -@@ -466,7 +466,7 @@ static void at_cmgr_notify(GAtResult *result, gpointer user_data) - struct sms_data *data = ofono_sms_get_data(sms); - GAtResultIter iter; - const char *hexpdu; -- unsigned char pdu[176]; -+ unsigned char pdu[176] = {0}; - long pdu_len; - int tpdu_len; - -@@ -648,7 +648,7 @@ static void at_cmgl_notify(GAtResult *result, gpointer user_data) - struct sms_data *data = ofono_sms_get_data(sms); - GAtResultIter iter; - const char *hexpdu; -- unsigned char pdu[176]; -+ unsigned char pdu[176] = {0}; - long pdu_len; - int tpdu_len; - int index; --- -2.30.2 - diff --git a/meta/recipes-connectivity/ofono/ofono/rmnet.patch b/meta/recipes-connectivity/ofono/ofono/rmnet.patch deleted file mode 100644 index 11dfd5db18..0000000000 --- a/meta/recipes-connectivity/ofono/ofono/rmnet.patch +++ /dev/null @@ -1,45 +0,0 @@ -From git@z Thu Jan 1 00:00:00 1970 -Subject: [PATCH] rmnet: Handle toolchains with old kernel headers -From: Richard Purdie -Date: Thu, 19 Dec 2024 13:47:15 +0000 -Message-Id: -MIME-Version: 1.0 -Content-Type: text/plain; charset="utf-8" -Content-Transfer-Encoding: 7bit - -The RMNET_FLAGS_*GRESS_MAP_CKSUMV5 defines were added to the kernel in -5.14[1] and some toolchains use older headers, so add fallback defines -in case they are needed. - -[1] linux b6e5d27e32ef6089d316ce7e1ecaf595584d4b84 - -Upstream-Status: Submitted [https://lore.kernel.org/ofono/e2b6a94dd9a3789e31dafadfc70c53b565d1db04.camel@linuxfoundation.org/T/#u] -Signed-off-by: Ross Burton ---- - src/rmnet.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/src/rmnet.c b/src/rmnet.c -index 42b03249..9a7f52fb 100644 ---- a/src/rmnet.c -+++ b/src/rmnet.c -@@ -27,6 +27,16 @@ - #define MAX_MUX_IDS 254U - #define DEFAULT_MTU 1400U - -+/* -+ * These were added in 5.14 so define them here if the toolchain's kernel headers are old. -+ */ -+#ifndef RMNET_FLAGS_INGRESS_MAP_CKSUMV5 -+#define RMNET_FLAGS_INGRESS_MAP_CKSUMV5 (1U << 4) -+#endif -+#ifndef RMNET_FLAGS_EGRESS_MAP_CKSUMV5 -+#define RMNET_FLAGS_EGRESS_MAP_CKSUMV5 (1U << 5) -+#endif -+ - struct rmnet_request { - uint32_t parent_ifindex; - rmnet_new_interfaces_func_t new_cb; --- -2.43.0 - diff --git a/meta/recipes-connectivity/ofono/ofono_2.14.bb b/meta/recipes-connectivity/ofono/ofono_2.14.bb deleted file mode 100644 index 9a91afaa7b..0000000000 --- a/meta/recipes-connectivity/ofono/ofono_2.14.bb +++ /dev/null @@ -1,51 +0,0 @@ -SUMMARY = "open source telephony" -DESCRIPTION = "oFono is a stack for mobile telephony devices on Linux. oFono supports speaking to telephony devices through specific drivers, or with generic AT commands." -HOMEPAGE = "http://www.ofono.org" -BUGTRACKER = "https://01.org/jira/browse/OF" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ - file://src/ofono.h;beginline=1;endline=6;md5=13e42133935ceecfc9bcb547f256e277" -DEPENDS = "dbus glib-2.0 udev mobile-broadband-provider-info ell" - -SRC_URI = "\ - ${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \ - file://rmnet.patch \ - file://ofono \ - file://CVE-2024-7539.patch \ - file://CVE-2024-7540_CVE-2024-7541_CVE-2024-7542.patch \ -" -SRC_URI[sha256sum] = "983cbfd5e1e1a410ba7ad2db7f50fadc91e50b29f1ede40cdc73f941da7ba95f" - -inherit autotools pkgconfig update-rc.d systemd gobject-introspection-data - -INITSCRIPT_NAME = "ofono" -INITSCRIPT_PARAMS = "defaults 22" -SYSTEMD_SERVICE:${PN} = "ofono.service" - -PACKAGECONFIG ??= "\ - ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ -" -PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_system_unitdir}/,--with-systemdunitdir=" -PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5" - -EXTRA_OECONF += "--enable-test --enable-external-ell" - -do_install:append() { - install -d ${D}${sysconfdir}/init.d/ - install -m 0755 ${UNPACKDIR}/ofono ${D}${sysconfdir}/init.d/ofono -} - -PACKAGES =+ "${PN}-tests" - -FILES:${PN} += "${systemd_unitdir}" -FILES:${PN}-tests = "${libdir}/${BPN}/test" - -RDEPENDS:${PN} += "dbus" -RDEPENDS:${PN}-tests = "\ - python3-core \ - python3-dbus \ - ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'python3-pygobject', '', d)} \ -" - -RRECOMMENDS:${PN} += "kernel-module-tun mobile-broadband-provider-info" diff --git a/meta/recipes-connectivity/ofono/ofono_2.15.bb b/meta/recipes-connectivity/ofono/ofono_2.15.bb new file mode 100644 index 0000000000..40eeb3a086 --- /dev/null +++ b/meta/recipes-connectivity/ofono/ofono_2.15.bb @@ -0,0 +1,47 @@ +SUMMARY = "open source telephony" +DESCRIPTION = "oFono is a stack for mobile telephony devices on Linux. oFono supports speaking to telephony devices through specific drivers, or with generic AT commands." +HOMEPAGE = "http://www.ofono.org" +BUGTRACKER = "https://01.org/jira/browse/OF" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ + file://src/ofono.h;beginline=1;endline=6;md5=13e42133935ceecfc9bcb547f256e277" +DEPENDS = "dbus glib-2.0 udev mobile-broadband-provider-info ell" + +SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \ + file://ofono \ + " +SRC_URI[sha256sum] = "1af93ab72a70502452fe3d0297a6eaea13750cacae1fff3b643dd2245a6408ca" + +inherit autotools pkgconfig update-rc.d systemd gobject-introspection-data + +INITSCRIPT_NAME = "ofono" +INITSCRIPT_PARAMS = "defaults 22" +SYSTEMD_SERVICE:${PN} = "ofono.service" + +PACKAGECONFIG ??= "\ + ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ +" +PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_system_unitdir}/,--with-systemdunitdir=" +PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5" + +EXTRA_OECONF += "--enable-test --enable-external-ell" + +do_install:append() { + install -d ${D}${sysconfdir}/init.d/ + install -m 0755 ${UNPACKDIR}/ofono ${D}${sysconfdir}/init.d/ofono +} + +PACKAGES =+ "${PN}-tests" + +FILES:${PN} += "${systemd_unitdir}" +FILES:${PN}-tests = "${libdir}/${BPN}/test" + +RDEPENDS:${PN} += "dbus" +RDEPENDS:${PN}-tests = "\ + python3-core \ + python3-dbus \ + ${@bb.utils.contains('GI_DATA_ENABLED', 'True', 'python3-pygobject', '', d)} \ +" + +RRECOMMENDS:${PN} += "kernel-module-tun mobile-broadband-provider-info" -- cgit v1.2.3-54-g00ecf