Re: W2k/XP hangs with "TAB BS BS" on console

From: Maxim S. Shatskih (maxim@STORAGECRAFT.COM)
Date: 10/29/01


Message-ID:  <000a01c16158$35547bb0$9285763e@sauron>
Date:         Mon, 29 Oct 2001 19:55:55 +0300
From: "Maxim S. Shatskih" <maxim@STORAGECRAFT.COM>
Subject:      Re: W2k/XP hangs with "TAB BS BS" on console
To: NTBUGTRAQ@LISTSERV.NTBUGTRAQ.COM


> >> console compiler) was executed:
> >>
> >> #include <stdio.h>
> >> int main(void)
> >> {
> >> printf("\t\b\b");
> >> return 0;
> >> }
>
> Isn't this a very old already known problem dating back to NT?
(skip)
> With a manual load of NTDLL.DLL and the API call GetProcAddress, we'll find

You're absolutely wrong.
This seems to be a minor bug (like missing a comparison) in the binary with implements the console window (either WINSRV.DLL or
CSRSRV.DLL - loaded to CSRSS process). Hope MS will fix it very soon.

The bug in question is described detaily at (URL can be wrapped):

http://homepages.tesco.net./~J.deBoynePollard/FGA/csrss-backspace-bug.html

This is by no means an LPC port mechanism being compromised.

The design issues with this are that NT, unlike UNIX, has no kernel-supported terminal code (which processes things like backspaces
or command line editing).
In NT, the console handle is NOT a kernel file handle, and user-mode kernel32.dll knows the difference. For instance, WriteFile
calls NtWriteFile (the latter is a syscall to the kernel) for all handles except the console, and calls CsrClientCallServer for a
console.
If NT was like UNIX in this respect (a console is a kernel file handle which corresponds to the kernel-mode terminal driver -
possibly with minidrivers plugged into like Linux has), then this bug could be fixed by a filter driver without waiting for help
from MS.

Another questions to MS:
- why crash the whole OS on CSRSS death?
- why not have a process-per-console-window option (like UNIX GUI has)? MS has this "process per window" option for Explorer, it
existed since NT4 (by registry hacking) and was implemented in GUI since Win98. Strange that MS cannot provide the same for
consoles, which still belong to the same CSRSS process.

    Max

============================================================================
Delivery co-sponsored by Trend Micro, Inc.
============================================================================
BEST-OF-BREED ANTIVIRUS SOLUTION FOR MICROSOFT EXCHANGE 2000
Earn 5% rebate on licenses purchased for Trend Micro ScanMail for
Microsoft Exchange 2000 between October 1 and November 16. ScanMail
ensures 100% scanning of inbound and outbound traffic and provides
remote software management. For program details or to download your
30-day FREE evaluation copy:
http://www.antivirus.com/banners/tracking.asp?si=53&bi=245&ul=http://www.a
ntivirus.com/smex2000_rebate



Relevant Pages

  • Re: Bugzilla bug - No response
    ... > the notice up on the console. ... Do I need to get in contact with the kernel developers at all? ... bug that you are running a new kernel and still ... $ chkconfig kudzu off ...
    (Fedora)
  • miibus, ed0, and the realpath security advisory
    ... dmesg and kernel config below. ... miibus0: <MII bus> on dc0 ... sc0: <System console> on isa0 ... # The `bpf' pseudo-device enables the Berkeley Packet Filter. ...
    (freebsd-questions)
  • [parisc] 2.6.24-rc3 (64-bit, smp) fails to boot on 9000/785/J5600
    ... v2.6.24-rc3-19-g2ffbb83 fails very early in the boot procedure. ... kernel was compiled using gcc 4.1.2. ... you may need to switch your console. ... # IPVS transport protocol load balancing support ...
    (Linux-Kernel)
  • [parisc] 2.6.24-rc3 (64-bit, smp) fails to boot on 9000/785/J5600
    ... v2.6.24-rc3-19-g2ffbb83 fails very early in the boot procedure. ... kernel was compiled using gcc 4.1.2. ... you may need to switch your console. ... # IPVS transport protocol load balancing support ...
    (Linux-Kernel)
  • Re: OpenGL-based framebuffer concepts
    ... are the best drivers we have. ... you forget everytime that the kernel ... Apparently with any framebuffer driver ... framebuffer graphics apps in the console except that I can't ...
    (Linux-Kernel)