CVE-2026-45383: prevent reading past end of CtbAddrRStoTS[] in WPP images
authorDebian Multimedia Maintainers <debian-multimedia@lists.debian.org>
Thu, 6 Aug 2026 05:05:03 +0000 (13:05 +0800)
committerAron Xu <aron@debian.org>
Thu, 6 Aug 2026 05:05:03 +0000 (13:05 +0800)
Origin: upstream, https://github.com/strukturag/libde265/commit/d1a2c3b4b751d21f44e8e82220fe9766c9d116ff
Bug: https://github.com/strukturag/libde265/security/advisories/GHSA-wg9q-ppqw-6q38
Applied-Upstream: 1.0.19

In the WPP slice decoder ctbAddrRS = ctbRow * ctbsWidth can exceed the
allocated vector size, causing out-of-bounds reads.

Gbp-Pq: Name CVE-2026-45383.patch

libde265/decctx.cc

index ea2e2136b6aaa162acbe41edc2059b046b4823ea..ed8709d855d905d4efa69500445ffac6a2dca0d7 100644 (file)
@@ -1291,6 +1291,10 @@ de265_error decoder_context::decode_slice_unit_WPP(image_unit* imgunit,
   int ctbAddrRS = shdr->slice_segment_address;
   int ctbRow    = ctbAddrRS / ctbsWidth;
 
+  if (ctbRow + nRows > img->get_sps().PicHeightInCtbsY) {
+    return DE265_WARNING_SLICEHEADER_INVALID;
+  }
+
   for (int entryPt=0;entryPt<nRows;entryPt++) {
     // entry points other than the first start at CTB rows
     if (entryPt>0) {