[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#890455: marked as done (xpp: segfault due to buffer overflow)



Your message dated Sat, 11 Jul 2020 19:27:54 +0000
with message-id <E1juLAA-000978-QB@fasolo.debian.org>
and subject line Bug#964481: Removed package(s) from unstable
has caused the Debian Bug report #890455,
regarding xpp: segfault due to buffer overflow
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
890455: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=890455
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: xpp
Version: 1.5-cvs20081009-3
Severity: important
Tags: patch

xpp allocates a 128 byte buffers for the printer selection menu and writes
to the allocated space using unchecked sprintf. It is easy to see
that this may lead to a buffer overflow and subsequent heap corruption.

The following patch fixes a crash due to the above mentioned heap corruption
by replacing malloc+sprintf by asprintf:

--- xpp-1.5-cvs20081009.orig/xpp.cxx
+++ xpp-1.5-cvs20081009/xpp.cxx
@@ -311,7 +311,7 @@ printFiles::printFiles(int  argc, /* I -
 
     // Set up text for menu entry
 
-    menu_strs[i]=(char *)calloc(sizeof(char),128);
+    //menu_strs[i]=(char *)calloc(sizeof(char),128);
 
     // Get printer information to show in the menu entry
 
@@ -366,25 +366,25 @@ printFiles::printFiles(int  argc, /* I -
     int prtype = CupsHelper::printerType(dests[i].name);
     if ( prtype < 0 ) {
       if ( dests[i].instance != NULL )
-        sprintf(menu_strs[i], "%s on %s: Destination not available",
+        asprintf(&menu_strs[i], "%s on %s: Destination not available",
                 dests[i].instance, dests[i].name);
       else
-        sprintf(menu_strs[i], "%s: Destination not available",
+        asprintf(&menu_strs[i], "%s: Destination not available",
                 dests[i].name);
     } else if ((prtype & CUPS_PRINTER_CLASS) || 
                (prtype & CUPS_PRINTER_IMPLICIT)) {
       if ( dests[i].instance != NULL )
-        sprintf(menu_strs[i], "%s on %s: %s (printer class)",
+        asprintf(&menu_strs[i], "%s on %s: %s (printer class)",
                 dests[i].instance, dests[i].name, comment);
       else
-        sprintf(menu_strs[i], "%s: %s (printer class)",
+        asprintf(&menu_strs[i], "%s: %s (printer class)",
                dests[i].name, comment);
     } else {
       if ( dests[i].instance != NULL )
-        sprintf(menu_strs[i], "%s on %s: %s (single printer)",
+        asprintf(&menu_strs[i], "%s on %s: %s (single printer)",
                 dests[i].instance, dests[i].name, comment);
       else
-        sprintf(menu_strs[i], "%s: %s (single printer)",
+        asprintf(&menu_strs[i], "%s: %s (single printer)",
                 dests[i].name, comment);
     }


There are more places where sprintf is used, so I would guess there are
also more places where buffer overflows can occur, but I have not checked them.

I am not sure whether this has any security implications, but I would
not be surprised if.

			Attila Kinali

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.14.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

Versions of packages xpp depends on:
ii  libc6       2.26-4
ii  libcups2    2.2.6-4
ii  libfltk1.1  1.1.10-23
ii  libgcc1     1:7.2.0-19
ii  libstdc++6  7.2.0-19

xpp recommends no packages.

xpp suggests no packages.

-- no debconf information

--- End Message ---
--- Begin Message ---
Version: 1.5-cvs20081009-4+rm

Dear submitter,

as the package xpp has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/964481

The version of this package that was in Debian prior to this removal
can still be found using http://snapshot.debian.org/.

Please note that the changes have been done on the master archive and
will not propagate to any mirrors until the next dinstall run at the
earliest.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmaster@ftp-master.debian.org.

Debian distribution maintenance software
pp.
Sean Whitton (the ftpmaster behind the curtain)

--- End Message ---

Reply to: