sox: patch CVE-2021-3643 and CVE-2021-23210

Use patch from Debian:
https://salsa.debian.org/lts-team/packages/sox/-/blob/debian/14.4.2+git20190427-1+deb10u3/debian/patches/CVE-2021-3643.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:51 +01:00 committed by Khem Raj
parent afb0d8d2c6
commit d7ba0e6cd9
No known key found for this signature in database
GPG Key ID: BB053355919D3314
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,30 @@
From 5b9a7c0fc7054b4f16a5058eef721470e9adcfcc Mon Sep 17 00:00:00 2001
From: Helmut Grohne <helmut@subdivi.de>
Date: Sun, 16 Mar 2025 21:16:40 +0100
Subject: [PATCH] voc: word width should never be 0 to avoid division by zero
Source: https://salsa.debian.org/lts-team/packages/sox/-/blob/debian/14.4.2+git20190427-1+deb10u3/debian/patches/CVE-2021-3643.patch
CVE: CVE-2021-3643
CVE: CVE-2021-23210
Upstream-Status: Inactive-Upstream [lastrelease: 2015]
Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
src/voc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/voc.c b/src/voc.c
index a75639e9..0ca07f94 100644
--- a/src/voc.c
+++ b/src/voc.c
@@ -625,6 +625,10 @@ static int getblock(sox_format_t * ft)
v->rate = new_rate_32;
ft->signal.rate = new_rate_32;
lsx_readb(ft, &uc);
+ if (uc <= 1) {
+ lsx_fail_errno(ft, SOX_EFMT, "2 bits per word required");
+ return (SOX_EOF);
+ }
v->size = uc;
lsx_readb(ft, &uc);
if (v->channels != -1 && uc != v->channels) {

View File

@ -29,6 +29,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 \
"
# last release was in 2015, use latest hash from 2024-05-30