Commit Graph

31919 Commits

Author SHA1 Message Date
Michael Niedermayer
44ebb2556d Merge commit '5ebb5a32bdd910a8afb316c51ed0b322f5600ae5' into release/0.8
* commit '5ebb5a32bdd910a8afb316c51ed0b322f5600ae5':
  shorten: report meaningful errors
  shorten: set invalid channels count to 0

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-22 17:25:51 +02:00
Michael Niedermayer
0a41da3e9d Merge commit 'd785f6940144eb6ce4c24309ed034056b81395bc' into release/0.8
* commit 'd785f6940144eb6ce4c24309ed034056b81395bc':
  shorten: validate that the channel count in the header is not <= 0
  matroskadec: request a read buffer for the wav header
  h264: check for luma and chroma bit depth being equal
  xxan: fix invalid memory access in xan_decode_frame_type0()
  wmadec: require block_align to be set.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-22 17:22:53 +02:00
Michael Niedermayer
afe09e490a Merge commit '5025dbc577c9a9e0109cb363ac630a9eeda6dc1d' into release/0.8
* commit '5025dbc577c9a9e0109cb363ac630a9eeda6dc1d':
  wmaprodec: return an error, not 0, when the input is too small.
  vorbisdec: Error on bark_map_size equal to 0.
  Update RELEASE file for 0.7.8
  update year to 2013
  oggdec: make sure the private parse data is cleaned up
  indeo5: update AVCodecContext width/height on size change
  doc: filters: Correct BNF FILTER description

Conflicts:
	RELEASE

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-22 17:17:10 +02:00
Michael Niedermayer
f8c4dbe45e mpeg12dec: avoid reinitialization on PS changes when possible.
Fixes Ticket2574

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 970c8df735)

Conflicts:
	libavcodec/mpeg12.c
2013-07-09 00:59:24 +02:00
Michael Niedermayer
c997dcd38b mpegts: only reopen pmt_cb filter if its different from the previous.
Fixes Ticket2632

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b009267910)
2013-07-07 19:06:16 +02:00
Carl Eugen Hoyos
2a1bebfc83 Autodetect idcin only if audio properties allow decoding.
Fixes ticket #2688.
(cherry picked from commit 06bede95fc)
2013-06-19 23:50:09 +02:00
Michael Niedermayer
23d835f611 alacenc: Fix missing sign_extend()
Fixes ticket #2497

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8aea2f05dc)

Conflicts:
	libavcodec/alacenc.c
2013-06-13 00:21:41 +02:00
Michael Niedermayer
d04dc7b5a7 h264_cavlc: fix reading skip run
Fixes Ticket2606

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 826b3a75cd)

Conflicts:
	libavcodec/h264_cavlc.c
2013-05-30 23:37:15 +02:00
Reinhard Tartler
5ebb5a32bd shorten: report meaningful errors
(cherry picked from commit 4c364eb2b8)
(cherry picked from commit 0daf1428e8)

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>

Conflicts:
	libavcodec/shorten.c
2013-05-09 11:28:28 +02:00
Reinhard Tartler
a694b2b158 shorten: set invalid channels count to 0
Prevent the loop shorten_decode_close from writing and freeing out of
the array boundary.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>

CC: libav-stable@libav.org

(cherry picked from commit c10da30d84)
(cherry picked from commit 21d568be17)

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>

Conflicts:
	libavcodec/shorten.c
2013-05-09 11:28:28 +02:00
Justin Ruggles
d785f69401 shorten: validate that the channel count in the header is not <= 0
(cherry picked from commit 4c53f4aed3)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>

Conflicts:
	libavcodec/shorten.c
2013-05-09 11:28:25 +02:00
Anton Khirnov
5025dbc577 wmaprodec: return an error, not 0, when the input is too small.
Returning 0 may result in an infinite loop in valid calling programs. A
decoder should never return 0 without producing any output.

CC:libav-stable@libav.org
(cherry picked from commit 4c0080b7e7)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit 60dd8b5733)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-05-09 11:20:11 +02:00
Luca Barbato
5bfa208e65 matroskadec: request a read buffer for the wav header
Solve an infiniloop.

CC: libav-stable@libav.org

(cherry picked from commit 37cb3b180a)

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-05-09 11:20:11 +02:00
Michael Niedermayer
d86a5ce03f vorbisdec: Error on bark_map_size equal to 0.
The value is used to calculate output LSP curve and a division by zero
and out of array accesses would occur.

CVE-2013-0894

CC: libav-stable@libav.org

