Re: [PATCH] Clean console safely
From: Alan Cox
Date: Thu Mar 24 2011 - 06:24:16 EST
On Thu, 24 Mar 2011 10:56:51 +0100
Petr PÃsaÅ <ppisar@xxxxxxxxxx> wrote:
> Traditional \E[2J sequence erases console display but scroll-back
> buffer and underlying device (frame) buffer keep data that can be
> accessed by scrolling console back.
>
> This patch introduce new \E[J parameter 3 that allows to scramble
> scroll-back buffer explicitly. Session locking programs (screen,
> vlock) can use it to prevent attacker to browse locked console
> history.
> ---
> drivers/tty/vt/vt.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
Looks sensible enough
There are a set of official codes that are probably more relevant, and
also deal with the timing of events
See DECSR/DECSRC on a later VT terminal, also DECSTR which
DECSR = secure reset, return to power up state, \E[n+p where n is an
optional value from 1-16383 which if provided is replied back from the tty
as a DECSRC response (hence 'secure'). It's defined to clear off
screen memory, and also other weirdness a user may have set up so could
reasonably also be extended a bit if there is other stuff founbd in
future that such a reset really ought to clean up - eg for mingetty.
http://www.vt100.net/docs/vt520-rm/ek-vt520-rm.pdf (page 299)
ED 3J looks fine but is a new "made up" extension.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/