Package: release.debian.org
Severity: normal
Tags: trixie
X-Debbugs-Cc: [email protected]
Control: affects -1 + src:fltk1.3
User: [email protected]
Usertags: pu

[ Reason ]
This package addresses a pair of CVEs (jointly reported in
https://bugs.debian.org/1153604) concerning longstanding overflows
that could occur when handling specially crafted BMP and ICO files.

[ Impact ]
Attempting to load specially crafted files in an affected program
could result in crashes or possibly running attacker-supplied code.
AFAICT, nothing in trixie attempts to load user-supplied BMP or ICO
files via FLTK 1.3, but user-built or third-party apps still could.

[ Tests ]
There are no specific tests, but the changes are small and clearly
correct.

[ Risks ]
Minimal -- each CVE gets a straightforward one-line fix.  The
memory-allocation fix could result in out-of-memory errors, but that
still beats heap corruption.

[ Checklist ]
  [✓] *all* changes are documented in the d/changelog
  [✓] I reviewed all changes and I approve them
  [✓] attach debdiff against the package in (old)stable
  [✓] the issue is verified as fixed in unstable

[ Changes ]
The code now properly rejects files with more than 256 colors, which
are invalid, and takes care to allocate enough memory when dealing
with files with very large dimensions.

[ Other info ]
I initially offered these fixes to the security team, which said they
didn't justify a DSA but could merit inclusion in the next point
release.
diff -Nru fltk1.3-1.3.11/debian/changelog fltk1.3-1.3.11/debian/changelog
--- fltk1.3-1.3.11/debian/changelog     2025-04-30 21:41:08.000000000 -0400
+++ fltk1.3-1.3.11/debian/changelog     2026-11-12 21:10:10.000000000 -0500
@@ -1,3 +1,10 @@
+fltk1.3 (1.3.11-2+deb13u1) trixie; urgency=medium
+
+  * src/Fl_BMP_Image.cxx: Backport upstream buffer and integer overflow
+    fixes (CVE-2026-116723, CVE-2026-116724).  (Closes: #1153604.)
+
+ -- Aaron M. Ucko <[email protected]>  Thu, 12 Nov 2026 21:10:10 -0500
+
 fltk1.3 (1.3.11-2) unstable; urgency=medium
 
   * debian/control: Drop fluid (in favor of fltk1.4's) on hurd-any too,
diff -Nru fltk1.3-1.3.11/debian/patches/debian-changes 
fltk1.3-1.3.11/debian/patches/debian-changes
--- fltk1.3-1.3.11/debian/patches/debian-changes        2025-04-30 
21:41:08.000000000 -0400
+++ fltk1.3-1.3.11/debian/patches/debian-changes        2026-11-12 
21:10:10.000000000 -0500
@@ -862,6 +862,29 @@
  
  # Build commands and filename extensions...
  .SUFFIXES:    .0 .1 .3 .6 .c .cxx .mm .h .fl .man .o .z $(EXEEXT)
+--- fltk1.3-1.3.11.orig/src/Fl_BMP_Image.cxx
++++ fltk1.3-1.3.11/src/Fl_BMP_Image.cxx
+@@ -179,6 +179,11 @@ Fl_BMP_Image::Fl_BMP_Image(const char *b
+   if (colors_used == 0 && depth <= 8)
+     colors_used = 1 << depth;
+ 
++  if (colors_used > 256) {
++    ld(ERR_FORMAT);
++    return;
++  }
++
+   for (repcount = 0; repcount < colors_used; repcount ++) {
+     // Read BGR color...
+     if (fread(colormap[repcount], 1, 3, fp)==0) { /* ignore */ }
+@@ -205,7 +210,7 @@ Fl_BMP_Image::Fl_BMP_Image(const char *b
+     w(0); h(0); d(0); ld(ERR_FORMAT);
+     return;
+   }
+-  array = new uchar[w() * h() * d()];
++  array = new uchar[(size_t)w() * h() * d()];
+   alloc_array = 1;
+ 
+   // Read the image data...
 --- fltk1.3-1.3.11.orig/src/Makefile
 +++ fltk1.3-1.3.11/src/Makefile
 @@ -217,6 +217,9 @@ UTF8CFILES = \

Reply via email to