Subject: kern/8055: Sending VSTATUS char causes crash in ttyinfo
To: None <gnats-bugs@gnats.netbsd.org>
From: Dave Huang <khym@bga.com>
List: netbsd-bugs
Date: 07/24/1999 01:03:59
>Number:         8055
>Category:       kern
>Synopsis:       Sending VSTATUS char causes crash in ttyinfo
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 24 00:50:01 1999
>Last-Modified:
>Originator:     Dave Huang
>Organization:
Name: Dave Huang     |   Mammal, mammal / their names are called /
INet: khym@bga.com   |   they raise a paw / the bat, the cat /
FurryMUCK: Dahan     |   dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 23 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++
>Release:        NetBSD-current as of July 23, 1999
>Environment:
	
System: NetBSD yerfable.metonymy.com 1.4G NetBSD 1.4G (YERFABLE) #17: Sat Jul 24 02:02:23 CDT 1999 khym@yerfable.metonymy.com:/usr/src.local/sys/arch/alpha/compile/YERFABLE alpha
NetBSD dahan.metonymy.com 1.4G NetBSD 1.4G (SPIFF) #303: Fri Jul 23 23:28:23 CDT 1999     khym@dahan.metonymy.com:/usr/src.local/sys/arch/i386/compile/SPIFF i386


>Description:
	Sending the VSTATUS character (assuming the terminal flags are
set such that it gets processed) causes the kernel to crash in
ttyinfo()
>How-To-Repeat:
% csh
% stty status ^T -nokerninfo
% [ type ^T ]
>Fix:
--- /usr/src/sys/kern/tty.c	Fri Jul 23 06:59:46 1999
+++ tty.c	Sat Jul 24 02:01:51 1999
@@ -1992,7 +1992,7 @@
 		ttyprintf(tp, "%d%% ", tmp / 100);
 
 		/* Print resident set size. */
-		if (pick->p_stat == SIDL || P_ZOMBIE(p))
+		if (pick->p_stat == SIDL || P_ZOMBIE(pick))
 			tmp = 0;
 		else {
 			register struct vmspace *vm = pick->p_vmspace;

>Audit-Trail:
>Unformatted: