From fa4dfa140df960c21a0d10a7a111c678831d9df5 Mon Sep 17 00:00:00 2001 From: Ankur Tyagi Date: Sat, 24 Oct 2026 00:13:24 +1300 Subject: [PATCH] libmspack: patch CVE-2026-110602 Details: https://nvd.nist.gov/vuln/detail/cve-2026-110602 Signed-off-by: Ankur Tyagi --- .../libmspack/CVE-2026-110602.patch | 41 +++++++++++++++++++ .../cabextract/libmspack_0.11alpha.bb | 4 +- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-support/cabextract/libmspack/CVE-2026-110602.patch diff --git a/meta-oe/recipes-support/cabextract/libmspack/CVE-2026-110602.patch b/meta-oe/recipes-support/cabextract/libmspack/CVE-2026-110602.patch new file mode 100644 index 0000000000..15d690945f --- /dev/null +++ b/meta-oe/recipes-support/cabextract/libmspack/CVE-2026-110602.patch @@ -0,0 +1,41 @@ +From aca3603bed20772fd86ce5b901005668cee835ad Mon Sep 17 00:00:00 2001 +From: Stuart Caie +Date: Mon, 15 Jun 2026 16:33:33 +0000 +Subject: [PATCH] kwajd_read_headers(): initialise pointers before returning + any error + +CVE: CVE-2026-110602 +Upstream-Status: Backport [https://github.com/kyz/libmspack/commit/4d868504114346aa767d435fbb89a8b76603493f] + +Dropped changes for test and ChangeLog file. + +Signed-off-by: Ankur Tyagi +--- + mspack/kwajd.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/mspack/kwajd.c b/mspack/kwajd.c +index 30caa89..ede91dd 100644 +--- a/mspack/kwajd.c ++++ b/mspack/kwajd.c +@@ -160,6 +160,11 @@ static int kwajd_read_headers(struct mspack_system *sys, + unsigned char buf[16]; + int i; + ++ ++ /* initialise pointers */ ++ hdr->filename = NULL; ++ hdr->extra = NULL; ++ + /* read in the header */ + if (sys->read(fh, &buf[0], kwajh_SIZEOF) != kwajh_SIZEOF) { + return MSPACK_ERR_READ; +@@ -177,8 +182,6 @@ static int kwajd_read_headers(struct mspack_system *sys, + hdr->data_offset = EndGetI16(&buf[kwajh_DataOffset]); + hdr->headers = EndGetI16(&buf[kwajh_Flags]); + hdr->length = 0; +- hdr->filename = NULL; +- hdr->extra = NULL; + hdr->extra_length = 0; + + /* optional headers */ diff --git a/meta-oe/recipes-support/cabextract/libmspack_0.11alpha.bb b/meta-oe/recipes-support/cabextract/libmspack_0.11alpha.bb index 169a5f271b..c612e54e17 100644 --- a/meta-oe/recipes-support/cabextract/libmspack_0.11alpha.bb +++ b/meta-oe/recipes-support/cabextract/libmspack_0.11alpha.bb @@ -8,7 +8,9 @@ LICENSE = "LGPL-2.1-only" LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=7fbc338309ac38fefcd64b04bb903e34" -SRC_URI = "https://www.cabextract.org.uk/libmspack/libmspack-${PV}.tar.gz" +SRC_URI = "https://www.cabextract.org.uk/libmspack/libmspack-${PV}.tar.gz \ + file://CVE-2026-110602.patch \ +" SRC_URI[sha256sum] = "70dd1fb2f0aecc36791b71a1e1840e62173079eadaa081192d1c323a0eeea21b" inherit autotools