rpms/psmisc/devel psmisc-22.6-overflow2.patch, NONE, 1.1 psmisc.spec, 1.55, 1.56

Lubomir Rintel lkundrak at fedoraproject.org
Tue Aug 4 23:50:57 UTC 2009


Author: lkundrak

Update of /cvs/pkgs/rpms/psmisc/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9190

Modified Files:
	psmisc.spec 
Added Files:
	psmisc-22.6-overflow2.patch 
Log Message:
* Wed Aug 05 2009 Lubomir Rintel <lkundrak at v3.sk> - 22.6-13
- Fix a buffer overflow


psmisc-22.6-overflow2.patch:
 pstree.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- NEW FILE psmisc-22.6-overflow2.patch ---
Fix an off-by overflow one that would trigger a FORTIFY_SOURCE abort.

Lubomir Rintel <lkundrak at v3.sk>

diff -up psmisc-22.6/src/pstree.c.overflow2 psmisc-22.6/src/pstree.c
--- psmisc-22.6/src/pstree.c.overflow2	2009-08-05 01:38:32.000000000 +0200
+++ psmisc-22.6/src/pstree.c	2009-08-05 01:45:09.000000000 +0200
@@ -641,10 +641,10 @@ read_proc (void)
 		   
 		   if ((taskdir=opendir(taskpath))!=0) {
 		      /* if we have this dir, we're on 2.6 */
-		      if (!(threadname = malloc(strlen(comm) + 3))) {
+		      if (!(threadname = malloc(COMM_LEN + 1))) {
 			 exit (2);
 		      }
-		      sprintf(threadname,"{%s}",comm);
+		      sprintf(threadname,"{%.*s}", COMM_LEN - 2, comm);
 		      while ((dt = readdir(taskdir)) != NULL) {
 			 if ((thread=atoi(dt->d_name)) !=0) {
 			    if (thread != pid) {


Index: psmisc.spec
===================================================================
RCS file: /cvs/pkgs/rpms/psmisc/devel/psmisc.spec,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -p -r1.55 -r1.56
--- psmisc.spec	26 Jul 2009 19:35:10 -0000	1.55
+++ psmisc.spec	4 Aug 2009 23:50:56 -0000	1.56
@@ -1,7 +1,7 @@
 Summary: Utilities for managing processes on your system
 Name: psmisc
 Version: 22.6
-Release: 12%{?dist}
+Release: 13%{?dist}
 License: GPLv2+
 Group: Applications/System
 Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
@@ -14,6 +14,7 @@ Patch0: psmisc-22.6-types.patch
 Patch1: psmisc-22.6-pstree-overflow.patch
 #fix #497303
 Patch2: psmisc-22.6-fuser-remove-mountlist.patch
+Patch3: psmisc-22.6-overflow2.patch
 
 BuildRequires: libselinux-devel
 BuildRequires: gettext
@@ -33,6 +34,7 @@ of processes that are using specified fi
 %patch0 -p1 -b .types
 %patch1 -p1 -b .overflow
 %patch2 -p1 -b .mount
+%patch3 -p1 -b .overflow2
 
 %build
 export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE"
@@ -73,6 +75,9 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 
 %changelog
+* Wed Aug 05 2009 Lubomir Rintel <lkundrak at v3.sk> - 22.6-13
+- Fix a buffer overflow
+
 * Sun Jul 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 22.6-12
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 




More information about the fedora-extras-commits mailing list