Reported-by: Dale Curtis <dalecurtis@chromium.org>
Found-by: inferno@chromium.org
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 11dcecfcca)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit 494ddd377a)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-05-09 11:20:11 +02:00
Reinhard Tartler
7d4c38d58d h264: check for luma and chroma bit depth being equal
The decoder assumes a single bit depth for all the planes while
the specification allows different bit depths for luma and chroma.

Avoid the possible problems described in CVE-2013-2277

Conflicts:
	libavcodec/h264.c
2013-05-09 11:20:11 +02:00
Reinhard Tartler
c313f3160a Update RELEASE file for 0.7.8 2013-05-09 11:20:11 +02:00
Reinhard Tartler
7e6625a9af xxan: fix invalid memory access in xan_decode_frame_type0()
The loop a few lines below the xan_unpack() call accesses up to
dec_size * 2 bytes into y_buffer, so dec_size must be limited to
buffer_size / 2.

CC:libav-stable@libav.org
(cherry picked from commit 8a49d2bcbe)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit 62a657de16)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>

Conflicts:
	libavcodec/xxan.c
2013-05-09 11:20:11 +02:00
Anton Khirnov
f13f6f82c6 wmadec: require block_align to be set.
Avoids an infinite loop in the calling programs with decoder not
consuming any input and not returning output.

CC:libav-stable@libav.org
(cherry picked from commit ea1136baaf)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit c1f479e8df)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-05-09 11:20:11 +02:00
Reinhard Tartler
8489c0599f update year to 2013
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-05-09 11:20:10 +02:00
Luca Barbato
ee6b868ac8 oggdec: make sure the private parse data is cleaned up
Related to CVE-2012-2882

(cherry picked from commit d894f74762)

Conflicts:

	libavformat/oggdec.h
	libavformat/oggparsevorbis.c
(cherry picked from commit b0240165d93d4a08d15d244953219a4d4e725d3f)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-05-09 11:20:10 +02:00
Michael Niedermayer
b6783b8826 indeo5: update AVCodecContext width/height on size change
Fixes CVE-2012-2787

Note that in 0.7, there is only indeo 5, no indeo 4 decoder

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit b146d74730)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit 2bc1e4fcb9)

Conflicts:

	libavcodec/ivi_common.c
2013-05-09 11:20:10 +02:00
Carl Eugen Hoyos
e2d529424f Fix type of shared flac table ff_flac_blocksize_table[].
Fixes ticket #2533.
(cherry picked from commit a07ac1f788)
2013-05-05 20:39:34 +02:00
Paul B Mahol
537c173853 smacker: fix off by one error
Regression since a93b572ae4.

Fixes #2426.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit e3cc92a623)
2013-04-03 15:17:54 +02:00
Vicente Jimenez Aguilar
c10582e703 doc: filters: Correct BNF FILTER description
Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit b5ad422bf4)
2013-02-24 19:50:31 +01:00
Michael Niedermayer
dfeef3a209 cook: check js_subband_start for validity
Fixes out of array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c69315a5de)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-21 02:00:40 +01:00
Michael Niedermayer
2b6f3be082 avcodec_align_dimensions2: Ensure cinepak has large enough buffers.
This is partly redundant with the following patches, but its safer

Found-by: u-bo1b@0w.se
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f5c00b347d)

Conflicts:

	libavcodec/utils.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-20 04:33:01 +01:00
Michael Niedermayer
0a57df38f4 Update for 0.8.14
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-20 01:26:33 +01:00
Michael Niedermayer
17966ae5bb qdm2: increase noise_table size
This prevents out of array reads. An alternative solution would be
to check the index but this would require several checks in the
inner loops

Yet another alternative would be to change the index reset logic
but this likely would introduce a difference to the binary decoder

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8c4aebb58d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-20 01:23:54 +01:00
Michael Niedermayer
5af2fd317d wma: check byte_offset_bits
Fixes assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 984add64a4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-20 01:23:54 +01:00
Michael Niedermayer
8aedb75156 tiff: check bppcount
Fixes division by 0

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a34418c28e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-20 01:23:54 +01:00
Michael Niedermayer
1fd86f9a21 vqavideo: fix return type
Fixes Ticket2281

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-20 01:23:54 +01:00
Michael Niedermayer
377fabc9e6 Update for 0.8.13
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-17 23:41:01 +01:00
Michael Niedermayer
41eda87048 pngdec/filter: dont access out of array elements at the end
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1ac0fa50ef)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-17 23:23:05 +01:00
Michael Niedermayer
e6ac11e417 aacdec: check channel count
Prevent out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 96f452ac64)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-17 23:22:44 +01:00
Michael Niedermayer
2cac35086c vqavideo: check chunk sizes before reading chunks
Fixes out of array writes

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ab6c9332bf)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-17 23:22:42 +01:00
Michael Niedermayer
af343f5cdd eamad: fix out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 63ac64864c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-17 23:22:21 +01:00
Michael Niedermayer
391e0fc6c9 roqvideodec: check dimensions validity
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3ae6104511)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-17 23:22:18 +01:00
Michael Niedermayer
caeca53a09 qdm2: check array index before use, fix out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a7ee6281f7)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-17 23:22:13 +01:00
Michael Niedermayer
760929117d alsdec: check block length
Fix writing over the end

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0ceca269b6)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-17 23:22:12 +01:00
Michael Niedermayer
acada70ffb Merge remote-tracking branch 'qatar/release/0.7' into release/0.8
* qatar/release/0.7:
  Update changelog for 0.7.7 release
  mpeg12: do not decode extradata more than once.
  indeo4/5: check empty tile size in decode_mb_info().
  dfa: improve boundary checks in decode_dds1()
  indeo5dec: Make sure we have had a valid gop header.
  rv34: error out on size changes with frame threading

