* [FFmpeg-devel] [PATCH 1/5] tools/target_dec_fuzzer: Adjust threshold for WEBP
@ 2025-05-12 23:58 Michael Niedermayer
2025-05-12 23:58 ` [FFmpeg-devel] [PATCH 2/5] avcodec/4xm: Check frame_4cc before allocation Michael Niedermayer
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Michael Niedermayer @ 2025-05-12 23:58 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Fixes: Timeout
Fixes: 403345121/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WEBP_fuzzer-6408323910139904
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 d99bfb91d68..dfff167f781 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -324,6 +324,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
case AV_CODEC_ID_VP9: maxpixels /= 4096; break;
case AV_CODEC_ID_WAVPACK: maxsamples /= 1024; break;
case AV_CODEC_ID_WCMV: maxpixels /= 1024; break;
+ case AV_CODEC_ID_WEBP: maxpixels /= 1024; break;
case AV_CODEC_ID_WMV3IMAGE: maxpixels /= 8192; break;
case AV_CODEC_ID_WMV2: maxpixels /= 1024; break;
case AV_CODEC_ID_WMV3: maxpixels /= 1024; break;
--
2.49.0
_______________________________________________
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] avcodec/4xm: Check frame_4cc before allocation
2025-05-12 23:58 [FFmpeg-devel] [PATCH 1/5] tools/target_dec_fuzzer: Adjust threshold for WEBP Michael Niedermayer
@ 2025-05-12 23:58 ` Michael Niedermayer
2025-05-12 23:58 ` [FFmpeg-devel] [PATCH 3/5] avcodec/takdec: Check remaining space for first predictors Michael Niedermayer
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Michael Niedermayer @ 2025-05-12 23:58 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Fixes: Timeout
Fixes: 403402798/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FOURXM_fuzzer-5012819292782592
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 | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index fd3a45f0935..94f42681272 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -927,8 +927,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture,
frame_size = buf_size - 12;
}
- if ((ret = ff_get_buffer(avctx, picture, 0)) < 0)
- return ret;
+ if ( frame_4cc == AV_RL32("ifr2") || frame_4cc == AV_RL32("ifrm")
+ || frame_4cc == AV_RL32("pfrm") || frame_4cc == AV_RL32("pfr2")) {
+ if ((ret = ff_get_buffer(avctx, picture, 0)) < 0)
+ return ret;
+ }
if (frame_4cc == AV_RL32("ifr2")) {
picture->pict_type = AV_PICTURE_TYPE_I;
--
2.49.0
_______________________________________________
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/takdec: Check remaining space for first predictors
2025-05-12 23:58 [FFmpeg-devel] [PATCH 1/5] tools/target_dec_fuzzer: Adjust threshold for WEBP Michael Niedermayer
2025-05-12 23:58 ` [FFmpeg-devel] [PATCH 2/5] avcodec/4xm: Check frame_4cc before allocation Michael Niedermayer
@ 2025-05-12 23:58 ` Michael Niedermayer
2025-05-12 23:58 ` [FFmpeg-devel] [PATCH 4/5] avformat/matroskadec: check that channels fit in signed 32bit int Michael Niedermayer
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Michael Niedermayer @ 2025-05-12 23:58 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Fixes: Timeout
Fixes: 403673829/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TAK_fuzzer-5498240154009600
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libavcodec/takdec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c
index 74c8d7c7a8b..1e6e6caebda 100644
--- a/libavcodec/takdec.c
+++ b/libavcodec/takdec.c
@@ -434,6 +434,9 @@ static int decode_subframe(TAKDecContext *s, int32_t *decoded,
return AVERROR_INVALIDDATA;
}
+ if (get_bits_left(gb) < 2*10 + 2*size)
+ return AVERROR_INVALIDDATA;
+
s->predictors[0] = get_sbits(gb, 10);
s->predictors[1] = get_sbits(gb, 10);
s->predictors[2] = get_sbits(gb, size) * (1 << (10 - size));
--
2.49.0
_______________________________________________
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/matroskadec: check that channels fit in signed 32bit int
2025-05-12 23:58 [FFmpeg-devel] [PATCH 1/5] tools/target_dec_fuzzer: Adjust threshold for WEBP Michael Niedermayer
2025-05-12 23:58 ` [FFmpeg-devel] [PATCH 2/5] avcodec/4xm: Check frame_4cc before allocation Michael Niedermayer
2025-05-12 23:58 ` [FFmpeg-devel] [PATCH 3/5] avcodec/takdec: Check remaining space for first predictors Michael Niedermayer
@ 2025-05-12 23:58 ` Michael Niedermayer
2025-05-12 23:58 ` [FFmpeg-devel] [PATCH 5/5] swscale/output: fix integer overflow in yuv2rgba64_full_1_c_template() Michael Niedermayer
2025-05-14 23:31 ` [FFmpeg-devel] [PATCH 1/5] tools/target_dec_fuzzer: Adjust threshold for WEBP Michael Niedermayer
4 siblings, 0 replies; 6+ messages in thread
From: Michael Niedermayer @ 2025-05-12 23:58 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Fixes: signed integer overflow: -1384566925600903168 * 16 cannot be represented in type 'long'
Fixes: 407069502/clusterfuzz-testcase-minimized-ffmpeg_dem_WEBM_DASH_MANIFEST_fuzzer-5159255372267520
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libavformat/matroskadec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index d4b7ae112cc..29e35e6dd4d 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2842,6 +2842,8 @@ static int mka_parse_audio(MatroskaTrack *track, AVStream *st,
par->sample_rate = track->audio.out_samplerate;
// channel layout may be already set by codec private checks above
if (!av_channel_layout_check(&par->ch_layout)) {
+ if (track->audio.channels > INT32_MAX)
+ return AVERROR_PATCHWELCOME;
par->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC;
par->ch_layout.nb_channels = track->audio.channels;
}
--
2.49.0
_______________________________________________
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] swscale/output: fix integer overflow in yuv2rgba64_full_1_c_template()
2025-05-12 23:58 [FFmpeg-devel] [PATCH 1/5] tools/target_dec_fuzzer: Adjust threshold for WEBP Michael Niedermayer
` (2 preceding siblings ...)
2025-05-12 23:58 ` [FFmpeg-devel] [PATCH 4/5] avformat/matroskadec: check that channels fit in signed 32bit int Michael Niedermayer
@ 2025-05-12 23:58 ` Michael Niedermayer
2025-05-14 23:31 ` [FFmpeg-devel] [PATCH 1/5] tools/target_dec_fuzzer: Adjust threshold for WEBP Michael Niedermayer
4 siblings, 0 replies; 6+ messages in thread
From: Michael Niedermayer @ 2025-05-12 23:58 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Fixes: signed integer overflow: -293650 * 16525 cannot be represented in type 'int'
Fixes: 408304111/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-4762210299871232
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libswscale/output.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libswscale/output.c b/libswscale/output.c
index 2a6a20f2e68..c37649e7ce5 100644
--- a/libswscale/output.c
+++ b/libswscale/output.c
@@ -1435,8 +1435,8 @@ yuv2rgba64_full_1_c_template(SwsInternal *c, const int32_t *buf0,
if (uvalpha == 0) {
for (i = 0; i < dstW; i++) {
SUINT Y = (buf0[i]) >> 2;
- int U = (ubuf0[i] - (128 << 11)) >> 2;
- int V = (vbuf0[i] - (128 << 11)) >> 2;
+ SUINT U = (ubuf0[i] - (128 << 11)) >> 2;
+ SUINT V = (vbuf0[i] - (128 << 11)) >> 2;
int R, G, B;
Y -= c->yuv2rgb_y_offset;
@@ -1471,8 +1471,8 @@ yuv2rgba64_full_1_c_template(SwsInternal *c, const int32_t *buf0,
for (i = 0; i < dstW; i++) {
SUINT Y = (buf0[i] ) >> 2;
- int U = (ubuf0[i] * uvalpha1 + ubuf1[i] * uvalpha - (128 << 23)) >> 14;
- int V = (vbuf0[i] * uvalpha1 + vbuf1[i] * uvalpha - (128 << 23)) >> 14;
+ SUINT U = (ubuf0[i] * uvalpha1 + ubuf1[i] * uvalpha - (128 << 23)) >> 14;
+ SUINT V = (vbuf0[i] * uvalpha1 + vbuf1[i] * uvalpha - (128 << 23)) >> 14;
int R, G, B;
Y -= c->yuv2rgb_y_offset;
--
2.49.0
_______________________________________________
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 WEBP
2025-05-12 23:58 [FFmpeg-devel] [PATCH 1/5] tools/target_dec_fuzzer: Adjust threshold for WEBP Michael Niedermayer
` (3 preceding siblings ...)
2025-05-12 23:58 ` [FFmpeg-devel] [PATCH 5/5] swscale/output: fix integer overflow in yuv2rgba64_full_1_c_template() Michael Niedermayer
@ 2025-05-14 23:31 ` Michael Niedermayer
4 siblings, 0 replies; 6+ messages in thread
From: Michael Niedermayer @ 2025-05-14 23:31 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 820 bytes --]
On Tue, May 13, 2025 at 01:58:28AM +0200, Michael Niedermayer wrote:
> Fixes: Timeout
> Fixes: 403345121/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WEBP_fuzzer-6408323910139904
>
> 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
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
If you drop bombs on a foreign country and kill a hundred thousand
innocent people, expect your government to call the consequence
"unprovoked inhuman terrorist attacks" and use it to justify dropping
more bombs and killing more people. The technology changed, the idea is old.
[-- 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:[~2025-05-14 23:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-12 23:58 [FFmpeg-devel] [PATCH 1/5] tools/target_dec_fuzzer: Adjust threshold for WEBP Michael Niedermayer
2025-05-12 23:58 ` [FFmpeg-devel] [PATCH 2/5] avcodec/4xm: Check frame_4cc before allocation Michael Niedermayer
2025-05-12 23:58 ` [FFmpeg-devel] [PATCH 3/5] avcodec/takdec: Check remaining space for first predictors Michael Niedermayer
2025-05-12 23:58 ` [FFmpeg-devel] [PATCH 4/5] avformat/matroskadec: check that channels fit in signed 32bit int Michael Niedermayer
2025-05-12 23:58 ` [FFmpeg-devel] [PATCH 5/5] swscale/output: fix integer overflow in yuv2rgba64_full_1_c_template() Michael Niedermayer
2025-05-14 23:31 ` [FFmpeg-devel] [PATCH 1/5] tools/target_dec_fuzzer: Adjust threshold for WEBP 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