[FFmpeg-devel] [PATCH 3/4] avcodec/sanm: Check w, h for subversion < 2
Michael Niedermayer
michael at niedermayer.cc
Mon Jul 28 20:28:52 EEST 2025
On Thu, Jul 03, 2025 at 10:32:35PM +0200, Manuel Lauss wrote:
> Servus Michael,
>
> On Thu, Jun 19, 2025 at 5:05 AM Michael Niedermayer
> <michael at niedermayer.cc> wrote:
> >
> > Fixes: 410609432/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SANM_fuzzer-4935159201988608
> > Fixes: out of array access
> >
> > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> > ---
> > libavcodec/sanm.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/libavcodec/sanm.c b/libavcodec/sanm.c
> > index 642ef02bff2..02bb78859a8 100644
> > --- a/libavcodec/sanm.c
> > +++ b/libavcodec/sanm.c
> > @@ -1670,6 +1670,8 @@ static int process_frame_obj(SANMVideoContext *ctx, GetByteContext *gb)
> > /* Rebel Assault 1: 384x242 internal size */
> > xres = 384;
> > yres = 242;
> > + if (w > xres || h > yres)
> > + return AVERROR_INVALIDDATA;
> > ctx->have_dimensions = 1;
> > } else if (codec == 37 || codec == 47 || codec == 48) {
> > /* these codecs work on full frames, trust their dimensions */
>
> This is OK, it does not impact "legitimate" Videos.
will apply
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
He who knows, does not speak. He who speaks, does not know. -- Lao Tsu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250728/e876803a/attachment.sig>
More information about the ffmpeg-devel
mailing list