dmidecode: upgrade to 3.5
PATCH 1/2 dmidecode: upgrade to 3.5
This includes a fix for CVE-2023-30630.
Remove the patch changing prefix and instead pass the paths to the make install command.
Passing -e to make is no longer needed, the Makefile respects variables now.
Signed-off-by Ross Burton <[email protected]>
---
...mitting-changes-from-do_unpack_extra.patch | 25 -------------------
.../{dmidecode_3.4.bb => dmidecode_3.5.bb} | 21 +++++++---------
2 files changed, 9 insertions(+), 37 deletions(-)
delete mode 100644 meta/recipes-devtools/dmidecode/dmidecode/0001-Committing-changes-from-do_unpack_extra.patch
rename meta/recipes-devtools/dmidecode/{dmidecode_3.4.bb => dmidecode_3.5.bb} (50%)meta/recipes-devtools/dmidecode/dmidecode/0001-Committing-changes-from-do_unpack_extra.patch deleted +0 -25
@@ -1,25 +0,0 @@ -From 2c0437f47eaaf565aaccf0c0d150d5fc0fc734f5 Mon Sep 17 00:00:00 2001 -From: OpenEmbedded <oe.patch@oe> -Date: Thu, 22 Nov 2018 12:05:04 +0000 -Subject: [PATCH] Do not install to /usr/local - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin <[email protected]> - ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 7aa729d..e079b18 100644 ---- a/Makefile -+++ b/Makefile -@@ -31,7 +31,7 @@ CFLAGS += -D_FILE_OFFSET_BITS=64 - LDFLAGS ?= - - DESTDIR = --prefix = /usr/local -+prefix = /usr - sbindir = $(prefix)/sbin - mandir = $(prefix)/share/man - man8dir = $(mandir)/man8
meta/recipes-devtools/dmidecode/dmidecode_3.5.bb renamed from meta/recipes-devtools/dmidecode/dmidecode_3.4.bb +9 -12
@@ -4,21 +4,18 @@ DESCRIPTION = "Dmidecode reports information about your system's hardware as des LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" -SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/dmidecode/${BP}.tar.xz \ - file://0001-Committing-changes-from-do_unpack_extra.patch \ - " +SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/dmidecode/${BP}.tar.xz" COMPATIBLE_HOST = "(i.86|x86_64|aarch64|arm|powerpc|powerpc64).*-linux" -EXTRA_OEMAKE = "-e MAKEFLAGS=" - -# The upstream buildsystem uses 'docdir' as the path where it puts AUTHORS, -# README, etc, but we don't want those in the root of our docdir. -docdir .= "/${BPN}" - do_install() { - oe_runmake DESTDIR="${D}" install + oe_runmake \ + DESTDIR="${D}" \ + prefix="${prefix}" \ + sbindir="${sbindir}" \ + docdir="${docdir}/${BPN}" \ + mandir="${mandir}" \ + install } -SRC_URI[sha256sum] = "43cba851d8467c9979ccdbeab192eb6638c7d3a697eba5ddb779da8837542212" - +SRC_URI[sha256sum] = "79d76735ee8e25196e2a722964cf9683f5a09581503537884b256b01389cc073"
Signature · 1 line
2.34.1
PATCH 2/2 connman: backport fix for CVE-2023-28488
Signed-off-by Ross Burton <[email protected]>
--- ...ify-and-sanitize-packet-length-first.patch | 63 +++++++++++++++++++ .../connman/connman_1.41.bb | 1 + 2 files changed, 64 insertions(+) create mode 100644 meta/recipes-connectivity/connman/connman/0001-gdhcp-Verify-and-sanitize-packet-length-first.patch
meta/recipes-connectivity/connman/connman/0001-gdhcp-Verify-and-sanitize-packet-length-first.patch new file +63 -0
@@ -0,0 +1,63 @@ +From 99e2c16ea1cced34a5dc450d76287a1c3e762138 Mon Sep 17 00:00:00 2001 +From: Daniel Wagner <[email protected]> +Date: Tue, 11 Apr 2023 08:12:56 +0200 +Subject: [PATCH] gdhcp: Verify and sanitize packet length first + +Avoid overwriting the read packet length after the initial test. Thus +move all the length checks which depends on the total length first +and do not use the total lenght from the IP packet afterwards. + +Fixes CVE-2023-28488 + +Reported by Polina Smirnova <[email protected]> + +CVE: CVE-2023-28488 +Upstream-Status: Backport +Signed-off-by: Ross Burton <[email protected]> + +--- + gdhcp/client.c | 16 +++++++++------- + 1 file changed, 9 insertions(+), 7 deletions(-) + +diff --git a/gdhcp/client.c b/gdhcp/client.c +index 7efa7e45..82017692 100644 +--- a/gdhcp/client.c ++++ b/gdhcp/client.c +@@ -1319,9 +1319,9 @@ static bool sanity_check(struct ip_udp_dhcp_packet *packet, int bytes) + static int dhcp_recv_l2_packet(struct dhcp_packet *dhcp_pkt, int fd, + struct sockaddr_in *dst_addr) + { +- int bytes; + struct ip_udp_dhcp_packet packet; + uint16_t check; ++ int bytes, tot_len; + + memset(&packet, 0, sizeof(packet)); + +@@ -1329,15 +1329,17 @@ static int dhcp_recv_l2_packet(struct dhcp_packet *dhcp_pkt, int fd, + if (bytes < 0) + return -1; + +- if (bytes < (int) (sizeof(packet.ip) + sizeof(packet.udp))) +- return -1; +- +- if (bytes < ntohs(packet.ip.tot_len)) ++ tot_len = ntohs(packet.ip.tot_len); ++ if (bytes > tot_len) { ++ /* ignore any extra garbage bytes */ ++ bytes = tot_len; ++ } else if (bytes < tot_len) { + /* packet is bigger than sizeof(packet), we did partial read */ + return -1; ++ } + +- /* ignore any extra garbage bytes */ +- bytes = ntohs(packet.ip.tot_len); ++ if (bytes < (int) (sizeof(packet.ip) + sizeof(packet.udp))) ++ return -1; + + if (!sanity_check(&packet, bytes)) + return -1; +-- +2.34.1 +
meta/recipes-connectivity/connman/connman_1.41.bb +1 -0
@@ -8,6 +8,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \ file://CVE-2022-32293_p1.patch \ file://CVE-2022-32293_p2.patch \ file://CVE-2022-32292.patch \ + file://0001-gdhcp-Verify-and-sanitize-packet-length-first.patch \ " SRC_URI:append:libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch"
Signature · 1 line
2.34.1