Conflicts:
	Changelog

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-14 14:12:14 +01:00
Michael Niedermayer
4f91c45644 huffyuvdec: Skip len==0 cases
Fixes vlc decoding for hypothetical files that would contain such cases.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0dfc01c2bb)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5ff41ffeb4cb9ea6df49757dc859619dc3d3ab4f)

Conflicts:

	libavcodec/huffyuv.c
(cherry picked from commit 9bc70fe1ae50fd2faa0b9429d47cfbda01a92ebc)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-14 14:11:58 +01:00
Michael Niedermayer
e4831bb9a6 huffyuvdec: Check init_vlc() return codes.
Prevents out of array writes

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f67a0d1152)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 95ab8d33e1a680f30a5a9605175112008ab81afc)

Conflicts:

	libavcodec/huffyuv.c
(cherry picked from commit 277def59fce10d91e3113e5c0f63e22bc4abfa88)

Conflicts:

	libavcodec/huffyuv.c
(cherry picked from commit adf022f458d75e2c8041262e1906a249366ad518)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-02-14 14:11:58 +01:00
Reinhard Tartler
db5b454c3d Update changelog for 0.7.7 release 2013-02-02 09:59:21 +01:00
Anton Khirnov
301761792a mpeg12: do not decode extradata more than once.
Fixes CVE-2012-2803.

(cherry picked from commit 5823686261)

Conflicts:

	libavcodec/mpeg12.c
	libavcodec/mpeg12.h
2013-02-02 09:54:16 +01:00
Anton Khirnov
440e98574b indeo4/5: check empty tile size in decode_mb_info().
This prevents writing into a too small array if some parameters changed
without the tile being reallocated.

Based on a patch by Michael Niedermayer <michaelni@gmx.at>

Fixes CVE-2012-2800

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
(cherry picked from commit ae3da0ae55)

Conflicts:

	libavcodec/ivi_common.c
2013-02-02 09:54:16 +01:00
Anton Khirnov
604d72aa0d dfa: improve boundary checks in decode_dds1()
Fixes CVE-2012-2798

CC:libav-stable@libav.org
(cherry picked from commit d05f72c754)

Conflicts:

	libavcodec/dfa.c
2013-02-02 09:54:16 +01:00
Michael Niedermayer
03ddc26066 indeo5dec: Make sure we have had a valid gop header.
This prevents decoding happening on a half initialized context.

Fixes CVE-2012-2779

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 891918431d)

Conflicts:

	libavcodec/ivi_common.c
	libavcodec/ivi_common.h
2013-02-01 06:46:04 +01:00
Janne Grunau
801eff785a rv34: error out on size changes with frame threading
(cherry picked from commit cb7190cd2c)

Fixes: CVE-2012-2772 (according to Ubuntu)
2013-02-01 06:46:04 +01:00
Xi Wang
b59ee5dcf1 rtmp: fix buffer overflows in ff_amf_tag_contents()
A negative `size' will bypass FFMIN().  In the subsequent memcpy() call,
`size' will be considered as a large positive value, leading to a buffer
overflow.

Change the type of `size' to unsigned int to avoid buffer overflow, and
simplify overflow checks accordingly.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4e692374f7)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 05:55:20 +01:00
Xi Wang
e163d884ef rtmp: fix multiple broken overflow checks
Sanity checks like `data + size >= data_end || data + size < data' are
broken, because `data + size < data' assumes pointer overflow, which is
undefined behavior in C.  Many compilers such as gcc/clang optimize such
checks away.

Use `size < 0 || size >= data_end - data' instead.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 902cfe2f74)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-23 05:55:19 +01:00