Files
sox/CVE-2023-32627.patch
Takashi Iwai 2ba3b200ab Accepting request 1120234 from home:tiwai:branches:multimedia:apps
- Apply various fix patches taken from Debian package;
  it fixes also other entries (CVE-2022-31650 bsc#1212060
  CVE-2023-34318 bsc#1212062 CVE-2023-34432 bsc#1212063):
  CVE-2019-13590.patch
  CVE-2021-3643.patch
  CVE-2021-23159.patch
  CVE-2021-33844.patch
  CVE-2021-40426.patch
  CVE-2022-31650.patch
  CVE-2022-31651.patch
- Fix floating point exception in src/voc.c (CVE-2023-32627 bsc#1212061):
  CVE-2023-32627.patch

OBS-URL: https://build.opensuse.org/request/show/1120234
OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/sox?expand=0&rev=45
2023-10-25 11:43:17 +00:00

31 lines
1.1 KiB
Diff

From: =?utf-8?q?Bastien_Roucari=C3=A8s?= <rouca@debian.org>
Date: Sun, 13 Aug 2023 14:14:09 +0000
Subject: CVE-2023-32627 Filter null sampling rate in VOC coder
Avoid a divide by zero and out of bound read by rejecting null sampling rate in VOC file
bug: https://sourceforge.net/p/sox/bugs/369/
bug-redhat: https://bugzilla.redhat.com/show_bug.cgi?id=2212282
bug-debian: https://bugs.debian.org/1041112
bug-debian-security: https://security-tracker.debian.org/tracker/CVE-2023-32627
---
src/voc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/voc.c b/src/voc.c
index f44933d..cad32fa 100644
--- a/src/voc.c
+++ b/src/voc.c
@@ -351,6 +351,11 @@ static size_t read_samples(sox_format_t * ft, sox_sample_t * buf,
v->block_remaining = 0;
return done;
}
+ if(uc == 0) {
+ lsx_fail_errno(ft, EINVAL, "invalid rate value");
+ v->block_remaining = 0;
+ return done;
+ }
*buf = SOX_UNSIGNED_8BIT_TO_SAMPLE(uc,);
lsx_adpcm_init(&v->adpcm, 6 - v->size, SOX_SAMPLE_TO_SIGNED_16BIT(*buf, ft->clips));
++buf;