* [FFmpeg-devel] [PATCH 1/3] tools/target_dec_fuzzer: Adjust threshold for QPEG @ 2023-12-15 1:48 Michael Niedermayer 2023-12-15 1:48 ` [FFmpeg-devel] [PATCH 2/3] avcodec/jpegxl_parser: Add padding to cs_buffer Michael Niedermayer ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: Michael Niedermayer @ 2023-12-15 1:48 UTC (permalink / raw) To: FFmpeg development discussions and patches Fixes: 63712/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QPEG_fuzzer-456353017272729 Fixes: Timeout Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- tools/target_dec_fuzzer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index 62085cf0803..e59db6697df 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -273,6 +273,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { case AV_CODEC_ID_QTRLE: maxpixels /= 16; break; case AV_CODEC_ID_PAF_VIDEO: maxpixels /= 16; break; case AV_CODEC_ID_PRORES: maxpixels /= 256; break; + case AV_CODEC_ID_QPEG: maxpixels /= 256; break; case AV_CODEC_ID_RKA: maxsamples /= 65536; break; case AV_CODEC_ID_RSCC: maxpixels /= 256; break; case AV_CODEC_ID_RASC: maxpixels /= 16; break; -- 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] 4+ messages in thread
* [FFmpeg-devel] [PATCH 2/3] avcodec/jpegxl_parser: Add padding to cs_buffer 2023-12-15 1:48 [FFmpeg-devel] [PATCH 1/3] tools/target_dec_fuzzer: Adjust threshold for QPEG Michael Niedermayer @ 2023-12-15 1:48 ` Michael Niedermayer 2023-12-15 1:48 ` [FFmpeg-devel] [PATCH 3/3] avcodec/leaddec: Check remaining bits in decode_block() Michael Niedermayer 2023-12-29 0:16 ` [FFmpeg-devel] [PATCH 1/3] tools/target_dec_fuzzer: Adjust threshold for QPEG Michael Niedermayer 2 siblings, 0 replies; 4+ messages in thread From: Michael Niedermayer @ 2023-12-15 1:48 UTC (permalink / raw) To: FFmpeg development discussions and patches Fixes: out of array access Fixes: 64081/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6151006496620544 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavcodec/jpegxl_parser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/jpegxl_parser.c b/libavcodec/jpegxl_parser.c index 006eb6b2954..a2f9a053018 100644 --- a/libavcodec/jpegxl_parser.c +++ b/libavcodec/jpegxl_parser.c @@ -162,7 +162,7 @@ typedef struct JXLParseContext { int skipped_icc; int next; - uint8_t cs_buffer[4096]; + uint8_t cs_buffer[4096 + AV_INPUT_BUFFER_PADDING_SIZE]; } JXLParseContext; /* used for reading brotli prefixes */ @@ -1391,7 +1391,7 @@ static int try_parse(AVCodecParserContext *s, AVCodecContext *avctx, JXLParseCon if (ctx->container || AV_RL64(buf) == FF_JPEGXL_CONTAINER_SIGNATURE_LE) { ctx->container = 1; ret = ff_jpegxl_collect_codestream_header(buf, buf_size, ctx->cs_buffer, - sizeof(ctx->cs_buffer), &ctx->copied); + sizeof(ctx->cs_buffer) - AV_INPUT_BUFFER_PADDING_SIZE, &ctx->copied); if (ret < 0) return ret; ctx->collected_size = ret; @@ -1400,7 +1400,7 @@ static int try_parse(AVCodecParserContext *s, AVCodecContext *avctx, JXLParseCon return AVERROR_BUFFER_TOO_SMALL; } cs_buffer = ctx->cs_buffer; - cs_buflen = FFMIN(sizeof(ctx->cs_buffer), ctx->copied); + cs_buflen = FFMIN(sizeof(ctx->cs_buffer) - AV_INPUT_BUFFER_PADDING_SIZE, ctx->copied); } else { cs_buffer = buf; cs_buflen = buf_size; -- 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] 4+ messages in thread
* [FFmpeg-devel] [PATCH 3/3] avcodec/leaddec: Check remaining bits in decode_block() 2023-12-15 1:48 [FFmpeg-devel] [PATCH 1/3] tools/target_dec_fuzzer: Adjust threshold for QPEG Michael Niedermayer 2023-12-15 1:48 ` [FFmpeg-devel] [PATCH 2/3] avcodec/jpegxl_parser: Add padding to cs_buffer Michael Niedermayer @ 2023-12-15 1:48 ` Michael Niedermayer 2023-12-29 0:16 ` [FFmpeg-devel] [PATCH 1/3] tools/target_dec_fuzzer: Adjust threshold for QPEG Michael Niedermayer 2 siblings, 0 replies; 4+ messages in thread From: Michael Niedermayer @ 2023-12-15 1:48 UTC (permalink / raw) To: FFmpeg development discussions and patches Fixes: Timeout Fixes: 64163/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LEAD_fuzzer-6418925835124736 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavcodec/leaddec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/leaddec.c b/libavcodec/leaddec.c index ede52fba5a9..4e97479b03c 100644 --- a/libavcodec/leaddec.c +++ b/libavcodec/leaddec.c @@ -104,6 +104,9 @@ static int decode_block(LeadContext * s, GetBitContext * gb, s->bdsp.clear_block(block); + if (get_bits_left(gb) <= 0) + return AVERROR_INVALIDDATA; + size = get_vlc2(gb, dc_table, dc_bits, 1); if (size < 0) return AVERROR_INVALIDDATA; -- 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] 4+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/3] tools/target_dec_fuzzer: Adjust threshold for QPEG 2023-12-15 1:48 [FFmpeg-devel] [PATCH 1/3] tools/target_dec_fuzzer: Adjust threshold for QPEG Michael Niedermayer 2023-12-15 1:48 ` [FFmpeg-devel] [PATCH 2/3] avcodec/jpegxl_parser: Add padding to cs_buffer Michael Niedermayer 2023-12-15 1:48 ` [FFmpeg-devel] [PATCH 3/3] avcodec/leaddec: Check remaining bits in decode_block() Michael Niedermayer @ 2023-12-29 0:16 ` Michael Niedermayer 2 siblings, 0 replies; 4+ messages in thread From: Michael Niedermayer @ 2023-12-29 0:16 UTC (permalink / raw) To: FFmpeg development discussions and patches [-- Attachment #1.1: Type: text/plain, Size: 622 bytes --] On Fri, Dec 15, 2023 at 02:48:26AM +0100, Michael Niedermayer wrote: > Fixes: 63712/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QPEG_fuzzer-456353017272729 > Fixes: Timeout > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > --- > tools/target_dec_fuzzer.c | 1 + > 1 file changed, 1 insertion(+) will apply patchset [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I have often repented speaking, but never of holding my tongue. -- Xenocrates [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 195 bytes --] [-- Attachment #2: Type: text/plain, Size: 251 bytes --] _______________________________________________ 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] 4+ messages in thread
end of thread, other threads:[~2023-12-29 0:16 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-12-15 1:48 [FFmpeg-devel] [PATCH 1/3] tools/target_dec_fuzzer: Adjust threshold for QPEG Michael Niedermayer 2023-12-15 1:48 ` [FFmpeg-devel] [PATCH 2/3] avcodec/jpegxl_parser: Add padding to cs_buffer Michael Niedermayer 2023-12-15 1:48 ` [FFmpeg-devel] [PATCH 3/3] avcodec/leaddec: Check remaining bits in decode_block() Michael Niedermayer 2023-12-29 0:16 ` [FFmpeg-devel] [PATCH 1/3] tools/target_dec_fuzzer: Adjust threshold for QPEG 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