* [FFmpeg-devel] [PATCH] avcodec/cbs_h266: more restrictive check on pps_tile_idx_delta_val
[not found] <20231022030435.3438-1-nuomi2021@gmail.com>
@ 2023-10-22 3:04 ` Nuo Mi
2023-12-14 22:33 ` Michael Niedermayer
0 siblings, 1 reply; 2+ messages in thread
From: Nuo Mi @ 2023-10-22 3:04 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Nuo Mi
Fixes: out of array access
Fixes: 62603/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5837632490569728
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
---
libavcodec/cbs_h266_syntax_template.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/libavcodec/cbs_h266_syntax_template.c b/libavcodec/cbs_h266_syntax_template.c
index 5654f22878..5a34200a18 100644
--- a/libavcodec/cbs_h266_syntax_template.c
+++ b/libavcodec/cbs_h266_syntax_template.c
@@ -2043,9 +2043,12 @@ static int FUNC(pps) (CodedBitstreamContext *ctx, RWContext *rw,
}
if (i < current->pps_num_slices_in_pic_minus1) {
if (current->pps_tile_idx_delta_present_flag) {
+ // Two conditions must be met:
+ // 1. −NumTilesInPic + 1 <= pps_tile_idx_delta_val[i] <= NumTilesInPic − 1
+ // 2. 0 <= tile_idx + pps_tile_idx_delta_val[i] <= NumTilesInPic − 1
+ // Combining these conditions yields: -tile_idx <= pps_tile_idx_delta_val[i] <= NumTilesInPic - 1 - tile_idx
ses(pps_tile_idx_delta_val[i],
- -current->num_tiles_in_pic + 1,
- current->num_tiles_in_pic - 1, 1, i);
+ -tile_idx, current->num_tiles_in_pic - 1 - tile_idx, 1, i);
if (current->pps_tile_idx_delta_val[i] == 0) {
av_log(ctx->log_ctx, AV_LOG_ERROR,
"pps_tile_idx_delta_val[i] shall not be equal to 0.\n");
--
2.25.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] 2+ messages in thread
* Re: [FFmpeg-devel] [PATCH] avcodec/cbs_h266: more restrictive check on pps_tile_idx_delta_val
2023-10-22 3:04 ` [FFmpeg-devel] [PATCH] avcodec/cbs_h266: more restrictive check on pps_tile_idx_delta_val Nuo Mi
@ 2023-12-14 22:33 ` Michael Niedermayer
0 siblings, 0 replies; 2+ messages in thread
From: Michael Niedermayer @ 2023-12-14 22:33 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 737 bytes --]
On Sun, Oct 22, 2023 at 11:04:35AM +0800, Nuo Mi wrote:
> Fixes: out of array access
> Fixes: 62603/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5837632490569728
>
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> ---
> libavcodec/cbs_h266_syntax_template.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
will apply
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Frequently ignored answer#1 FFmpeg bugs should be sent to our bugtracker. User
questions about the command line tools should be sent to the ffmpeg-user ML.
And questions about how to use libav* should be sent to the libav-user ML.
[-- 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] 2+ messages in thread
end of thread, other threads:[~2023-12-14 22:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20231022030435.3438-1-nuomi2021@gmail.com>
2023-10-22 3:04 ` [FFmpeg-devel] [PATCH] avcodec/cbs_h266: more restrictive check on pps_tile_idx_delta_val Nuo Mi
2023-12-14 22:33 ` 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