diff options
Diffstat (limited to 'media-gfx/ufraw/files')
-rw-r--r-- | media-gfx/ufraw/files/ufraw-0.22-CVE-2015-8366.patch | 17 | ||||
-rw-r--r-- | media-gfx/ufraw/files/ufraw-0.22-CVE-2018-19655.patch | 44 | ||||
-rw-r--r-- | media-gfx/ufraw/files/ufraw-0.22-exiv2-0.27.patch | 9 | ||||
-rw-r--r-- | media-gfx/ufraw/files/ufraw-0.22-gcc9.patch | 97 |
4 files changed, 163 insertions, 4 deletions
diff --git a/media-gfx/ufraw/files/ufraw-0.22-CVE-2015-8366.patch b/media-gfx/ufraw/files/ufraw-0.22-CVE-2015-8366.patch new file mode 100644 index 000000000000..9d59ca413fbe --- /dev/null +++ b/media-gfx/ufraw/files/ufraw-0.22-CVE-2015-8366.patch @@ -0,0 +1,17 @@ +Fix a buffer overflow bug. See +https://github.com/LibRaw/LibRaw/commit/89d065424f09b788f443734d44857289489ca9e2 + +--- a/dcraw.cc ++++ b/dcraw.cc +@@ -3013,7 +3013,10 @@ + diff = diff ? -diff : 0x80; + if (ftell(ifp) + 12 >= (int) seg[1][1]) + diff = 0; +- raw_image[pix] = pred[pix & 1] += diff; ++ if(pix>=raw_width*raw_height) ++ derror(); ++ else ++ raw_image[pix] = pred[pix & 1] += diff; + if (!(pix & 1) && HOLE(pix / raw_width)) pix += 2; + } + maximum = 0xff; diff --git a/media-gfx/ufraw/files/ufraw-0.22-CVE-2018-19655.patch b/media-gfx/ufraw/files/ufraw-0.22-CVE-2018-19655.patch new file mode 100644 index 000000000000..78b46b4452e0 --- /dev/null +++ b/media-gfx/ufraw/files/ufraw-0.22-CVE-2018-19655.patch @@ -0,0 +1,44 @@ +Description: stack-based buffer overflow bug +Bug-Debian: https://bugs.debian.org/890086 +Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2018-19655 +Author: Filip Hroch <hroch@physics.muni.cz> +Reviewed-by: Salvatore Bonaccorso <carnil@debian.org> +Last-Update: 2018-12-02 + +--- a/dcraw.cc ++++ b/dcraw.cc +@@ -8505,9 +8505,15 @@ float CLASS find_green (int bps, int bit + { + UINT64 bitbuf=0; + int vbits, col, i, c; +- ushort img[2][2064]; ++ ushort *img; + double sum[]={0,0}; + ++#define IMG2D(row,col) \ ++ img[(row)*width+(col)] ++ ++ img = (ushort *) malloc(2*width*sizeof(ushort)); ++ merror (img, "find_green()"); ++ + FORC(2) { + fseek (ifp, c ? off1:off0, SEEK_SET); + for (vbits=col=0; col < width; col++) { +@@ -8516,13 +8522,14 @@ float CLASS find_green (int bps, int bit + for (i=0; i < bite; i+=8) + bitbuf |= (unsigned) (fgetc(ifp) << i); + } +- img[c][col] = bitbuf << (64-bps-vbits) >> (64-bps); ++ IMG2D(c,col) = bitbuf << (64-bps-vbits) >> (64-bps); + } + } + FORC(width-1) { +- sum[ c & 1] += ABS(img[0][c]-img[1][c+1]); +- sum[~c & 1] += ABS(img[1][c]-img[0][c+1]); ++ sum[ c & 1] += ABS(IMG2D(0,c)-IMG2D(1,c+1)); ++ sum[~c & 1] += ABS(IMG2D(1,c)-IMG2D(0,c+1)); + } ++ free(img); + return 100 * log(sum[0]/sum[1]); + } + diff --git a/media-gfx/ufraw/files/ufraw-0.22-exiv2-0.27.patch b/media-gfx/ufraw/files/ufraw-0.22-exiv2-0.27.patch index b5b4140fff8e..2cd888ebc096 100644 --- a/media-gfx/ufraw/files/ufraw-0.22-exiv2-0.27.patch +++ b/media-gfx/ufraw/files/ufraw-0.22-exiv2-0.27.patch @@ -1,6 +1,6 @@ ---- a/ufraw_exiv2.cc 2015-06-16 05:58:38.000000000 +0200 -+++ b/ufraw_exiv2.cc 2018-12-29 22:51:23.291894430 +0100 -@@ -15,9 +15,7 @@ +--- a/ufraw_exiv2.cc ++++ b/ufraw_exiv2.cc +@@ -15,9 +15,8 @@ #include "ufraw.h" #ifdef HAVE_EXIV2 @@ -8,10 +8,11 @@ -#include <exiv2/easyaccess.hpp> -#include <exiv2/exif.hpp> +#include <exiv2/exiv2.hpp> ++#include <iostream> #include <sstream> #include <cassert> -@@ -67,7 +65,11 @@ +@@ -67,7 +66,11 @@ extern "C" int ufraw_exif_read_input(ufraw_data *uf) if (exifData.empty()) { std::string error(uf->filename); error += ": No Exif data found in the file"; diff --git a/media-gfx/ufraw/files/ufraw-0.22-gcc9.patch b/media-gfx/ufraw/files/ufraw-0.22-gcc9.patch new file mode 100644 index 000000000000..f2cf1dc88a86 --- /dev/null +++ b/media-gfx/ufraw/files/ufraw-0.22-gcc9.patch @@ -0,0 +1,97 @@ +From ac8c74699cba65d65f918b3f4cba2de64e039ada Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= <sergio@serjux.com> +Date: Thu, 14 Feb 2019 03:26:02 +0000 +Subject: [PATCH] Fix GCC 9 OpenMP issues by drop default(none) + +--- + dcraw_api.cc | 4 ++-- + dcraw_indi.c | 4 ---- + ufraw_ufraw.c | 6 +++--- + 3 files changed, 5 insertions(+), 9 deletions(-) + +diff --git a/dcraw_api.cc b/dcraw_api.cc +index c3d2902..6096cb7 100644 +--- a/dcraw_api.cc ++++ b/dcraw_api.cc +@@ -686,7 +686,7 @@ extern "C" { + rgbWB[3] = rgbWB[1]; + if (dark) { + #ifdef _OPENMP +- #pragma omp parallel for schedule(static) default(none) \ ++ #pragma omp parallel for schedule(static) \ + shared(h,dark,rgbWB) + #endif + for (int i = 0; i < pixels; i++) { +@@ -699,7 +699,7 @@ extern "C" { + } + } else { + #ifdef _OPENMP +- #pragma omp parallel for schedule(static) default(none) \ ++ #pragma omp parallel for schedule(static) \ + shared(h,dark,rgbWB) + #endif + for (int i = 0; i < pixels; i++) { +diff --git a/dcraw_indi.c b/dcraw_indi.c +index a291af2..777ce39 100644 +--- a/dcraw_indi.c ++++ b/dcraw_indi.c +@@ -137,12 +137,10 @@ void CLASS wavelet_denoise_INDI(ushort(*image)[4], const int black, + #ifdef _OPENMP + #if defined(__sun) && !defined(__GNUC__) /* Fix bug #3205673 - NKBJ */ + #pragma omp parallel for \ +- default(none) \ + shared(nc,image,size,noise) \ + private(c,i,hpass,lev,lpass,row,col,thold,fimg,temp) + #else + #pragma omp parallel for \ +- default(none) \ + shared(nc,image,size) \ + private(c,i,hpass,lev,lpass,row,col,thold,fimg,temp) + #endif +@@ -413,7 +411,6 @@ void CLASS vng_interpolate_INDI(ushort(*image)[4], const unsigned filters, + progress(PROGRESS_INTERPOLATE, -height); + #ifdef _OPENMP + #pragma omp parallel \ +- default(none) \ + shared(image,code,prow,pcol,h) \ + private(row,col,g,brow,rowtmp,pix,ip,gval,diff,gmin,gmax,thold,sum,color,num,c,t) + #endif +@@ -496,7 +493,6 @@ void CLASS ppg_interpolate_INDI(ushort(*image)[4], const unsigned filters, + + #ifdef _OPENMP + #pragma omp parallel \ +- default(none) \ + shared(image,dir,diff) \ + private(row,col,i,d,c,pix,guess) + #endif +diff --git a/ufraw_ufraw.c b/ufraw_ufraw.c +index ce9d262..48a0d91 100644 +--- a/ufraw_ufraw.c ++++ b/ufraw_ufraw.c +@@ -1043,7 +1043,7 @@ static void ufraw_shave_hotpixels(ufraw_data *uf, dcraw_image_type *img, + delta = rgbMax / (uf->conf->hotpixel + 1.0); + count = 0; + #ifdef _OPENMP +- #pragma omp parallel for schedule(static) default(none) \ ++ #pragma omp parallel for schedule(static) \ + shared(uf,img,width,height,colors,rgbMax,delta) \ + reduction(+:count) \ + private(h,p,w,c,t,v,hi,i) +@@ -1365,7 +1365,7 @@ static void ufraw_convert_reverse_wb(ufraw_data *uf, UFRawPhase phase) + mul[i] = (guint64)0x10000 * 0x10000 / uf->developer->rgbWB[i]; + size = img->height * img->width; + #ifdef _OPENMP +- #pragma omp parallel for schedule(static) default(none) \ ++ #pragma omp parallel for schedule(static) \ + shared(uf,phase,img,mul,size) \ + private(i,p16,c,px) + #endif +@@ -1390,7 +1390,7 @@ static void ufraw_convert_image_tca(ufraw_data *uf, ufraw_image_data *img, + return; + int y; + #ifdef _OPENMP +- #pragma omp parallel for schedule(static) default(none) \ ++ #pragma omp parallel for schedule(static) \ + shared(uf,img,outimg,area) + #endif + for (y = area->y; y < area->y + area->height; y++) { |