9135 Commits

Author SHA1 Message Date
Michael Niedermayer
38423fe0b7 smacker: add forgotten *
found by fenrir

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f98edc73c599badaa0c075fbffb519a150d03d80)
2011-11-03 03:52:55 +01:00
Kostya Shishkov
d8439f0452 rv34: check that subsequent slices have the same type as first one.
This prevents some crashes when corrupted bitstream reports e.g. P-type
slice in I-frame. Official RealVideo decoder demands all slices to be
of the same type too.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 23a1f0c59241465ba30103388029a7afc0ead909)
2011-11-03 03:52:55 +01:00
Laurent Aimar
eb6b0ed8be Fixed invalid read access on extra data in cinepak decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit dc255275f6293a060518271a151e1ce75499e874)
2011-11-03 03:33:47 +01:00
Laurent Aimar
b261ebfd22 Fixed segfaults on corruped smacker streams in the decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d07ac1853da29ea696243160e02154ebf758d1ee)
2011-11-03 03:33:35 +01:00
Laurent Aimar
03db051b43 Fixed segfault with wavpack decoder on corrupted decorrelation terms sub-blocks.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 8bfea4ab4e2cb32bc7bf6f697ee30a238c65d296)
2011-11-03 03:32:50 +01:00
Laurent Aimar
cc885682e3 Fixed deference of NULL pointer in motionpixels decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 824f98f442996eaee9204b132752cf5114fc94cf)
2011-11-03 03:32:23 +01:00
Chris Rankin
1415ebf031 qcelpdec: fix the return value of qcelp_decode_frame().
(cherry picked from commit 04c13dca8812e8302686887b6e8201d4ad25b7d8)
2011-11-03 03:31:25 +01:00
Reimar Döffinger
4e0315b30e Check extradata size on resolution change.
Ignore resolution change if resolution not defined in extradata.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
(cherry picked from commit 09c5f990bc7629dfbee8c760fd485936c60a7b40)
2011-11-03 03:30:35 +01:00
Laurent Aimar
a9ded3d272 rv34: Check for invalid slice offsets
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 4cc7732386eb36661ed22d1200339b38a5fa60bc)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-03 03:29:32 +01:00
Laurent Aimar
ef93642aac rv34: Avoid NULL dereference on corrupted bitstream
rv34_decode_slice() can return without allocating any pictures.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit d0f6ab0298f2309c6104626787ed73416298b019)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-03 03:29:21 +01:00
Laurent Aimar
9cda3d7915 rv10: Reject slices that does not have the same type as the first one
This prevents crashes with some corrupted bitstreams.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 4a29b471869353c3077fb4b25b6518eb1047afb7)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-03 03:29:12 +01:00
Laurent Aimar
f936799f0b Check for invalid VLC value in smacker decoder.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 6489455495fc5bfbebcfe3f57e5d4fdd6a781091)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-03 03:27:53 +01:00
Laurent Aimar
f6d3dfe78b Check and propagate errors when VLC trees cannot be built in smacker decoder.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 9676ffba8346791f494451e68d2a3b37a2918a9b)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-03 03:27:46 +01:00
Alex Converse
7cb35d4954 cljr: init_get_bits size in bits instead of bytes
(cherry picked from commit 0c1f5b93d9b97c4cc3684ba91a040e90bfc760d2)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-03 03:26:33 +01:00
Alex Converse
457f869b73 indeo2: fail if input buffer too small
(cherry picked from commit b7ce4f1d1c3add86ece7ca595ea6c4a10b471055)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-03 03:26:19 +01:00
Alex Converse
70f01f1262 indeo2: init_get_bits size in bits instead of bytes
(cherry picked from commit 68ca330cbd479111db9cb7649d7530ad59f04cc8)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-11-03 03:26:11 +01:00
Michael Niedermayer
80fb9f2c57 cavsdec: avoid possible crash with crafted input
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9f06c1c61e876e930753da200bfe835817e30a53)
2011-11-03 03:22:37 +01:00
Carl Eugen Hoyos
46f9a6203a Fix possible double free when encoding using xvid.
(cherry picked from commit 315f0e3fd8dcbd1362276b7407dad2e97cccc4b7)
2011-11-03 03:17:19 +01:00
Michael Niedermayer
e9210b4e17 Merge remote-tracking branch 'qatar/release/0.5' into release/0.5
* qatar/release/0.5:
  Fix memory (re)allocation in matroskadec.c, related to MSVR-11-0080.
  cavs: fix some crashes with invalid bitstreams
  mjpeg: Detect overreads in mjpeg_decode_scan() and error out.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-11-03 02:23:42 +01:00
Mans Rullgard
04888edef3 cavs: fix some crashes with invalid bitstreams
This removes all valgrind-reported invalid writes with one
specific test file.

Fixes http://www.ocert.org/advisories/ocert-2011-002.html

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 4a71da0f3ab7f5542decd11c81994f849d5b2c78)

