1
0
mirror of https://git.ffmpeg.org/ffmpeg.git synced 2026-10-24 02:09:03 +03:00
Commit Graph

123682 Commits

Author SHA1 Message Date
Omkhar Arasaratnam
cd5bddbf1d avformat/tls_openssl: bind peer identity for numeric-IP verify
tls_open() installed a peer-identity target only when the URL host was
non-numeric. For a numeric-IP target the whole block was skipped, so
with verify=1 OpenSSL validated the chain to a trusted CA but bound no
identity, and any publicly-trusted certificate for any name was accepted
(e.g. tls://203.0.113.10?verify=1).

Run the identity block for every non-listening connection. Classify
s->host with the same getaddrinfo(AI_NUMERICHOST) rule tls.c uses. A
numeric host is pinned to the certificate's iPAddress SAN by handing
OpenSSL the parsed binary address via X509_VERIFY_PARAM_set1_ip();
everything else, including a verifyhost=<name> override, binds by name
via SSL_set1_host(). Passing the binary address rather than re-probing
the ASCII form pins legacy numeric spellings such as 2130706433 as IPs
instead of letting them fall back to hostname matching. SNI is still
suppressed for numeric transport hosts (RFC 6066 sec. 3) via
s->numerichost.

The identity target is installed unconditionally for non-listening
connections; whether the certificate is actually verified stays
controlled separately by SSL_CTX_set_verify() under s->verify, so
disabling verification keeps the prior behaviour. Sets AVERROR_EXTERNAL
with an explicit log line on failure.

dtls_open() sets s->is_dtls and then calls tls_open(), so DTLS client
connections run through the same identity block and are covered here.

Found-by: Claude (Anthropic). Human-verified and reported by
Omkhar Arasaratnam <omkhar@linkedin.com>.
Signed-off-by: Omkhar Arasaratnam <omkhar@linkedin.com>
(cherry picked from commit 83c6922826)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:59 +02:00
Michael Niedermayer
9380c3f6d2 avformat/codec2: avoid integer overflow in packet size and duration
Fixes: signed integer overflow
Fixes: 2jy_poc_codec2.zip / poc_codec2.raw
Fixes: jOQASNnOm6O7
Found-by: Jiale Yao <yaojiale02@163.com>
(cherry picked from commit 2b7e501242)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:59 +02:00
Kenan Alghythee
536736a60d avfilter/vf_xpsnr: avoid a zero block size on small frames
Fixes: division by zero
Fixes: SUcVEyk7r3Gc
Found-by: Kenan Alghythee <kalghy2@uic.edu>
(cherry picked from commit 06fd4fd0e7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:59 +02:00
Kenan Alghythee
431807ae93 avcodec/cbs_av1: pad the ITU-T T.35 payload buffer
Fixes: out of array access
Fixes: SUcVEyk7r3Gc
Found-by: Kenan Alghythee <kalghy2@uic.edu>
(cherry picked from commit e2bc6d88cd)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:59 +02:00
Michael Niedermayer
6b4c648d0e avcodec/screenpresso: reject deflate output shorter than the frame
Fixes: use of uninitialized memory
Fixes: screenpresso_short_zlib_heap_disclosure.avi
Fixes: ksUBwBOjJodq
Found-by: Adrian Junge (vurlo)
(cherry picked from commit 7058900614)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:58 +02:00
Steven Liu
191715f023 avformat/hls: Enforce protocol checks when opening child playlists
Fix: vulnerability:019f3b84-903b-75fb-a8de-fad1c2d7e99c
The parse_playlist() path for opening a new child playlist (in == NULL)
directly called c->ctx->io_open(), bypassing the protocol whitelist and
file-extension checks that open_url() enforces. This allowed child URLs
from a master playlist to use protocols other than file/http/data or to
have disallowed extensions.

Route the !in branch through open_url() so that all child playlists are
subject to the same security policy as segment URLs.

Fixes a security bypass in HLS master playlist parsing.

Found-by: depthfirst
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
(cherry picked from commit 23602df9cd)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:58 +02:00
Steven Liu
b06f79094a avformat/hlsenc: Fix heap buffer overflow in parse_playlist()
Fix: vulnerability:019f3b84-903b-75fb-a8de-fe6f84d6bc32

When parsing IV=0x... followed by a comma, end - ptr was passed directly
to av_strlcpy() as the destination size. Since iv_string is only 33 bytes
(KEYSIZE*2 + 1), a long IV token could overflow into adjacent heap data.

Use FFMIN(end - ptr + 1, sizeof(buf)) to cap the copy size to the actual
buffer size. Apply the same fix to key_uri parsing for consistency.

Fixes a heap buffer overflow in append_list mode when reading an existing
playlist with a crafted IV or URI token length.

Found-by: depthfirst
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
(cherry picked from commit 275e217b10)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:58 +02:00
Steven Liu
96fed0a21e avformat/hlsenc: Handle extensionless URIs in extract_segment_number()
fix: vulnerability:019f3b84-90fb-737a-ae7a-b3e0219266fc
extract_segment_number() used strrchr(filename, '.') and immediately did
dot - 1 without checking for NULL. A segment URI with no extension would
cause undefined behavior (NULL pointer arithmetic) when resuming an
append_list playlist with subtitle variants.

Add a NULL check and return -1 early when no dot is found.

Fixes a crash/UB in HLS muxer resume path.

Found-by: depthfirst
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
(cherry picked from commit 601d9ee881)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:58 +02:00
Michael Niedermayer
cc59325592 avfilter/vf_lut3d: do not compute size*size before the size is validated
parse_dat(), parse_cube(), and parse_cinespace() multiply an untrusted LUT size
before allocate_3dlut() validates it, which can overflow int.
Use the validated lutsize2 computed by allocate_3dlut() instead.

Fixes: signed integer overflow
(cherry picked from commit 92cd5c9781)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:58 +02:00
Michael Niedermayer
c8bfe73e26 avfilter/vf_hqdn3d: reject unsupported frame parameter changes
Fixes: out of array access
Fixes: 9aj_hqdn3d_dynamic_res.mjpg / 9aj_generate_hqdn3d_dynamic_res_mjpg.py
Fixes: wWDsy2oDvMuR
Found-by: Adrian Junge (vurlo) <adjun37@gmail.com>
(cherry picked from commit f0f634b658)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:57 +02:00
Omkhar Arasaratnam
b1e368d816 avformat/tls_mbedtls: check the certificate verification result in tls_handshake()
tls_mbedtls verifies the peer certificate manually via
mbedtls_ssl_get_verify_result() (it uses MBEDTLS_SSL_VERIFY_OPTIONAL), but
only in tls_open(). On the external-socket path (external_sock=1) tls_open()
skips the handshake; it then runs later through the url_handshake hook,
tls_handshake(), which never checks the verification result, so with verify=1
an untrusted peer certificate would be accepted.

The only in-tree user of this path is the WHIP muxer, which sets verify=0
(WebRTC binds the peer via the SDP a=fingerprint, not a CA), so this is not
reachable today. This change is defence-in-depth: it makes tls_handshake()
honor verify symmetrically with the existing tls_open() check.

Signed-off-by: Omkhar Arasaratnam <omkhar@linkedin.com>
(cherry picked from commit b96701098f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:57 +02:00
Thomas Guilbert
c49a6059e7 Guard against int overflow when discarding samples
In `discard_samples()`, the rescaling operation can evaluate to
AV_NOPTS_VALUE if the rescaling operation overflows. This commit
prevents adjusting timestamp and durations by the invalid value.

(cherry picked from commit 005e963c85)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:57 +02:00
Michael Niedermayer
cc2a931122 avformat/concatdec: Check recursion depth
This variant is easy backportable but is concatdec specific

Fixes: self_ref.ffconcat
Reported-by: Yuhao Jiang <danisjiang@gmail.com>
Rediscovered-by: Anxious Koisi
Fixes: RWHkT0ASFMNI
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 58d39e99e2)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:57 +02:00
Michael Niedermayer
8c115554a8 avcodec/hevc: Fix integer overflow in WPP entry point range check
Fixes: out of array access
Fixes: poc.hevc / make_poc.py
Fixes: 83WY4xnR87vb
Fixes: dad354f38d (avcodec/hevc: Check max ctb addresses for WPP)
Found-by: VulnForge Security Research Team <haoyuliu@clouditera.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ba55f425fd)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:57 +02:00
Michael Niedermayer
1d805749ba avformat/ty: don't let the Series2 AC3 trim underflow the packet size
Fixes: negative-size-param
Fixes: ty-s2-ac3-negative-size-single-file.ffconcat / create_poc.py
Fixes: g0qeE6KvrjZi
Found-by: Adrian Junge (vurlo)
(cherry picked from commit de771bd527)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:56 +02:00
Michael Niedermayer
6dec9118b5 avfilter/vf_swaprect: size the temp row buffer for the widest plane
Fixes: out of array access
Fixes: 7aj_swaprect_odd17_nv12.nut / 7aj_generate_swaprect_odd17_nv12.py
Fixes: VRAXYvKtmKa8
Found-by: Adrian Junge (vurlo) <adjun37@gmail.com>
(cherry picked from commit a7e38b617b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:56 +02:00
Michael Niedermayer
04fc71debe avfilter/vf_floodfill: remove unneeded variables
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f186c50cf5)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:56 +02:00
Michael Niedermayer
41105cc1f6 avfilter/vf_floodfill: size the point stack for the current frame
Fixes: out of array access
Fixes: 8aj_floodfill_dynamic_size.pgm / 8aj_generate_floodfill_dynamic_size_pgm.py
Fixes: 3MleMXjGZvu3
Found-by: Adrian Junge (vurlo) <adjun37@gmail.com>
(cherry picked from commit 24c322fdb2)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:56 +02:00
Michael Niedermayer
7b4416dfc7 avfilter/vf_lut3d: compute size2 after the 3DLUTSIZE directive
Fixes: out of array access
Fixes: lut3d_poc/poc_3dlut2.dat
Fixes: 6p0ahHBxreqG
Found-by: SecBuddyF - Tencent KeenLab
(cherry picked from commit 0089694c06)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:56 +02:00
Michael Niedermayer
4a66490c65 doc/developer.texi: update reviews section
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 01a9a98f35)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:56 +02:00
Michael Niedermayer
d840866d51 doc/infra.txt: add fairy
(cherry picked from commit 0c29cabc97)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:55 +02:00
Cloud-LHY
2aee0b0ba6 avcodec/tdsc: unref the reference frame before reallocating on size change
Fixes: out of array access
Fixes: tdsc_poc/ffmpeg-tdsc-linesize-report/poc.avi / gen_poc.py
Fixes: tdsc_resize_jpeg_oob.avi / tdsc-resize-stale-linesize-jpeg-oob-generate-poc.py
Fixes: p9xG4xGf9P7H
Fixes: HQL7a1WgTdHZ
Found-by: Cloud-LHY / Clouditera Security, Z.ai Security, NSFOCUS
Found-by: Adrian Junge (vurlo)
(cherry picked from commit fd3ee52fab)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:55 +02:00
Michael Niedermayer
2055461f05 avcodec/cavsdec: reject invalid start-code bitreader sizes
Fixes: NULL pointer dereference
Fixes: 4jy_poc_cavs.zip / poc_cavs.avi
Fixes: UH66Y8Om9F8X
Found-by: Jiale Yao <yaojiale02@163.com>
(cherry picked from commit 9c2aabaa34)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:55 +02:00
Jiale Yao
9bedaaa10b avcodec/libcodec2: reject packet sample counts that overflow int
Fixes: out of array access
Fixes: 2jy_poc_codec2.zip / poc_codec2.raw
Fixes: jOQASNnOm6O7
Found-by: Jiale Yao <yaojiale02@163.com>
(cherry picked from commit 705ff11c2b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:55 +02:00
Michael Niedermayer
9b70b9c2ee avcodec/ffv1dec: mask the fltmap index on the 8bit remap path
Fixes: out of array access
Fixes: ffv1_poc/test_ffv1_8bit_v4.avi
Fixes: 6p0ahHBxreqG
Found-by: SecBuddyF - Tencent KeenLab
(cherry picked from commit ed4f286a10)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:55 +02:00
Michael Niedermayer
46d0e53ecc avcodec/vorbisdec: skip the MDCT for unused channels
Fixes: Timeout
Fixes: 490144337/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VORBIS_DEC_fuzzer-4539724776931328
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
(cherry picked from commit 7a39c205ae)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:54 +02:00
Michael Niedermayer
1e8da360cb avcodec/exr: bound total decoded pixels by max_pixels
Use the maximum block dimensions decode_block() can assign after clipping
the nominal tile or scanline block to the data window.

Fixes: Timeout
Fixes: 521392254/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_DEC_fuzzer-6740984590565376
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 206f2d92db)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:54 +02:00
Michael Niedermayer
92a690f7db avcodec/bsf/dts2pts: evict unconsumable nodes from the poc tree
Each pending packet consumes up to poc_diff tree nodes when it is
output, so the packets in the FIFO can consume at most nb_pending nodes
in total. Frames whose tree lookup misses on output leave their nodes
behind, and damaged or crafted streams can make that happen
indefinitely, growing the tree without limit.

Track the node count and insertion order, keep the leftovers of up to
MAX_DAMAGED_FRAMES frames and beyond that evict the nodes unconsumed
the longest. Timestamps of valid frames are unaffected unless more
frames than that are damaged. No eviction is done at EOF, where nodes
are deliberately kept to regenerate timestamps from.

Of all h264/hevc conformance samples only MR3_TANDBERG_B.264 triggers
evictions, and no sample changes output.

Fixes: unbounded memory growth with damaged streams

Co-Authored-By: Fable-5
(cherry picked from commit dd941af8ac)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:54 +02:00
Michael Niedermayer
fb3e974724 avcodec/bsf/dts2pts: fix removal of 2nd field nodes
alloc_and_insert_node() inserts the nodes for 2nd fields with
duration / poc_diff added to the timestamp, but the removal loop
compared all nodes of a frame against the unadjusted first timestamp,
so 2nd field nodes never matched and stayed in the tree until close.
Advance the compared timestamp the same way the insertion does.

Fixes: tree nodes leaking on every field coded frame

Co-Authored-By: Fable-5
(cherry picked from commit 4133db39b2)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:54 +02:00
Michael Niedermayer
20b43274ad avcodec/bsf/dts2pts: chain same-gop nodes instead of collecting into a fixed array
hevc_queue_frame() collected all tree nodes of the current gop into a
fixed nodes[HEVC_MAX_DPB_SIZE * 2] array and asserted the count stayed
within it. For a crafted HEVC stream the tree can hold slightly more
same-gop nodes than that estimate (observed 34 vs 32), tripping the
av_assert0 and aborting. Link the matching nodes into a list through a
next pointer in the node instead; this has no size limit and needs
neither extra passes nor allocation.

Fixes: assertion failure
Fixes: 519466146/clusterfuzz-testcase-minimized-ffmpeg_BSF_DTS2PTS_fuzzer-5238235193475072
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg

Co-Authored-By: Fable-5
(cherry picked from commit 501d8eb62d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:54 +02:00
Frank Plowman
c6664ba1f5 lavc/hevc: Always generate missing refs for foll pictures
Since bc1a3bfd2c, missing reference
pictures are not replaced with generated pictures unless `-flags
show_corrupt` is used.  For `ST_FOLL`/`LT_FOLL` reference pictures,
however, generation of missing references is required by the spec per
8.3.3.  We should not require the `show_corrupt` flag to be used in
order to be spec-conformant, so this patch removes the `show_corrupt`
behaviour added in bc1a3bfd2c for
`ST_FOLL`/`LT_FOLL` references and instead unconditionally generates
reference pictures in these sets when unavailable

Fixes: NUT_A_ericsson_5
Fixes: RPS_D_ericsson_6
(cherry picked from commit 265d39e551)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:53 +02:00
Michael Niedermayer
14688a8d8c avcodec/mjpegdec: reject redundant scans of a sequential image
Fixes: Timeout
Fixes: 527085539/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AMV_DEC_fuzzer-6502692927897600
Fixes: 523663551/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEG_DEC_fuzzer-5493410811936768
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a7c116b536)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:53 +02:00
Michael Niedermayer
6bc7400cfa avcodec/mjpegdec: reject flipping of bayer images
Fixes: assertion failure
Fixes: 523522308/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_DEC_fuzzer-4771843818192896
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 40ce1513c6)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:53 +02:00
Michael Niedermayer
0a3b424e45 avcodec/tdsc: reject out-of-frame cursor position
Fixes: signed integer overflow
Fixes: 519649309/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TDSC_fuzzer-6322382028734464
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
(cherry picked from commit 8de8405796)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:53 +02:00
Michael Niedermayer
a90817a062 avformat/spdif: fix reading past the buffer when probing AAC in IEC 61937
Fixes: read of uninitialized memory
Fixes: 528525234/clusterfuzz-testcase-minimized-ffmpeg_dem_W64_fuzzer-6429204661731328
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
(cherry picked from commit 15bbf3a21d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:53 +02:00
Michael Niedermayer
f00f40ef80 avfilter/vf_v360: keep remap source coordinates in bounds
Two runtime paths could compute out-of-range source coordinates for
degenerate projection geometry, causing heap-buffer-overflow reads

Fixes: out of array read
Fixes: assertion failure
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a73d648f6e)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:53 +02:00
Michael Niedermayer
041487e046 avfilter/vf_v360: reject dimensions too small for the projection
Fixes: out of array read
Fixes: assertion failure
Fixes: mQzloVqnivHQ
Found-by: Anthony Hurtado
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b3712addc9)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:52 +02:00
Michael Niedermayer
82a51dabfe avcodec/lzf: pad the decompressed buffer
Fixes: out of array read
Fixes: oddlist.mov / poc.mov
Found-by: Clouditera Security; Z.ai Security; NSFOCUS
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit fe47696aa1)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:52 +02:00
Michael Niedermayer
fdfce6a49b avcodec/jpeg2000dec: avoid signed overflow in ROI shift
Fixes: 522402419/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_DEC_fuzzer-5987463315914752
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 90a285ca78)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:52 +02:00
Michael Niedermayer
aa1b0e3980 avcodec/hevc/ps: avoid signed overflow reading act qp offsets
Fixes: 523734452/clusterfuzz-testcase-minimized-ffmpeg_dem_HEVC_fuzzer-5246801451220992
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c5150ad48b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:52 +02:00
Michael Niedermayer
5f5895c9d1 avcodec/vvc/dec: fix pixel buffer tab leak on chroma format change
Fixes: memleak
Fixes: 518575619/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VVC_fuzzer-5161396783611904
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
(cherry picked from commit a41f543113)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:52 +02:00
Michael Niedermayer
3e9f1d46a1 avcodec/vvc/dec: merge the SAO and ALF pixel buffer tab loops
Both loops iterate over the same components and compute the same
per-component width and height. The order of tabs within a TabList
does not matter, so build all pixel buffer tabs in a single loop.

(cherry picked from commit df2649ffb1)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:51 +02:00
Michael Niedermayer
cee320b72b avformat/hls_sample_encryption: Validate ADTS frame length against packet
Fixes: out of array access
Fixes: playlist.m3u8 / make_poc.py
Fixes: rJ50u41V7ctk
Fixes: ff958b3846 (libavformat/hls: add support for decryption of HLS media segments encrypted using SAMPLE-AES encryption method)
Found-by: Clouditera Security Research Team <haoyuliu@clouditera.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 976490dcc3)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:51 +02:00
Michael Niedermayer
0f1d664262 avformat/iff: reject invalid data_size in ANIM
Fixes: 520277418/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-6733106211258368
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 14604ec4b7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:51 +02:00
Kacper Michajłow
a4ddaba8bb avformat/hls: reject Master Playlist tags in a Media Playlist
Fixes infinite loop on crafted HLS playlists.

Fixes: recursion.m3u8
Fixes: cEy2cxyyPaLH
Fixes: cd223e0b4e (Add Apple HTTP Live Streaming demuxer)
Found-by: BapToutatis
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
(cherry picked from commit c364ab176f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:51 +02:00
Omkhar Arasaratnam
1b9040fc89 avformat/mov: bound the iref thmb/cdsc entry count by the sub-box size
Fixes: excessive parsing past the iref sub-box
Fixes: TMwMAJfgy3l9
Fixes: 74e430202d (avformat/mov: make items referencing items generic)
Found-by: Omkhar Arasaratnam
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit dcc18b6077)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:51 +02:00
Michael Niedermayer
25867a1670 avcodec/lcldec: zero the not-decoded tail to avoid heap disclosure
Fixes: use of uninitialized memory
Fixes: CsNDKB1K1U0C
Fixes: e2c3aa8e2b (avcodec/lcldec: More space for rgb24)
Found-by: Adrian Junge (vurlo)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e7cbfd1c50)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:50 +02:00
Michael Niedermayer
6757c200cd avfilter/vf_quirc: resize the quirc buffers when the input size changes
Fixes: out of array access
Fixes: JbvzNObhorBp
Fixes: 030e140145 (lavfi: add quirc filter)
Found-by: Adrian Junge (vurlo)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 4da9812e25)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:50 +02:00
Michael Niedermayer
717950dc46 swscale/output: avoid signed overflow in yuv2rgb_write_full luma scaling
Fixes: 523522305/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-4574409678716928
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
(cherry picked from commit f50e22c68d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:50 +02:00
Michael Niedermayer
a0cd1244ca avformat/wavdec: fix integer overflow in W64 chunk size check
Fixes: 523658585/clusterfuzz-testcase-minimized-ffmpeg_dem_W64_fuzzer-5454488994643968
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3b28a08a32)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-09-19 14:26:50 +02:00