* [FFmpeg-devel] [PATCH 1/5] tools/target_dec_fuzzer: Adjust threshold for VMDVIDEO
@ 2022-08-13 21:50 Michael Niedermayer
2022-08-13 21:50 ` [FFmpeg-devel] [PATCH 2/5] tools/target_dec_fuzzer: Adjust threshold for VB Michael Niedermayer
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Michael Niedermayer @ 2022-08-13 21:50 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Fixes: Timeout
Fixes: 49350/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VMDVIDEO_fuzzer-4554761801695232
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 e55d9fc7eb..861d201a3d 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -281,6 +281,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
case AV_CODEC_ID_VC1: maxpixels /= 8192; break;
case AV_CODEC_ID_VC1IMAGE: maxpixels /= 8192; break;
case AV_CODEC_ID_VMNC: maxpixels /= 8192; break;
+ case AV_CODEC_ID_VMDVIDEO: maxpixels /= 1024; break;
case AV_CODEC_ID_VP3: maxpixels /= 4096; break;
case AV_CODEC_ID_VP4: maxpixels /= 4096; break;
case AV_CODEC_ID_VP5: maxpixels /= 256; 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] 6+ messages in thread
* [FFmpeg-devel] [PATCH 2/5] tools/target_dec_fuzzer: Adjust threshold for VB
2022-08-13 21:50 [FFmpeg-devel] [PATCH 1/5] tools/target_dec_fuzzer: Adjust threshold for VMDVIDEO Michael Niedermayer
@ 2022-08-13 21:50 ` Michael Niedermayer
2022-08-13 21:50 ` [FFmpeg-devel] [PATCH 3/5] avcodec/mjpegdec: bayer and rct are incompatible Michael Niedermayer
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Michael Niedermayer @ 2022-08-13 21:50 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Fixes: Timeout
Fixes: 49372/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VB_fuzzer-5234505337667584
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 861d201a3d..e1b5d2b3c1 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -278,6 +278,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
case AV_CODEC_ID_TQI: maxpixels /= 1024; break;
case AV_CODEC_ID_TRUEMOTION2: maxpixels /= 1024; break;
case AV_CODEC_ID_TSCC: maxpixels /= 1024; break;
+ case AV_CODEC_ID_VB: maxpixels /= 1024; break;
case AV_CODEC_ID_VC1: maxpixels /= 8192; break;
case AV_CODEC_ID_VC1IMAGE: maxpixels /= 8192; break;
case AV_CODEC_ID_VMNC: maxpixels /= 8192; 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] 6+ messages in thread
* [FFmpeg-devel] [PATCH 3/5] avcodec/mjpegdec: bayer and rct are incompatible
2022-08-13 21:50 [FFmpeg-devel] [PATCH 1/5] tools/target_dec_fuzzer: Adjust threshold for VMDVIDEO Michael Niedermayer
2022-08-13 21:50 ` [FFmpeg-devel] [PATCH 2/5] tools/target_dec_fuzzer: Adjust threshold for VB Michael Niedermayer
@ 2022-08-13 21:50 ` Michael Niedermayer
2022-08-13 21:50 ` [FFmpeg-devel] [PATCH 4/5] avformat/subviewerdec: Make read_ts() more flexible Michael Niedermayer
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Michael Niedermayer @ 2022-08-13 21:50 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Fixes: out of array read
Fixes: 49434/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5208501080686592
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libavcodec/mjpegdec.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 5f058d026f..65c3c402a2 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1092,6 +1092,10 @@ static int ljpeg_decode_rgb_scan(MJpegDecodeContext *s, int nb_components, int p
return AVERROR_INVALIDDATA;
if (s->v_max != 1 || s->h_max != 1 || !s->lossless)
return AVERROR_INVALIDDATA;
+ if (s->bayer) {
+ if (s->rct || s->pegasus_rct)
+ return AVERROR_INVALIDDATA;
+ }
s->restart_count = s->restart_interval;
@@ -1942,6 +1946,8 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
}
len -= 9;
+ if (s->bayer)
+ goto out;
if (s->got_picture)
if (rgb != s->rgb || pegasus_rct != s->pegasus_rct) {
av_log(s->avctx, AV_LOG_WARNING, "Mismatching LJIF tag\n");
--
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] 6+ messages in thread
* [FFmpeg-devel] [PATCH 4/5] avformat/subviewerdec: Make read_ts() more flexible
2022-08-13 21:50 [FFmpeg-devel] [PATCH 1/5] tools/target_dec_fuzzer: Adjust threshold for VMDVIDEO Michael Niedermayer
2022-08-13 21:50 ` [FFmpeg-devel] [PATCH 2/5] tools/target_dec_fuzzer: Adjust threshold for VB Michael Niedermayer
2022-08-13 21:50 ` [FFmpeg-devel] [PATCH 3/5] avcodec/mjpegdec: bayer and rct are incompatible Michael Niedermayer
@ 2022-08-13 21:50 ` Michael Niedermayer
2022-08-13 21:50 ` [FFmpeg-devel] [PATCH 5/5] avcodec/4xm: treat AV_LOG_ERROR cases as errors Michael Niedermayer
2022-08-23 18:06 ` [FFmpeg-devel] [PATCH 1/5] tools/target_dec_fuzzer: Adjust threshold for VMDVIDEO Michael Niedermayer
4 siblings, 0 replies; 6+ messages in thread
From: Michael Niedermayer @ 2022-08-13 21:50 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Fixes: signed integer overflow: -1948269928 * 10 cannot be represented in type 'int'
Fixes: 49451/clusterfuzz-testcase-minimized-ffmpeg_dem_SUBVIEWER_fuzzer-6344614822412288
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
---
libavformat/subviewerdec.c | 36 +++++++++++++++++++++---------------
1 file changed, 21 insertions(+), 15 deletions(-)
diff --git a/libavformat/subviewerdec.c b/libavformat/subviewerdec.c
index e3a950fce3..6ffdc98c39 100644
--- a/libavformat/subviewerdec.c
+++ b/libavformat/subviewerdec.c
@@ -50,26 +50,32 @@ static int subviewer_probe(const AVProbeData *p)
return 0;
}
+static int get_multiplier(int e) {
+ switch (e) {
+ case 1 : return 100;
+ case 2 : return 10;
+ case 3 : return 1;
+ default : return -1;
+ }
+}
+
static int read_ts(const char *s, int64_t *start, int *duration)
{
int64_t end;
int hh1, mm1, ss1, ms1;
int hh2, mm2, ss2, ms2;
- int multiplier = 1;
-
- if (sscanf(s, "%u:%u:%u.%2u,%u:%u:%u.%2u",
- &hh1, &mm1, &ss1, &ms1, &hh2, &mm2, &ss2, &ms2) == 8) {
- multiplier = 10;
- } else if (sscanf(s, "%u:%u:%u.%1u,%u:%u:%u.%1u",
- &hh1, &mm1, &ss1, &ms1, &hh2, &mm2, &ss2, &ms2) == 8) {
- multiplier = 100;
- }
- if (sscanf(s, "%u:%u:%u.%u,%u:%u:%u.%u",
- &hh1, &mm1, &ss1, &ms1, &hh2, &mm2, &ss2, &ms2) == 8) {
- ms1 = FFMIN(ms1, 999);
- ms2 = FFMIN(ms2, 999);
- end = (hh2*3600LL + mm2*60LL + ss2) * 1000LL + ms2 * multiplier;
- *start = (hh1*3600LL + mm1*60LL + ss1) * 1000LL + ms1 * multiplier;
+ int multiplier1, multiplier2;
+ int ms1p1, ms1p2, ms2p1, ms2p2;
+
+ if (sscanf(s, "%u:%u:%u.%n%u%n,%u:%u:%u.%n%u%n",
+ &hh1, &mm1, &ss1, &ms1p1, &ms1, &ms1p2, &hh2, &mm2, &ss2, &ms2p1, &ms2, &ms2p2) == 8) {
+ multiplier1 = get_multiplier(ms1p2 - ms1p1);
+ multiplier2 = get_multiplier(ms2p2 - ms2p1);
+ if (multiplier1 <= 0 ||multiplier2 <= 0)
+ return -1;
+
+ end = (hh2*3600LL + mm2*60LL + ss2) * 1000LL + ms2 * multiplier2;
+ *start = (hh1*3600LL + mm1*60LL + ss1) * 1000LL + ms1 * multiplier1;
*duration = end - *start;
return 0;
}
--
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] 6+ messages in thread
* [FFmpeg-devel] [PATCH 5/5] avcodec/4xm: treat AV_LOG_ERROR cases as errors
2022-08-13 21:50 [FFmpeg-devel] [PATCH 1/5] tools/target_dec_fuzzer: Adjust threshold for VMDVIDEO Michael Niedermayer
` (2 preceding siblings ...)
2022-08-13 21:50 ` [FFmpeg-devel] [PATCH 4/5] avformat/subviewerdec: Make read_ts() more flexible Michael Niedermayer
@ 2022-08-13 21:50 ` Michael Niedermayer
2022-08-23 18:06 ` [FFmpeg-devel] [PATCH 1/5] tools/target_dec_fuzzer: Adjust threshold for VMDVIDEO Michael Niedermayer
4 siblings, 0 replies; 6+ messages in thread
From: Michael Niedermayer @ 2022-08-13 21:50 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Fixes: Timeout
Fixes: 49504/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FOURXM_fuzzer-570457772222054
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libavcodec/4xm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 8941d715fa..a7c9043b0a 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -950,9 +950,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture,
} else if (frame_4cc == AV_RL32("snd_")) {
av_log(avctx, AV_LOG_ERROR, "ignoring snd_ chunk length:%d\n",
buf_size);
+ return AVERROR_INVALIDDATA;
} else {
av_log(avctx, AV_LOG_ERROR, "ignoring unknown chunk length:%d\n",
buf_size);
+ return AVERROR_INVALIDDATA;
}
picture->key_frame = picture->pict_type == AV_PICTURE_TYPE_I;
--
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] 6+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/5] tools/target_dec_fuzzer: Adjust threshold for VMDVIDEO
2022-08-13 21:50 [FFmpeg-devel] [PATCH 1/5] tools/target_dec_fuzzer: Adjust threshold for VMDVIDEO Michael Niedermayer
` (3 preceding siblings ...)
2022-08-13 21:50 ` [FFmpeg-devel] [PATCH 5/5] avcodec/4xm: treat AV_LOG_ERROR cases as errors Michael Niedermayer
@ 2022-08-23 18:06 ` Michael Niedermayer
4 siblings, 0 replies; 6+ messages in thread
From: Michael Niedermayer @ 2022-08-23 18:06 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 795 bytes --]
On Sat, Aug 13, 2022 at 11:50:31PM +0200, Michael Niedermayer wrote:
> Fixes: Timeout
> Fixes: 49350/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VMDVIDEO_fuzzer-4554761801695232
>
> 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
The real ebay dictionary, page 1
"Used only once" - "Some unspecified defect prevented a second use"
"In good condition" - "Can be repaird by experienced expert"
"As is" - "You wouldnt want it even if you were payed for it, if you knew ..."
[-- 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] 6+ messages in thread
end of thread, other threads:[~2022-08-23 18:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-13 21:50 [FFmpeg-devel] [PATCH 1/5] tools/target_dec_fuzzer: Adjust threshold for VMDVIDEO Michael Niedermayer
2022-08-13 21:50 ` [FFmpeg-devel] [PATCH 2/5] tools/target_dec_fuzzer: Adjust threshold for VB Michael Niedermayer
2022-08-13 21:50 ` [FFmpeg-devel] [PATCH 3/5] avcodec/mjpegdec: bayer and rct are incompatible Michael Niedermayer
2022-08-13 21:50 ` [FFmpeg-devel] [PATCH 4/5] avformat/subviewerdec: Make read_ts() more flexible Michael Niedermayer
2022-08-13 21:50 ` [FFmpeg-devel] [PATCH 5/5] avcodec/4xm: treat AV_LOG_ERROR cases as errors Michael Niedermayer
2022-08-23 18:06 ` [FFmpeg-devel] [PATCH 1/5] tools/target_dec_fuzzer: Adjust threshold for VMDVIDEO 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