Fixes CVE-2011-3362, CVE-2011-3973, CVE-2011-3974

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-11-02 21:14:57 +01:00
Michael Niedermayer
8210ee22e2 AMV: Fix possibly exploitable crash.
Reported-at: Thu, 21 Apr 2011 14:38:25 +0000
Reported-by: Dominic Chell <Dominic.Chell@ngssecure.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-26 12:12:11 +02:00
Michael Niedermayer
eed5697f99 mjpeg: Detect overreads in mjpeg_decode_scan() and error out.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Ronald S. Bultje <rbultje@google.com>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-04-26 09:40:06 +02:00
Kostya Shishkov
808f9ce727 Call avcodec_set_dimensions() instead of simply setting avctx->width/height
when frame dimensions change in RV3/4.

Originally committed as revision 20595 to svn://svn.ffmpeg.org/ffmpeg/trunk
(cherry picked from commit d90aeeaf569e4a08c30b3d1d09c3cff3a86eb431)
2011-02-19 17:07:58 +01:00
Reimar Döffinger
8069e2f6fb Fix invalid reads in VC1 decoder
Patch discussed and taken from https://roundup.ffmpeg.org/issue2584
(cherry picked from commit 2bbec1eda46d907605772a8b6e8263caa4bc4c82)

Change related to CVE-2011-0723
2011-02-19 17:07:57 +01:00
Ronald S. Bultje
f7494394ee Make get_bits_left() available for use in libavcodec (was previously held
private in dv.c for some reason). See "[PATCH] get_bits_left()" thread.

Originally committed as revision 20490 to svn://svn.ffmpeg.org/ffmpeg/trunk
(cherry picked from commit c47ca25e74bbe465cdc8b99d4f6ab4f0ad5e4229)
2011-02-19 17:07:57 +01:00
Frank Barchard
329e816ed7 Check rangebits to avoid a possible crash.
Fixes issue 2548 (and Chrome issue 68115 and unknown CERT issues).

Originally committed as revision 26365 to svn://svn.ffmpeg.org/ffmpeg/trunk
(cherry picked from commit 13184036a6b1b1d4b61c91118c0896e9ad4634c3)

Addresses: CVE-2011-0480

Conflicts:

	libavcodec/vorbis_dec.c
2011-02-13 21:41:38 +01:00
Jason Garrett-Glaser
d6860fb653 Fix crashes in vorbis decoding found by zzuf
Fixes issue 2322.

Originally committed as revision 25591 to svn://svn.ffmpeg.org/ffmpeg/trunk
(cherry picked from commit 3dde66752d59dfdd0f3727efd66e7202b3c75078)

Addresses: CVE-2010-4704
2011-02-13 20:45:18 +01:00
Janne Grunau
11f6eebdd3 consolidate .gitignore patters into a single file
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 2c3589bfda036c7827ded0bf38b16dfe7630bae1)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-02-10 14:02:23 +01:00
Janne Grunau
9109a58867 convert svn:ignore properties to .gitignore files
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 348b8218f7a59374355c966dbe3b851a7275f952)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-02-10 14:01:36 +01:00
Kostya Shishkov
44511b17cb Update dimensions in AVCodecContext when RV3/4 frame dimensions change
Originally committed as revision 20572 to svn://svn.ffmpeg.org/ffmpeg/trunk
(cherry picked from commit ec10d2d53999f6edf7d7b5ac88df263eccfb1fb0)

Fixes heap corruption crashes

Addresses: CVE-2011-0722
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-02-04 06:42:29 +01:00
Michael Niedermayer
48b086b0ef Update safety check as the maximum pixel size is no longer 4.
New max size is 16bit * 4 samples (RGBA).

Originally committed as revision 18655 to svn://svn.ffmpeg.org/ffmpeg/trunk
(cherry picked from commit 445f0a8b666a34e6402f6ae96c6804c8bc024baa)

Addresses: CVE-2010-3908
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-02-04 06:41:58 +01:00
Reinhard Tartler
2f504d7a90 Fix several security issues in flicvideo.c
This fixes CVE-2010-3429


backport r25223 by michael


Originally committed as revision 25325 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
2010-10-03 14:51:50 +00:00
Reinhard Tartler
96ca078b22 Check validity of channels & samplerate.
This may be security relevant.
Based on 2 patches by chrome.

backport r19975 by michael




Originally committed as revision 22658 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
2010-03-24 19:35:30 +00:00
Reinhard Tartler
4fb58ecea8 bump LIBAVCODEC_VERSION_MICRO for addition of the lock manager API
As discussed with Diego, we'll go for bumping micro in 0.5 and will
consider adding a RELEASEVERSION macro for trunk and 0.6 seperatly


Originally committed as revision 22087 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
2010-02-27 10:01:45 +00:00
Reinhard Tartler
8e2149d7df fix the remaining ogv segfaults from issue 1240.
First commit:

