libmspack: patch CVE-2026-110602

Details:
https://nvd.nist.gov/vuln/detail/cve-2026-110602

Signed-off-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
This commit is contained in:
Ankur Tyagi committed 2026-10-26 23:15:53 +13:00
1 parent f16173e6a4
commit fa4dfa140d
2 files changed
+44 -1

No files matched your search

@@ -0,0 +1,41 @@
From aca3603bed20772fd86ce5b901005668cee835ad Mon Sep 17 00:00:00 2001
From: Stuart Caie <kyzer@cabextract.org.uk>
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 <ankur.tyagi85@gmail.com>
---
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 */
@@ -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