Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP6:Update
sox
CVE-2022-31650.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File CVE-2022-31650.patch of Package sox
From: Helmut Grohne <helmut@subdivi.de> Subject: formats+aiff: reject implausibly large number of channels Bug: https://sourceforge.net/p/sox/bugs/360/ Bug-Debian: https://bugs.debian.org/1012516 --- a/src/formats_i.c +++ b/src/formats_i.c @@ -19,6 +19,7 @@ */ #include "sox_i.h" +#include <limits.h> #include <string.h> #include <sys/stat.h> #include <stdarg.h> @@ -60,9 +61,14 @@ if (ft->seekable) ft->data_start = lsx_tell(ft); - if (channels && ft->signal.channels && ft->signal.channels != channels) + if (channels && ft->signal.channels && ft->signal.channels != channels) { lsx_warn("`%s': overriding number of channels", ft->filename); - else ft->signal.channels = channels; + } else if (channels > SHRT_MAX) { + lsx_fail_errno(ft, EINVAL, "implausibly large number of channels"); + return SOX_EOF; + } else { + ft->signal.channels = channels; + } if (rate && ft->signal.rate && ft->signal.rate != rate) lsx_warn("`%s': overriding sample rate", ft->filename); --- sox-14.4.2+git20190427.orig/src/aiff.c +++ sox-14.4.2+git20190427/src/aiff.c @@ -609,6 +609,11 @@ At 48 kHz, 16 bits stereo, this gives ~3 hours of audio. Sorry, the AIFF format does not provide for an indefinite number of samples. */ + if (ft->signal.channels >= (0x7f000000 / (ft->encoding.bits_per_sample >> 3))) + { + lsx_fail_errno(ft, SOX_EOF, "too many channels for AIFF header"); + return SOX_EOF; + } return(aiffwriteheader(ft, (uint64_t) 0x7f000000 / ((ft->encoding.bits_per_sample>>3)*ft->signal.channels))); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor