Commit Graph

32512 Commits

Author SHA1 Message Date
Michael Niedermayer
a331e11906 smc: fix the bounds check
Fixes invalid writes when there are more blocks in a run than total
remaining blocks.

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8548
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit d423dd72be)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 58dc526ebf)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit f249e98891)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 306ee95088)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-20 11:16:34 +01:00
Anton Khirnov
fc159ba88e mmvideo: check frame dimensions
The frame size must be set by the caller and each dimension must be a
multiple of 2.

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8543
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
(cherry picked from commit 17ba719d9b)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 69a930b988)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 3f10a779b4)
Signed-off-by: Anton Khirnov <anton@khirnov.net>

Conflicts:
	libavcodec/mmvideo.c

(cherry picked from commit 03dba25a40)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-20 11:16:27 +01:00
Anton Khirnov
954aafaa96 jvdec: check frame dimensions
The frame size must be set by the caller and each dimension must be a
multiple of 8.

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8542
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
(cherry picked from commit 88626e5af8)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 55788572ea)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 8f238dd9bd)
Signed-off-by: Anton Khirnov <anton@khirnov.net>

Conflicts:
	libavcodec/jvdec.c

(cherry picked from commit 50cb695bf1)
Signed-off-by: Anton Khirnov <anton@khirnov.net>

Conflicts:
	libavcodec/jvdec.c
2014-12-20 11:16:15 +01:00
Anton Khirnov
0ceb2dffb6 mov: avoid a memleak when multiple stss boxes are present
CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
(cherry picked from commit 64f7575fbd)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 577f1feb3f)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 931f5b2351)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 93f919d0b4)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-12-20 11:15:47 +01:00
Diego Biurrun
22103315c2 Add some bug references to the changelog 2014-09-26 03:17:31 -07:00
Katerina Barone-Adesi
b989bb7ade apetag: Fix APE tag size check
The size variable is (correctly) unsigned, but is passed to several functions
which take signed parameters, such as avio_read, sometimes after having
numbers added to it. So ensure that size remains within the bounds that
these functions can handle.

(cherry picked from commit 56ac2cbd04)
Signed-off-by: Diego Biurrun <diego@biurrun.de>

Conflicts:
	libavformat/apetag.c
2014-09-17 07:50:55 -07:00
Diego Biurrun
893b353362 x86: Only use optimizations with cmov if the CPU supports the instruction
Also fill in missing hash for AV_CPU_FLAG_CMOV addition in APIChanges.

(cherry picked from commit fe07c9c6b5)
Signed-off-by: Diego Biurrun <diego@biurrun.de>

Conflicts:
	libavcodec/x86/dsputil_mmx.c
2014-09-16 01:48:53 -07:00
Diego Biurrun
8637f4edee x86: Add CPU flag for the i686 cmov instruction
(cherry picked from commit 65345a5a30)
Signed-off-by: Diego Biurrun <diego@biurrun.de>

Conflicts:
	libavutil/cpu.c
	libavutil/cpu.h
2014-09-16 01:39:13 -07:00
Diego Biurrun
c6af9e944e Update Changelog for v0.8.16 2014-09-10 12:46:05 -07:00
Diego Biurrun
992da6b76c Prepare for 0.8.16 release 2014-09-10 12:43:08 -07:00
Diego Biurrun
e9e7646379 Update Changelog for v0.8.15 2014-09-10 12:42:12 -07:00
Diego Biurrun
f661006f23 doc: Fix syntax and logical errors in avconv stream combination example
Bug-Id: 661
CC: libav-stable@libav.org
(cherry picked from commit 775a0b04f0)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-09-10 12:11:01 -07:00
Diego Biurrun
554fd5cd63 ffmpeg: Clarify wording of ffmpeg --> avconv deprecation message 2014-09-04 16:14:54 -07:00
Michael Niedermayer
2deac60a38 adpcmenc: Calculate the IMA_QT predictor without overflow
Previously, the value given to put_bits was 10 bits long for positive
predictors, even though 9 bits were to be written. The extra bit could
in some cases overwrite existing bits in the bitstream writer cache.

This fixes a failed assert in put_bits.h, when running a version
built with -DDEBUG.

The fate test result gets slightly improved, thanks to getting rid
of the overwritten bits in the bitstream writer cache.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit aa264da5bf)
Signed-off-by: Diego Biurrun <diego@biurrun.de>

Conflicts:
	tests/ref/fate/acodec-adpcm-ima_qt
2014-08-23 05:19:12 -07:00
Michael Niedermayer
3eed35addb svq1enc: Set picture_structure correctly
This fixes assert failures when running in debug mode.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 2d7d91f06d)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-23 05:19:12 -07:00
Michael Niedermayer
ec0df23765 h264: Remove an assert on current_picture_ptr being null
It is possible in various error paths as well as gap handling
that this has already been allocated. It is not clear why that
would be a problem with the current code, thus disable the
assert to avoid a common assert failure when asserts are enabled.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 5e997688f8)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-23 05:19:12 -07:00
Martin Storsjö
372f742dd1 parser: Don't use pc as context for av_dlog
The ParserContext class doesn't have an AVClass, required for
using it as a logging class.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 6d65496990)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-23 05:19:12 -07:00
Michael Niedermayer
d1c490448c mpegvideo: remove last_picture_ptr / h264 assert.
This assert is no longer true since h264 error concealment needs
last_picture_ptr to be set.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 91672504a4)
Signed-off-by: Diego Biurrun <diego@biurrun.de>

Conflicts:
	libavcodec/mpegvideo.c
2014-08-21 05:40:26 -07:00
Michael Niedermayer
9858a723cb elbg: Fix an assert
It seems the condition was flipped from what was intended.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 2c340596ca)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-21 05:40:26 -07:00
Diego Biurrun
ce57531a88 swscale: Remove two bogus asserts
(cherry picked from commit b9141aa346)
Signed-off-by: Diego Biurrun <diego@biurrun.de>

Conflicts:
	libswscale/swscale.c
2014-08-21 05:40:26 -07:00
Diego Biurrun
233d1b4861 h264_refs: Fix debug tprintf argument types
(cherry picked from commit 6c5b0517e0)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-20 10:19:33 -07:00
Diego Biurrun
90a2359fef nutdec: Remove unused and broken debug function stub
(cherry picked from commit 83655442fa)
Signed-off-by: Diego Biurrun <diego@biurrun.de>

Conflicts:
	libavformat/nutdec.c
2014-08-20 10:11:31 -07:00
Aaron Colwell
57c36de726 vp8: avoid race condition on segment map.
This change avoids accessing the segment map of the previous frame if
segmentation is not enabled for the current frame. The caller of
decode_mb_mode() only calls ff_thread_await_progress() on the reference
segmentation index array if segmentation is enabled, so Chromium's TSAN
will report a race when accessing this data while segmentation is not
enabled.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 30011bf201)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-19 06:15:26 -07:00
Mans Rullgard
8152b02f33 arm/neon: dsputil: use correct size specifiers on vld1/vst1
Change the size specifiers to match the actual element sizes
of the data.  This makes no practical difference with strict
alignment checking disabled (the default) other than somewhat
documenting the code.  With strict alignment checking on, it
avoids trapping the unaligned loads.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2014-08-17 09:52:39 +02:00
Mans Rullgard
9fa9d471a7 arm: dsputil: prettify some conditional instructions in put_pixels macros
Signed-off-by: Mans Rullgard <mans@mansr.com>
2014-08-17 09:52:23 +02:00
Mans Rullgard
6dd19ffd39 arm: dsputil: fix overreads in put/avg_pixels functions
The vertically interpolating variants of these functions read
ahead one line to optimise the loop.  On the last line processed,
this might be outside the buffer.  Fix these invalid reads by
processing the last line outside the loop.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2014-08-17 09:52:13 +02:00
Michael Niedermayer
b5d7b80a7e ffv1dec: check that global parameters do not change in version 0/1
Such changes are neither allowed nor supported

Found-by: ami_stuff
Bug-Id: CVE-2013-7020
CC: libav-stable@libav.org
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit da7d839a0d)
Signed-off-by: Anton Khirnov <anton@khirnov.net>

Conflicts:
	libavcodec/ffv1dec.c
2014-08-12 10:49:43 +00:00
Reinhard Tartler
452e343295 avcodec: Add more missing #includes for ff_get_buffer() 2014-08-09 08:22:11 -07:00
Reinhard Tartler
5a2d1913a9 Prepare for 0.8.15 Release 2014-08-09 09:09:24 -04:00
Luca Barbato
e24d1cbc4e lavf: Fix leftovers from the ff_get_buffer patch
The automated script did not perfectly replace all the instances nor
added internal.h in all the files requiring it.
2014-08-09 14:14:34 +02:00
Martin Storsjö
c98d164a6a configure: Check for -Werror parameters on clang
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 9eded0fe41)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-08-09 14:13:49 +02:00
Luca Barbato
0ab76ddf31 avcodec: Introduce ff_get_buffer
Validate the image size there as is done in the other release
branches.

Bug-Id: CVE-2011-3935
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2014-08-09 04:01:15 +02:00
Reinhard Tartler
042c25f54b Update Changelog for v0.8.14 2014-08-08 20:49:45 -04:00
Michael Niedermayer
dcc68de942 vp3: Copy all 3 frames for thread updates
Fixes a double release of the current frame on deinit.

Bug-Id: CVE-2011-3934
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-08-08 15:04:18 +01:00
Luca Barbato
ebe2292eaf mpegts: Do not try to write a PMT larger than SECTION_SIZE
Prevent out of array write.

Similar to what Michael Niedermayer did to address the same issue.

Bug-Id: CVE-2014-2263
CC: libav-stable@libav.org
(cherry picked from commit addbaf1348)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-08-08 14:27:47 +02:00
Luca Barbato
d86df7dd49 mpegts: Define the section length with a constant
The specification says the value is expressed in 10 bits including
the 4-byte CRC.

(cherry picked from commit 694b7cd873)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>

Conflicts:
	libavformat/mpegtsenc.c
2014-08-08 14:27:27 +02:00
Reinhard Tartler
a79e58cdc6 Update Changelog for v0.8.14 2014-08-06 20:24:58 -04:00
Reinhard Tartler
4709baecc9 Prepare for 0.8.14 Release 2014-08-06 20:24:58 -04:00
Michael Niedermayer
c79cf0129e error_concealment: avoid using the picture if not fully setup
Fixes state becoming inconsistent and a null pointer dereference.

CC: libav-stable@libav.org
Bug-Id: CVE-2013-0860
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-06 19:29:48 +00:00
Anton Khirnov
9d5f4f0253 svq1: do not modify the input packet
The input data must remain constant, make a copy instead. This is in
theory a performance hit, but since I failed to find any samples
using this feature, this should not matter in practice.

Also, check the size of the header, avoiding invalid reads on truncated
data.

CC:libav-stable@libav.org
(cherry picked from commit 7b588bb691)
Signed-off-by: Anton Khirnov <anton@khirnov.net>

Conflicts:
	libavcodec/svq1dec.c
2014-08-06 19:22:05 +00:00
Anton Khirnov
cf6b2a0ad2 cdgraphics: do not return 0 from the decode function
0 means no data consumed, so it can trigger an infinite loop in the
caller.

CC:libav-stable@libav.org
(cherry picked from commit c7d9b473e2)
Signed-off-by: Anton Khirnov <anton@khirnov.net>

Conflicts:
	libavcodec/cdgraphics.c
2014-08-06 18:52:28 +00:00
Anton Khirnov
3aebdffb01 cdgraphics: switch to bytestream2
Fixes possible invalid memory accesses on corrupted data.

CC:libav-stable@libav.org
Bug-ID: CVE-2013-3674
(cherry picked from commit a1599f3f7e)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-06 18:51:49 +00:00
Michael Niedermayer
a1804df66a huffyuvdec: check width size for yuv422p
Avoid out of array accesses.

CC: libav-stable@libav.org
Bug-Id: CVE-2013-0848
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit a7153444df)
Signed-off-by: Anton Khirnov <anton@khirnov.net>

Conflicts:
	libavcodec/huffyuvdec.c
2014-08-05 20:17:19 +00:00
Michael Niedermayer
e17dc0a254 mmvideo: check horizontal coordinate too
Fixes out of array accesses.

Bug-Id: CVE-2013-3672
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 70cd3b8e65)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-05 19:32:56 +00:00
Diego Biurrun
4a6622550a huffyuv: Check and propagate function return values
Bug-Id: CVE-2013-0868

inspired by a patch from Michael Niedermayer <michaelni@gmx.at>
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

(cherry picked from commit 744b406ff3)
Signed-off-by: Diego Biurrun <diego@biurrun.de>

Conflicts:
	libavcodec/huffyuvdec.c
2014-08-04 00:24:21 -07:00
Mans Rullgard
50493f1f7d twinvq: fix out of bounds array access
ModeTab.fmode has only 3 elements, so indexing it with ftype
in the initialier for 'size' is invalid when ftype == FT_PPC.

This fixes crashes with gcc 4.8.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 4bf2e7c5f1)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-01 07:51:18 -07:00
Janne Grunau
3e60501f31 h264: slice-mt: check master context for valid current_picture_ptr
Fixes errors in slice based multithreading introduced in 0b300daad2.

CC: libav-stable@libav.org
(cherry picked from commit 5945c7b35d)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-01 07:37:14 -07:00
Vittorio Giovara
7585a6254b h264: prevent theoretical infinite loop in SEI parsing
Properly address CVE-2011-3946 and parse bitstream as described in the spec.

CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2014-08-01 13:40:11 +01:00
Michael Niedermayer
184c79729d h264_sei: check SEI size
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-08-01 13:39:51 +01:00
Michael Niedermayer
a465ed5707 pgssubdec: Check RLE size before copying
Make sure the buffer size does not exceed the expected
RLE size.

Prevent an out of array bound write.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Bug-Id: CVE-2013-0852

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 00915d3cd2)
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-01 05:19:04 -07:00