Make decode_init fail if the huffman tables are invalid and thus init_vlc fails.
Otherwise this will crash during decoding because the vlc tables are NULL.
Partially fixes ogv/smclock.ogv.1.101.ogv from issue 1240.

backport r19355 by reimar

Second commit:

Add extra validation checks to ff_vorbis_len2vlc.
They should not be necessary, but it seems like a reasonable precaution.

r19374 by reimar


Originally committed as revision 22076 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
2010-02-26 14:32:27 +00:00
Reinhard Tartler
9d9f1ecfaa Make sure we dont read over the end.
Fixes issue1237.

backport r19322 by michael


Originally committed as revision 22074 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
2010-02-26 10:56:46 +00:00
Reinhard Tartler
53b90bb25e backport libx264.c from trunk
now compiles with x264 API versions 65 up to 85

patch prepared by darkshikari


Originally committed as revision 22042 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
2010-02-24 22:40:10 +00:00
Reinhard Tartler
26f74e832b cosmetics: K&R coding style, prettyprinting
backported r20083 by diego

This commit does not introduce functional changes.  It was applied in
order to faciliate reviewing the proposed libx264.c backport



Originally committed as revision 21832 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
2010-02-15 12:45:14 +00:00
Reinhard Tartler
9593c80062 Fix crash in MLP decoder due to integer overflow.
Probably only DoS, init_get_bits sets buffer to NULL, thus causing a
NULL-dereference directly after.

backport r21426 by reimar


Originally committed as revision 21759 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
2010-02-11 21:03:30 +00:00
Reinhard Tartler
48b98cdc67 Make sure the block array is of the correct size.
This might have been exploitable.

backported r18393 by michael



Originally committed as revision 21758 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
2010-02-11 20:57:49 +00:00
Reinhard Tartler
9d442d2d7d Fix crash when max_ref_frames was out of range.
This might have been exploitable.
Fixes first crash of issue840.

backport r18388 by michael


Originally committed as revision 21757 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
2010-02-11 16:22:59 +00:00
Reinhard Tartler
afc97d4735 reverting objected hunks from previous commit
as discussed with diego on irc, the spurious newline deletion and the
LIBAVCODEC_VERSION_MINOR bump are being reverted based on comments on
ffmpeg-cvslog by ramiro, uoti and michael.

See http://comments.gmane.org/gmane.comp.video.ffmpeg.cvs/28112 for the
full context.


Originally committed as revision 21755 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
2010-02-11 11:52:59 +00:00
Reinhard Tartler
e5bea45df7 Add a lock manager API to libavcodec.
Allows an application to register a callback that manages mutexes
on behalf of FFmpeg.
With this callback registered FFmpeg is fully thread safe.

backport r19025 by andoma

NB: This is a feature backport with little regression potential. It was
requested at FOSDEM 2010 by ben@geexbox.org for use by geexbox and the
enna mediacenter in the upcoming debian/squeeze and ubuntu/lucid
release.

Approved by DonDiego on #ffmpeg-devel


Originally committed as revision 21731 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
2010-02-09 20:28:42 +00:00
Google Chrome
9e3935dfd8 Check submap indexes.
10_vorbis_submap_indexes.patch by chrome.
I am applying this even though Reimar had some comments to improve it as it fixes
a serious security issue and I do not want to leave such things unfixed.

backport r20001 by michael


Originally committed as revision 21730 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
2010-02-09 19:59:11 +00:00
Google Chrome
4f5ee3f87b Check begin/end/partition_size.
23_vorbis_sane_partition.patch by chrome.
Also this should be better documented but i prefer not to leave potential
security issues open due to missing documentation.

r19996 by michael


Originally committed as revision 21729 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
2010-02-09 19:54:42 +00:00
Google Chrome
736d36b792 Check res_setup->books.
15_more_residue_book_indexes.patch by chrome.

r19992 by michael


Originally committed as revision 21728 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
2010-02-09 19:52:27 +00:00
Google Chrome
dc5cc27d5a Check masterbook index and subclass book index.
14_floor_masterbook_index.patch by chrome

r19991 by michael


Originally committed as revision 21727 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
2010-02-09 19:50:47 +00:00
Google Chrome
eb70d77e1e Add checks for per-packet mode indexes and per-header mode mapping indexes.
12_vorbis_mode_indexes.patch by chrome
maybe exploitable

r19990 by michael


Originally committed as revision 21726 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
2010-02-09 19:49:28 +00:00
Google Chrome
b8ec4c49bd Check classbook value.
11_vorbis_residue_book_index.patch by chrome.

r19989 by michael


Originally committed as revision 21725 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
2010-02-09 19:47:42 +00:00
Google Chrome
49487dfd78 Fix book_idx check.
25_vorbis_floor0_index.patch by chrome.

backport r19984 by michael


Originally committed as revision 21724 to svn://svn.ffmpeg.org/ffmpeg/branches/0.5
2010-02-09 19:46:22 +00:00