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/3] tools/target_dem_fuzzer: Check fmt before dereferencing
@ 2022-02-23 23:50 Michael Niedermayer
  2022-02-23 23:50 ` [FFmpeg-devel] [PATCH 2/3] tools/target_dec_fuzzer: Adjust threshold for targa Michael Niedermayer
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Michael Niedermayer @ 2022-02-23 23:50 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Fixes: NULL pointer dereference
Fixes: 44884/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-4656748688965632

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_dem_fuzzer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/target_dem_fuzzer.c b/tools/target_dem_fuzzer.c
index 687989ccc8..32767a0182 100644
--- a/tools/target_dem_fuzzer.c
+++ b/tools/target_dem_fuzzer.c
@@ -173,7 +173,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
     }
 
     // HLS uses a loop with sleep, we thus must breakout or we timeout
-    if (!strcmp(fmt->name, "hls"))
+    if (fmt && !strcmp(fmt->name, "hls"))
         interrupt_counter &= 31;
 
     if (!io_buffer_size || size / io_buffer_size > maxblocks)
-- 
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/3] tools/target_dec_fuzzer: Adjust threshold for targa
  2022-02-23 23:50 [FFmpeg-devel] [PATCH 1/3] tools/target_dem_fuzzer: Check fmt before dereferencing Michael Niedermayer
@ 2022-02-23 23:50 ` Michael Niedermayer
  2022-03-07 23:24   ` Michael Niedermayer
  2022-02-23 23:50 ` [FFmpeg-devel] [PATCH 3/3] avformat/rmdec: Better duplicate tags check Michael Niedermayer
  2022-02-25 21:08 ` [FFmpeg-devel] [PATCH 1/3] tools/target_dem_fuzzer: Check fmt before dereferencing Michael Niedermayer
  2 siblings, 1 reply; 6+ messages in thread
From: Michael Niedermayer @ 2022-02-23 23:50 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Fixes: Timeout
Fixes: 44877/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TARGA_fuzzer-4870505251864576

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 13766d22b9..cef71e1e0a 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -200,6 +200,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
     case AV_CODEC_ID_SCREENPRESSO:maxpixels  /= 64;    break;
     case AV_CODEC_ID_SMACKVIDEO:  maxpixels  /= 64;    break;
     case AV_CODEC_ID_SNOW:        maxpixels  /= 128;   break;
+    case AV_CODEC_ID_TARGA:       maxpixels  /= 128;   break;
     case AV_CODEC_ID_TAK:         maxsamples /= 1024;  break;
     case AV_CODEC_ID_TGV:         maxpixels  /= 32;    break;
     case AV_CODEC_ID_THEORA:      maxpixels  /= 16384; 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/3] avformat/rmdec: Better duplicate tags check
  2022-02-23 23:50 [FFmpeg-devel] [PATCH 1/3] tools/target_dem_fuzzer: Check fmt before dereferencing Michael Niedermayer
  2022-02-23 23:50 ` [FFmpeg-devel] [PATCH 2/3] tools/target_dec_fuzzer: Adjust threshold for targa Michael Niedermayer
@ 2022-02-23 23:50 ` Michael Niedermayer
  2022-03-07 23:25   ` Michael Niedermayer
  2022-02-25 21:08 ` [FFmpeg-devel] [PATCH 1/3] tools/target_dem_fuzzer: Check fmt before dereferencing Michael Niedermayer
  2 siblings, 1 reply; 6+ messages in thread
From: Michael Niedermayer @ 2022-02-23 23:50 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Fixes: memleaks
Fixes: 44810/clusterfuzz-testcase-minimized-ffmpeg_dem_IVR_fuzzer-5619494647627776

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

diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 3a3f6aaf09..b0a38bee83 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -127,10 +127,6 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
     uint32_t version;
     int ret;
 
-    // Duplicate tags
-    if (st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO)
-        return AVERROR_INVALIDDATA;
-
     /* ra type header */
     version = avio_rb16(pb); /* version */
     if (version == 3) {
@@ -330,6 +326,11 @@ int ff_rm_read_mdpr_codecdata(AVFormatContext *s, AVIOContext *pb,
     if (codec_data_size == 0)
         return 0;
 
+    // Duplicate tags
+    if (   st->codecpar->codec_type != AVMEDIA_TYPE_UNKNOWN
+        && st->codecpar->codec_type != AVMEDIA_TYPE_DATA)
+        return AVERROR_INVALIDDATA;
+
     avpriv_set_pts_info(st, 64, 1, 1000);
     codec_pos = avio_tell(pb);
     v = avio_rb32(pb);
-- 
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/3] tools/target_dem_fuzzer: Check fmt before dereferencing
  2022-02-23 23:50 [FFmpeg-devel] [PATCH 1/3] tools/target_dem_fuzzer: Check fmt before dereferencing Michael Niedermayer
  2022-02-23 23:50 ` [FFmpeg-devel] [PATCH 2/3] tools/target_dec_fuzzer: Adjust threshold for targa Michael Niedermayer
  2022-02-23 23:50 ` [FFmpeg-devel] [PATCH 3/3] avformat/rmdec: Better duplicate tags check Michael Niedermayer
@ 2022-02-25 21:08 ` Michael Niedermayer
  2 siblings, 0 replies; 6+ messages in thread
