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

Bug#946901: buster-pu: package unhide/20130526-3+deb10u1



Package: release.debian.org
Severity: important
Tags: buster
User: release.debian.org@packages.debian.org
Usertags: pu

Dear Release Team,

I would like to upload the debdiff available below to fix a segmentation fault in unhide.
The reason for this behaviour is that the application is exhausting its stack by allocation an integer array with maxpid elements.

This issue is already fixed in Sid. For details, please see #945864.

Best regards,

Thiago Andrade

-- System Information:
Debian Release: 10.2
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-6-amd64 (SMP w/2 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to C.UTF-8), LANGUAGE=C.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to C.UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect
diff -Nru unhide-20130526/debian/changelog unhide-20130526/debian/changelog
--- unhide-20130526/debian/changelog	2018-12-15 14:01:03.000000000 -0200
+++ unhide-20130526/debian/changelog	2019-12-17 09:08:39.000000000 -0300
@@ -1,3 +1,12 @@
+unhide (20130526-3+deb10u1) buster; urgency=medium
+
+  * Team Upload.
+  * debian/patch/allocate-pid-arrays-from-heap.patch: Added to fix a stack
+    exhausting. Thanks to Bernhard Übelacker <bernhardu@mailbox.org>.
+    (Closes: #945864)
+
+ -- Thiago Andrade Marques <thmarques@gmail.com>  Tue, 17 Dec 2019 09:08:39 -0300
+
 unhide (20130526-3) unstable; urgency=medium
 
   * Team upload.
diff -Nru unhide-20130526/debian/patches/allocate-pid-arrays-from-heap.patch unhide-20130526/debian/patches/allocate-pid-arrays-from-heap.patch
--- unhide-20130526/debian/patches/allocate-pid-arrays-from-heap.patch	1969-12-31 21:00:00.000000000 -0300
+++ unhide-20130526/debian/patches/allocate-pid-arrays-from-heap.patch	2019-12-17 09:08:39.000000000 -0300
@@ -0,0 +1,40 @@
+Description: Allocate pid arrays from the stack
+
+Author: Bernhard Übelacker <bernhardu@mailbox.org>
+Bug-Debian: https://bugs.debian.org/945864
+Forwarded: no
+Last-Update: 2019-12-03
+
+--- unhide-20130526.orig/unhide-linux-bruteforce.c
++++ unhide-20130526/unhide-linux-bruteforce.c
+@@ -64,14 +64,20 @@ void *funcionThread (void *parametro)
+ void brute(void) 
+ {
+    int i=0;
+-   int allpids[maxpid] ;
+-   int allpids2[maxpid] ;
++   int* allpids;
++   int* allpids2;
+    int x;
+    int y;
+    int z;
+ 
+    msgln(unlog, 0, "[*]Starting scanning using brute force against PIDS with fork()\n") ;
+ 
++   allpids = malloc(sizeof(int)*maxpid) ;
++   allpids2 = malloc(sizeof(int)*maxpid) ;
++   if (!allpids || !allpids2) {
++      die(unlog, "Error: Cannot allocate pid arrays ! Exiting.");
++   }
++
+    // PID under 301 are reserved for kernel
+    for(x=0; x < 301; x++) 
+    {
+@@ -214,4 +220,7 @@ void brute(void)
+          }
+       }
+    }
++
++   free(allpids);
++   free(allpids2);
+ }
diff -Nru unhide-20130526/debian/patches/series unhide-20130526/debian/patches/series
--- unhide-20130526/debian/patches/series	2018-12-15 13:57:25.000000000 -0200
+++ unhide-20130526/debian/patches/series	2019-12-17 09:08:39.000000000 -0300
@@ -1 +1,2 @@
 fix-man
+allocate-pid-arrays-from-heap.patch

Reply to: