Files
FFmpeg/libavcodec
Ruikai Peng e90c2ff4b5 avcodec/libdav1d: fix heap overflow in US ITU-T T.35 metadata parsing
The US country_code path in parse_itut_t35_metadata() reads the
the provider_code with bytestream2_get_be16u(), which is a
unchecked version that does not validate the remaining
length before reading. When an AV1 stream contains ITU-T T.35
metadata with country_code set to 0xB5 (which is US) and a
payload shorter than 2 bytes, this results in a heap overflow
reading 2 bytes past the allocation.

The UK country code already guards against this issue by
checking it before the unchecked read. We're using the same
pattern to the US country code path.

Pwno crafted an AV1 IVF with a metadata OBU containing ITU-T T.35
with country_code=0xB5 and a 1-byte payload. Decoding with libdav1d
triggers the overflow. ASan says:

ERROR: AddressSanitizer: heap-buffer-overflow
READ of size 2 at 0x5020000003f0 thread T0
  #0 bytestream_get_be16 src/libavcodec/bytestream.h:98
  #1 bytestream2_get_be16u src/libavcodec/bytestream.h:98
  #2 parse_itut_t35_metadata src/libavcodec/libdav1d.c:376

0x5020000003f1 is located 0 bytes after 1-byte region

Found-by: Pwno
2026-04-06 23:39:40 +00:00
..
2026-03-28 11:25:38 +01:00
2025-11-05 16:31:59 +00:00
2026-03-10 13:52:18 +01:00
2025-12-13 18:45:17 -03:00
2025-11-26 15:16:42 +01:00
2025-11-08 18:48:54 +01:00
2026-03-10 13:52:19 +01:00
2026-01-02 18:39:48 +01:00
2026-01-02 18:39:48 +01:00
2026-01-02 18:39:48 +01:00
2026-03-10 13:52:19 +01:00
2025-11-26 15:16:43 +01:00
2026-02-23 23:58:11 +01:00
2025-12-13 18:45:17 -03:00
2026-03-13 02:49:59 +01:00
2025-12-30 17:30:45 +00:00
2026-03-10 13:52:19 +01:00
2026-01-02 18:39:48 +01:00
2026-03-07 19:22:40 -03:00
2026-01-10 22:47:22 +01:00
2026-02-04 12:05:35 +08:00
2026-02-04 12:05:35 +08:00
2026-02-11 20:35:20 +00:00
2026-03-10 13:52:19 +01:00
2026-02-19 22:39:35 +00:00
2026-03-28 11:25:38 +01:00
2026-03-28 11:25:38 +01:00
2026-03-28 11:25:38 +01:00
2026-03-02 19:01:46 +01:00
2026-03-02 19:01:46 +01:00
2026-03-10 13:52:18 +01:00
2026-03-03 02:41:05 +01:00
2026-03-10 13:52:19 +01:00
2025-12-30 14:39:08 -05:00
2025-12-30 14:39:08 -05:00
2026-02-23 15:29:27 +00:00
2026-03-10 13:52:18 +01:00
2026-01-02 18:39:48 +01:00
2026-01-02 18:39:48 +01:00
2026-03-16 10:24:33 +00:00