Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:Update
libsndfile-progs
0002-src-flac.c-Fix-a-buffer-read-overflow.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0002-src-flac.c-Fix-a-buffer-read-overflow.patch of Package libsndfile-progs
From ef1dbb2df1c0e741486646de40bd638a9c4cd808 Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo <erikd@mega-nerd.com> Date: Fri, 14 Apr 2017 15:19:16 +1000 Subject: [PATCH] src/flac.c: Fix a buffer read overflow References: CVE-2017-8362 bsc#1036943 A file (generated by a fuzzer) which increased the number of channels from one frame to the next could cause a read beyond the end of the buffer provided by libFLAC. Only option is to abort the read. Closes: https://github.com/erikd/libsndfile/issues/231 --- src/flac.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) --- a/src/flac.c +++ b/src/flac.c @@ -163,6 +163,14 @@ flac_buffer_copy (SF_PRIVATE *psf) const FLAC__int32* const *buffer = pflac->wbuffer ; unsigned i = 0, j, offset ; + if (psf->sf.channels != (int) frame->header.channels) + { psf_log_printf (psf, "Error: FLAC frame changed from %d to %d channels\n" + "Nothing to do but to error out.\n" , + psf->sf.channels, frame->header.channels) ; + psf->error = SFE_FLAC_CHANNEL_COUNT_CHANGED ; + return 0 ; + } ; + /* ** frame->header.blocksize is variable and we're using a constant blocksize ** of FLAC__MAX_BLOCK_SIZE. @@ -407,7 +415,7 @@ sf_flac_meta_callback (const FLAC__Strea { case FLAC__METADATA_TYPE_STREAMINFO : if (psf->sf.channels > 0 && psf->sf.channels != (int) metadata->data.stream_info.channels) { psf_log_printf (psf, "Error: FLAC stream changed from %d to %d channels\n" - "Nothing to be but to error out.\n" , + "Nothing to do but to error out.\n" , psf->sf.channels, metadata->data.stream_info.channels) ; psf->error = SFE_FLAC_CHANNEL_COUNT_CHANGED ; return ;
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