Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/9] avformat/ape: Check frames size
@ 2022-09-17 21:15 Michael Niedermayer
  2022-09-17 21:15 ` [FFmpeg-devel] [PATCH 2/9] avformat/apm: Use 64bit for bit_rate computation Michael Niedermayer
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: Michael Niedermayer @ 2022-09-17 21:15 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Fixes: signed integer overflow: 9223372036854775806 + 3 cannot be represented in type 'long'
Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_APE_fuzzer-6389264140599296

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavformat/ape.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/ape.c b/libavformat/ape.c
index f904fde178c..92e9ac7cb1c 100644
--- a/libavformat/ape.c
+++ b/libavformat/ape.c
@@ -298,6 +298,8 @@ static int ape_read_header(AVFormatContext * s)
             ape->frames[i].pos  -= ape->frames[i].skip;
             ape->frames[i].size += ape->frames[i].skip;
         }
+        if (ape->frames[i].size > INT_MAX - 3)
+            return AVERROR_INVALIDDATA;
         ape->frames[i].size = (ape->frames[i].size + 3) & ~3;
     }
     if (ape->fileversion < 3810) {
-- 
2.17.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-09-23 21:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-17 21:15 [FFmpeg-devel] [PATCH 1/9] avformat/ape: Check frames size Michael Niedermayer
2022-09-17 21:15 ` [FFmpeg-devel] [PATCH 2/9] avformat/apm: Use 64bit for bit_rate computation Michael Niedermayer
2022-09-17 21:15 ` [FFmpeg-devel] [PATCH 3/9] avformat/asfdec_o: Limit packet offset Michael Niedermayer
2022-09-17 21:15 ` [FFmpeg-devel] [PATCH 4/9] avformat/cafdec: Check that nb_frasmes fits within 64bit Michael Niedermayer
2022-09-17 21:15 ` [FFmpeg-devel] [PATCH 5/9] avformat/dhav: Use 64bit seek_back Michael Niedermayer
2022-09-17 21:15 ` [FFmpeg-devel] [PATCH 6/9] avformat/dxa: avoid bpc overflows Michael Niedermayer
2022-09-17 21:15 ` [FFmpeg-devel] [PATCH 7/9] avformat/genh: Check nb_channels for IMA ADPCM Michael Niedermayer
2022-09-17 21:15 ` [FFmpeg-devel] [PATCH 8/9] avformat/icodec: Check nb_pal Michael Niedermayer
2022-09-17 23:11   ` Peter Ross
2022-09-17 21:15 ` [FFmpeg-devel] [PATCH 9/9] avformat/jacosubdec: Fix overflow in get_shift() Michael Niedermayer
2022-09-23 21:03 ` [FFmpeg-devel] [PATCH 1/9] avformat/ape: Check frames size Michael Niedermayer

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git