public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kalin KOZHUHAROV <kalin@ThinRope.net>
To: Koblinger Egmont <egmont@uhulinux.hu>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: information leak in vga console scrollback buffer
Date: Sun, 13 Jun 2004 19:52:22 +0900	[thread overview]
Message-ID: <40CC31E6.8080201@ThinRope.net> (raw)
In-Reply-To: <Pine.LNX.4.58L0.0406131023260.18435@sziami.cs.bme.hu>

Koblinger Egmont wrote:
> On Sun, 13 Jun 2004, Kalin KOZHUHAROV wrote:
> 
> 
>> OK, I think I got what you are trying to point out. To reproduce: 
>> 1. login to a (vga) console.
>> 2. less /etc/services; press space to scroll a few screens
>> 3. logout
>> 4. login again on the same console (possibly as a different user)
>> 5. less /etc/resolv.conf
>> 6. press Up, then Shift+PgUp
>> 
>> What is expected: screen should not scroll past your file.
>> 
>> What happens: You can view the previous text (from
>> /etc/services)!!!
> 
> 
> Here you didn't clear the scrollback buffer. Maybe you (or getty)
> executed a clear or a terminal reset but that only affects the
> visible part and not the scrollback buffer. There's absolutely no
> problem so far since everyone knows that the scrollback buffer only
> disappears when you switch to a different console.

Well, I didn't know obviously, now I know.

> My problem is that with a
> really-not-trivial-command-and-key-combination you can possibly see
> /etc/services (in your example) even _after_ you've switched to a
> different console and you are certain that the scrollback buffer is
> no longer available.
> 
> And then what if it's not /etc/services but some private data of
> yours? Maybe other users can later access it. There's no way you can
> protect yourself against it. And you live in a false belief that your
> private data is scrolled out forever.
> 
> Please forget your own test case. Repeat _exactly_ those steps _I_ 
> described in my original post. Then you'll understand what I'm
> talking about.
I tried at first...

Now I did it again:
1. Login on VT2
2. less /etc/services
3. switch to X (VT8 here) and do something
4. switch back to VT2
5. press Shift+PgUp
6. press Up, then press several times Shift+PgUp

What is expected:
screen should not scroll past the beginnign of /etc/services.

What happens:
I saw a bunch of garbage plus pieces of text (/etc/shadow form previous tests and so on), this is a security flaw, NOT feature.

> You sure won't understand my problem if you believe that I'm wrong
> and want to convience me with your own interpretation of my words and
> your own (completely different) test case. Please stick to exactly
> what I reported.
No, I thought you were right, I was just trying to produce a simple testcase :-(

What I was trying ot prove with my testcase is that
a) if you are using mingetty
AND
b) you switch VT after logout (pressing Alt+Right a few times)
the above mentioned scroll-back flow is not observed.

Ok, after tons of new tries, I reproduced it...

I was thinking that every VT has its own scrollback buffer and you are supposed to see what has been on a given VT.
Now I see that you can see things that have been printed on _other_ VTs :-)

I confirm the bug.

There is no connection with {a,min}getty it seems.


Kalin.

-- 
||///_ o  *****************************
||//'_/>     WWW: http://ThinRope.net/
|||\/<" 
|||\\ ' 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  reply	other threads:[~2004-06-13 10:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-12 20:01 information leak in vga console scrollback buffer Egmont Koblinger
2004-06-12 20:43 ` Chris Wedgwood
2004-06-12 20:54   ` Koblinger Egmont
2004-06-12 20:59     ` Chris Wedgwood
2004-06-12 21:22       ` Koblinger Egmont
2004-06-13  2:48         ` Kalin KOZHUHAROV
2004-06-13  3:47           ` David Lang
2004-06-13  4:08           ` Kalin KOZHUHAROV
2004-06-13  8:33           ` Koblinger Egmont
2004-06-13 10:52             ` Kalin KOZHUHAROV [this message]
2004-06-13 11:48               ` Koblinger Egmont
2004-06-22 15:32   ` Pavel Machek
2004-06-24 18:47     ` Chris Wedgwood
2004-06-24 21:41       ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40CC31E6.8080201@ThinRope.net \
    --to=kalin@thinrope.net \
    --cc=egmont@uhulinux.hu \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox