From venglin@freebsd.lublin.pl  Wed Nov  1 23:08:47 2000
Return-Path: <venglin@freebsd.lublin.pl>
Received: from yeti.ismedia.pl (yeti.ismedia.pl [212.182.117.178])
	by hub.freebsd.org (Postfix) with SMTP id 7298437B4C5
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  1 Nov 2000 23:08:43 -0800 (PST)
Received: (qmail 5860 invoked from network); 2 Nov 2000 07:08:43 -0000
Received: from unknown (HELO lagoon.freebsd.lublin.pl) (212.182.115.11)
  by 0 with SMTP; 2 Nov 2000 07:08:43 -0000
Received: (qmail 35852 invoked from network); 2 Nov 2000 07:09:35 -0000
Received: from unknown (HELO riget.scene.pl) (212.182.115.2)
  by 0 with SMTP; 2 Nov 2000 07:09:35 -0000
Received: (qmail 16163 invoked by uid 1001); 2 Nov 2000 07:08:27 -0000
Message-Id: <20001102070827.16162.qmail@riget.scene.pl>
Date: 2 Nov 2000 07:08:27 -0000
From: venglin@freebsd.lublin.pl
Reply-To: venglin@freebsd.lublin.pl
To: FreeBSD-gnats-submit@freebsd.org
Subject: [SECURITY] Yet another top(1) format string vulnerability
X-Send-Pr-Version: 3.2

>Number:         22496
>Category:       bin
>Synopsis:       [SECURITY] Yet another top(1) format string vulnerability
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    imp
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 01 23:10:01 PST 2000
>Closed-Date:    Fri Nov 3 15:00:55 MST 2000
>Last-Modified:  Fri Nov 03 15:01:22 MST 2000
>Originator:     Przemyslaw Frasunek
>Release:        FreeBSD 4.1.1-STABLE i386
>Organization:
ISMEDIA
>Environment:

FreeBSD 4.1.1-STABLE as of 2 November 2000.

>Description:

	Vulnerability very similar to FreeBSD-SA-00:62, just few lines below
	in top.c, but still not fixed.

>How-To-Repeat:

	1. Run top
	2. Press 'r'
	3. Type '20 %n'
	4. Segfault

>Fix:

--- top.c.old	Thu Nov  2 08:07:29 2000
+++ top.c	Thu Nov  2 08:08:17 2000
@@ -826,7 +826,7 @@
 				{
 				    if ((errmsg = renice_procs(tempbuf2)) != NULL)
 				    {
-					new_message(MT_standout, errmsg);
+					new_message(MT_standout, "%s", errmsg);
 					putchar('\r');
 					no_command = Yes;
 				    }

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->imp 
Responsible-Changed-By: johan 
Responsible-Changed-When: Fri Nov 3 13:45:17 PST 2000 
Responsible-Changed-Why:  
Over to Warner who fixed the other new_message call. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=22496 
State-Changed-From-To: open->closed 
State-Changed-By: imp 
State-Changed-When: Fri Nov 3 15:00:55 MST 2000 
State-Changed-Why:  
I fixed this.  Grump.  I must have missed thie the first time. 



http://www.freebsd.org/cgi/query-pr.cgi?pr=22496 
>Unformatted:
