sox: patch CVE-2021-23159 and CVE-2021-2317

Use patch from Debian:
https://salsa.debian.org/lts-team/packages/sox/-/blob/debian/14.4.2+git20190427-1+deb10u3/debian/patches/CVE-2021-23159.patch

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Peter Marko 2025-03-16 23:53:52 +01:00 committed by Khem Raj
parent d7ba0e6cd9
commit 777186c4fb
No known key found for this signature in database
GPG Key ID: BB053355919D3314
2 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,31 @@
From 8eb3afb37f80d7231a998e3074e6fc5f7bdfe4d5 Mon Sep 17 00:00:00 2001
From: Helmut Grohne <helmut@subdivi.de>
Date: Sun, 16 Mar 2025 20:28:15 +0100
Subject: [PATCH] hcom: validate dictsize
Source: https://salsa.debian.org/lts-team/packages/sox/-/blob/debian/14.4.2+git20190427-1+deb10u3/debian/patches/CVE-2021-23159.patch
CVE: CVE-2021-23159
CVE: CVE-2021-23172
Upstream-Status: Inactive-Upstream [lastrelease: 2015]
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
src/hcom.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/hcom.c b/src/hcom.c
index 594c8706..9e8b03c6 100644
--- a/src/hcom.c
+++ b/src/hcom.c
@@ -141,6 +141,11 @@ static int startread(sox_format_t * ft)
return (SOX_EOF);
}
lsx_readw(ft, &dictsize);
+ if (dictsize == 0 || dictsize > 511)
+ {
+ lsx_fail_errno(ft, SOX_EHDR, "Implausible dictionary size in HCOM header");
+ return SOX_EOF;
+ }
/* Translate to sox parameters */
ft->encoding.encoding = SOX_ENCODING_HCOM;

View File

@ -30,6 +30,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=751419260aa954499f7abaabaa882bbe \
SRC_URI = "git://git.code.sf.net/p/sox/code;protocol=https;branch=master \
file://0001-remove-the-error-line-and-live-without-file-type-det.patch \
file://CVE-2021-3643_CVE-2021-23210.patch \
file://CVE-2021-23159_CVE-2021-2317.patch \
"
# last release was in 2015, use latest hash from 2024-05-30