diff -u ffmpeg-debian-0.svn20080206/debian/rules ffmpeg-debian-0.svn20080206/debian/rules --- ffmpeg-debian-0.svn20080206/debian/rules +++ ffmpeg-debian-0.svn20080206/debian/rules @@ -95,6 +95,11 @@ binary-indep: build-doxy install +define call_dh_makeshlibs + dh_makeshlibs -p $(1)$(2) \ + -V "$(1)$(2) (>= $(SRC_VERSION)-8) | $(1)-unstripped-$(2) (>= $(SRC_VERSION)-8)" +endef + binary-arch: build install dh_testdir dh_testroot @@ -108,7 +113,13 @@ dh_strip --dbg-package=ffmpeg-dbg dh_compress dh_fixperms - dh_makeshlibs -V +# NB: The following is pretty whitespace sensitive + $(call call_dh_makeshlibs,libavutil,49) + $(call call_dh_makeshlibs,libavcodec,51) + $(call call_dh_makeshlibs,libavdevice,52) + $(call call_dh_makeshlibs,libpostproc,51) + $(call call_dh_makeshlibs,libavformat,52) + $(call call_dh_makeshlibs,libswscale,0) dh_installdeb dh_shlibdeps dh_gencontrol -- -Vlib1394-dev="$(lib1394-dev)" diff -u ffmpeg-debian-0.svn20080206/debian/changelog ffmpeg-debian-0.svn20080206/debian/changelog --- ffmpeg-debian-0.svn20080206/debian/changelog +++ ffmpeg-debian-0.svn20080206/debian/changelog @@ -1,3 +1,23 @@ +ffmpeg-debian (0.svn20080206-10) unstable; urgency=high + + * enable mmx and sse3 in builds. These CPU features are autodetected + at runtime on amd64 and i386 using the 'cpuid' instrcution. + (Closes: #489732) + * disable support for liba52-dev. ffmpeg has its own implementation. + * don't add -fPIC -DPIC forcefully to ./configure. upstream claim that + the configure script gets this right on all architectures itself. + * Add patch 020_bug489965_bufferoverflow_str_demuxer.diff. Fixes a + buffer overflow in the STR demuxer. Thanks to Moritz Muehlenhoff for + reporting the issue. (Closes: #489965) + * Raising severity to high because of security issue. + * rework the shlibs file. Make applications linking against libraries + produced by this source package generate an alternate dependency on + the 'unstripped' variants of this package. They actually do not exist + yet at this point, but this way reverse dependencies are enabled to + use them when they eventually appear. + + -- Reinhard Tartler Wed, 09 Jul 2008 14:04:06 +0200 + ffmpeg-debian (0.svn20080206-9) unstable; urgency=low [ Reinhard Tartler ] diff -u ffmpeg-debian-0.svn20080206/debian/README.Debian ffmpeg-debian-0.svn20080206/debian/README.Debian --- ffmpeg-debian-0.svn20080206/debian/README.Debian +++ ffmpeg-debian-0.svn20080206/debian/README.Debian @@ -90,9 +90,10 @@ 'multiverse' (ubuntu) component will be named as above without the '-stripped-' marker in the name. - * Only Until the next SONAME bump happens: an unstripped replacement package - for the stripped 'libavcodec51' will can provided e.g. in ubuntu multiverse - with the name 'libavcodec-unstripped-51'. + * Only until the next SONAME bump happens: an unstripped replacement package + for the stripped 'libavcodec51' can provided e.g. in ubuntu multiverse with + the name 'libavcodec-unstripped-51'. This is implemented by generating an + shlibs file containing an alternative depedency. * Ubuntu will track the ffmpeg packages in Debian and tries to minimize the diff for maintenance reason. diff -u ffmpeg-debian-0.svn20080206/debian/control ffmpeg-debian-0.svn20080206/debian/control --- ffmpeg-debian-0.svn20080206/debian/control +++ ffmpeg-debian-0.svn20080206/debian/control @@ -8,7 +8,6 @@ Fabian Greffrath Build-Depends: debhelper (>= 5.0.0), doxygen, - liba52-0.7.4-dev | liba52-dev, libdc1394-22-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386] | libdc1394-13-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386], libfaad-dev | libfaad2-dev, libfreetype6-dev, @@ -168,7 +167,6 @@ Architecture: any Depends: libavcodec51 (= ${binary:Version}), libavutil-dev (= ${binary:Version}), - liba52-dev, libgsm1-dev, libogg-dev, libtheora-dev (>> 0.0.0.alpha4), diff -u ffmpeg-debian-0.svn20080206/debian/confflags ffmpeg-debian-0.svn20080206/debian/confflags --- ffmpeg-debian-0.svn20080206/debian/confflags +++ ffmpeg-debian-0.svn20080206/debian/confflags @@ -19,7 +19,6 @@ # Comment out the following lines for LGPL versions of the libraries gpl_confflags := --enable-gpl -gpl_confflags += --enable-liba52 gpl_confflags += --enable-libfaad gpl_confflags += --enable-pp gpl_confflags += --enable-swscaler @@ -43,13 +42,13 @@ endif ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS := -O0 + CFLAGS := # Various parts of ffmpeg (and swscale) FTBFS when compiling with -fPIC # and with mmx code enabled. confflags += --disable-optimizations confflags += --disable-mmx else - CFLAGS := -O2 + CFLAGS := endif # Support for additional external codecs @@ -73,10 +72,7 @@ # Disable architecture-specific optimizations for default shared build nooptflags += --disable-armv5te --disable-armv6 -nooptflags += --disable-iwmmxt -nooptflags += --disable-mmx nooptflags += --disable-altivec -nooptflags += --disable-ssse3 nooptflags += --disable-vis # Configuration flags for the static libraries @@ -94,10 +90,6 @@ endif shared_build_confflags += --enable-shared shared_build_confflags += --disable-static -# i386 does just fine without -fPIC -ifneq ($(DEB_HOST_ARCH),i386) -shared_build_confflags += --extra-cflags="-fPIC -DPIC" -endif ## i386 architecture specific # Configuration flags for the optimized shared libraries diff -u ffmpeg-debian-0.svn20080206/debian/patches/series ffmpeg-debian-0.svn20080206/debian/patches/series --- ffmpeg-debian-0.svn20080206/debian/patches/series +++ ffmpeg-debian-0.svn20080206/debian/patches/series @@ -3,4 +3,5 @@ 015_reenable-img_convert.diff 020_fix_libswscale_pic_code +020_bug489965_bufferoverflow_str_demuxer.diff 300_c++_compliant_headers.diff 900_doxyfile only in patch2: unchanged: --- ffmpeg-debian-0.svn20080206.orig/debian/patches/020_bug489965_bufferoverflow_str_demuxer.diff +++ ffmpeg-debian-0.svn20080206/debian/patches/020_bug489965_bufferoverflow_str_demuxer.diff @@ -0,0 +1,76 @@ +From: Moritz Muehlenhoff +Subject: Bug#489965: libavformat52: Buffer overflow in STR demuxer +To: Debian Bug Tracking System +Date: Wed, 09 Jul 2008 01:08:43 +0200 +Resent-From: Moritz Muehlenhoff +Reply-To: Moritz Muehlenhoff , 489965@bugs.debian.org + +Package: libavformat52 +Version: 0.svn20080206-9 +Severity: grave +Tags: security +Justification: user security hole + +I noticed the following issue when browsing ffmpeg commit logs: + +http://svn.mplayerhq.hu/ffmpeg?view=rev&revision=13993 +https://roundup.mplayerhq.hu/roundup/ffmpeg/issue311 + + + + + +The following patch is taken from upstream svn, revision 13993. + +--- a/libavformat/psxstr.c ++++ b/libavformat/psxstr.c +@@ -276,12 +276,23 @@ static int str_read_packet(AVFormatConte + int current_sector = AV_RL16(§or[0x1C]); + int sector_count = AV_RL16(§or[0x1E]); + int frame_size = AV_RL32(§or[0x24]); +- int bytes_to_copy; ++ ++ if(!( frame_size>=0 ++ && current_sector < sector_count ++ && sector_count*VIDEO_DATA_CHUNK_SIZE >=frame_size)){ ++ av_log(s, AV_LOG_ERROR, "Invalid parameters %d %d %d\n", current_sector, sector_count, frame_size); ++ return AVERROR_INVALIDDATA; ++ } ++ + // printf("%d %d %d\n",current_sector,sector_count,frame_size); + /* if this is the first sector of the frame, allocate a pkt */ + pkt = &str->tmp_pkt; +- if (current_sector == 0) { +- if (av_new_packet(pkt, frame_size)) ++ ++ if(pkt->size != sector_count*VIDEO_DATA_CHUNK_SIZE){ ++ if(pkt->data) ++ av_log(s, AV_LOG_ERROR, "missmatching sector_count\n"); ++ av_free_packet(pkt); ++ if (av_new_packet(pkt, sector_count*VIDEO_DATA_CHUNK_SIZE)) + return AVERROR(EIO); + + pkt->pos= url_ftell(pb) - RAW_CD_SECTOR_SIZE; +@@ -295,15 +306,15 @@ static int str_read_packet(AVFormatConte + str->pts += (90000 / 15); + } + +- /* load all the constituent chunks in the video packet */ +- bytes_to_copy = frame_size - current_sector*VIDEO_DATA_CHUNK_SIZE; +- if (bytes_to_copy>0) { +- if (bytes_to_copy>VIDEO_DATA_CHUNK_SIZE) bytes_to_copy=VIDEO_DATA_CHUNK_SIZE; +- memcpy(pkt->data + current_sector*VIDEO_DATA_CHUNK_SIZE, +- sector + VIDEO_DATA_HEADER_SIZE, bytes_to_copy); +- } ++ memcpy(pkt->data + current_sector*VIDEO_DATA_CHUNK_SIZE, ++ sector + VIDEO_DATA_HEADER_SIZE, ++ VIDEO_DATA_CHUNK_SIZE); ++ + if (current_sector == sector_count-1) { ++ pkt->size= frame_size; + *ret_pkt = *pkt; ++ pkt->data= NULL; ++ pkt->size= -1; + return 0; + } +