* [FFmpeg-devel] [PATCH 1/2] avcodec/wavarc: Fix k limit
@ 2023-04-25 18:38 Michael Niedermayer
2023-04-25 18:38 ` [FFmpeg-devel] [PATCH 2/2] avcodec/aacdec_template: Fix undefined signed interger operations Michael Niedermayer
2023-07-22 23:52 ` [FFmpeg-devel] [PATCH 1/2] avcodec/wavarc: Fix k limit Michael Niedermayer
0 siblings, 2 replies; 3+ messages in thread
From: Michael Niedermayer @ 2023-04-25 18:38 UTC (permalink / raw)
To: FFmpeg development discussions and patches
The implementation does not support k=32
Fixes: shift exponent 32 is too large for 32-bit type 'unsigned int'
Fixes: 57976/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVARC_fuzzer-5911925807775744
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libavcodec/wavarc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/wavarc.c b/libavcodec/wavarc.c
index 827803c91d..312e4beb7f 100644
--- a/libavcodec/wavarc.c
+++ b/libavcodec/wavarc.c
@@ -192,7 +192,7 @@ static int decode_1dif(AVCodecContext *avctx,
if (block_type < 4 && block_type >= 0) {
k = 1 + (avctx->sample_fmt == AV_SAMPLE_FMT_S16P);
k = get_urice(gb, k) + 1;
- if (k > 32)
+ if (k >= 32)
return AVERROR_INVALIDDATA;
}
@@ -284,7 +284,7 @@ static int decode_2slp(AVCodecContext *avctx,
if (block_type < 5 && block_type >= 0) {
k = 1 + (avctx->sample_fmt == AV_SAMPLE_FMT_S16P);
k = get_urice(gb, k) + 1;
- if (k > 32)
+ if (k >= 32)
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] 3+ messages in thread
* [FFmpeg-devel] [PATCH 2/2] avcodec/aacdec_template: Fix undefined signed interger operations
2023-04-25 18:38 [FFmpeg-devel] [PATCH 1/2] avcodec/wavarc: Fix k limit Michael Niedermayer
@ 2023-04-25 18:38 ` Michael Niedermayer
2023-07-22 23:52 ` [FFmpeg-devel] [PATCH 1/2] avcodec/wavarc: Fix k limit Michael Niedermayer
1 sibling, 0 replies; 3+ messages in thread
From: Michael Niedermayer @ 2023-04-25 18:38 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Fixed: signed integer overflow: -2 * -1085502286 cannot be represented in type 'int'
Fixed: 57986/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5123651145170944
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
libavcodec/aacdec_template.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c
index 444dc4fa9d..237ec8828f 100644
--- a/libavcodec/aacdec_template.c
+++ b/libavcodec/aacdec_template.c
@@ -2856,8 +2856,8 @@ static void imdct_and_windowing_eld(AACContext *ac, SingleChannelElement *sce)
ac->mdct512_fn(ac->mdct512, buf, in, sizeof(INTFLOAT));
for (i = 0; i < n; i+=2) {
- buf[i + 0] = -(USE_FIXED + 1)*buf[i + 0];
- buf[i + 1] = (USE_FIXED + 1)*buf[i + 1];
+ buf[i + 0] = -(USE_FIXED + 1U)*buf[i + 0];
+ buf[i + 1] = (USE_FIXED + 1U)*buf[i + 1];
}
// Like with the regular IMDCT at this point we still have the middle half
// of a transform but with even symmetry on the left and odd symmetry on
--
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] 3+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/2] avcodec/wavarc: Fix k limit
2023-04-25 18:38 [FFmpeg-devel] [PATCH 1/2] avcodec/wavarc: Fix k limit Michael Niedermayer
2023-04-25 18:38 ` [FFmpeg-devel] [PATCH 2/2] avcodec/aacdec_template: Fix undefined signed interger operations Michael Niedermayer
@ 2023-07-22 23:52 ` Michael Niedermayer
1 sibling, 0 replies; 3+ messages in thread
From: Michael Niedermayer @ 2023-07-22 23:52 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 739 bytes --]
On Tue, Apr 25, 2023 at 08:38:13PM +0200, Michael Niedermayer wrote:
> The implementation does not support k=32
>
> Fixes: shift exponent 32 is too large for 32-bit type 'unsigned int'
> Fixes: 57976/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WAVARC_fuzzer-5911925807775744
>
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
> libavcodec/wavarc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
will apply patchset
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No great genius has ever existed without some touch of madness. -- Aristotle
[-- 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] 3+ messages in thread
end of thread, other threads:[~2023-07-22 23:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-25 18:38 [FFmpeg-devel] [PATCH 1/2] avcodec/wavarc: Fix k limit Michael Niedermayer
2023-04-25 18:38 ` [FFmpeg-devel] [PATCH 2/2] avcodec/aacdec_template: Fix undefined signed interger operations Michael Niedermayer
2023-07-22 23:52 ` [FFmpeg-devel] [PATCH 1/2] avcodec/wavarc: Fix k limit 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