CVE-2017-14633: Don't allow for more than 256 channels
authorGuido Günther <agx@sigxcpu.org>
Tue, 31 Oct 2017 17:32:46 +0000 (18:32 +0100)
committerThomas Daede <daede003@umn.edu>
Mon, 11 Dec 2017 08:11:28 +0000 (00:11 -0800)
Otherwise

 for(i=0;i<vi->channels;i++){
      /* the encoder setup assumes that all the modes used by any
         specific bitrate tweaking use the same floor */
      int submap=info->chmuxlist[i];

overreads later in mapping0_forward since chmuxlist is a fixed array of
256 elements max.

lib/info.c

index fe759ed..7bc4ea4 100644 (file)
@@ -588,7 +588,7 @@ int vorbis_analysis_headerout(vorbis_dsp_state *v,
   oggpack_buffer opb;
   private_state *b=v->backend_state;
 
-  if(!b||vi->channels<=0){
+  if(!b||vi->channels<=0||vi->channels>256){
     ret=OV_EFAULT;
     goto err_out;
   }