From: Michael Niedermayer @ 2022-02-25 21:08 UTC (permalink / raw)
  To: FFmpeg development discussions and patches


[-- Attachment #1.1: Type: text/plain, Size: 658 bytes --]

On Thu, Feb 24, 2022 at 12:50:55AM +0100, Michael Niedermayer wrote:
> Fixes: NULL pointer dereference
> Fixes: 44884/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-4656748688965632
> 
> 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_dem_fuzzer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

During times of universal deceit, telling the truth becomes a
revolutionary act. -- George Orwell

[-- 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

* Re: [FFmpeg-devel] [PATCH 2/3] tools/target_dec_fuzzer: Adjust threshold for targa
  2022-02-23 23:50 ` [FFmpeg-devel] [PATCH 2/3] tools/target_dec_fuzzer: Adjust threshold for targa Michael Niedermayer
@ 2022-03-07 23:24   ` Michael Niedermayer
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Niedermayer @ 2022-03-07 23:24 UTC (permalink / raw)
  To: FFmpeg development discussions and patches


[-- Attachment #1.1: Type: text/plain, Size: 600 bytes --]

On Thu, Feb 24, 2022 at 12:50:56AM +0100, Michael Niedermayer wrote:
> Fixes: Timeout
> Fixes: 44877/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TARGA_fuzzer-4870505251864576
> 
> 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

It is what and why we do it that matters, not just one of them.

[-- 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

* Re: [FFmpeg-devel] [PATCH 3/3] avformat/rmdec: Better duplicate tags check
  2022-02-23 23:50 ` [FFmpeg-devel] [PATCH 3/3] avformat/rmdec: Better duplicate tags check Michael Niedermayer
@ 2022-03-07 23:25   ` Michael Niedermayer
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Niedermayer @ 2022-03-07 23:25 UTC (permalink / raw)
  To: FFmpeg development discussions and patches


[-- Attachment #1.1: Type: text/plain, Size: 610 bytes --]

On Thu, Feb 24, 2022 at 12:50:57AM +0100, Michael Niedermayer wrote:
> Fixes: memleaks
> Fixes: 44810/clusterfuzz-testcase-minimized-ffmpeg_dem_IVR_fuzzer-5619494647627776
> 
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
>  libavformat/rmdec.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)

will apply

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Avoid a single point of failure, be that a person or equipment.

[-- 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-03-07 23:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-23 23:50 [FFmpeg-devel] [PATCH 1/3] tools/target_dem_fuzzer: Check fmt before dereferencing Michael Niedermayer
2022-02-23 23:50 ` [FFmpeg-devel] [PATCH 2/3] tools/target_dec_fuzzer: Adjust threshold for targa Michael Niedermayer
2022-03-07 23:24   ` Michael Niedermayer
2022-02-23 23:50 ` [FFmpeg-devel] [PATCH 3/3] avformat/rmdec: Better duplicate tags check Michael Niedermayer
2022-03-07 23:25   ` Michael Niedermayer
2022-02-25 21:08 ` [FFmpeg-devel] [PATCH 1/3] tools/target_dem_fuzzer: Check fmt before dereferencing 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