mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Richard B. Johnson" <root@chaos.analogic.com>
To: Albert Cahalan <albert@users.sourceforge.net>
Cc: linux-kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: unsafe printk
Date: Fri, 17 Oct 2003 08:38:57 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.53.0310170834160.2962@chaos> (raw)
In-Reply-To: <1066354577.15921.111.camel@cube>

On Thu, 16 Oct 2003, Albert Cahalan wrote:

> Suppose I name an executable this:
> "\n<0>Oops: EIP=0"
>
> That comes out as a KERN_EMERG log message,
> hitting the console and maybe a pager even.
>
> There seem to be a number of places in the
> kernel that printk current->comm without
> concern for what it may contain.
>
> Escape codes and non-ASCII can make for some
> interesting log messages as well. Terminals
> may have some programmable keys or answerback
> messages. So one day root is using grep on
> the log files, and they program the answerback
> string to contain a "\r\nrm -r /\r\n"...
>
> BTW, the 0x9b character is often an escape.

I remember this from VAX/VMS "system manager school"!
"Don't ever read anybody's data from the SYSTEM account...."

The text read could write a whole command-procedure to
the answer-back buffer, then tell it to answer-back! The
result would be the execution of anything from a privileged
account.

I don't think the built-in VT100-220 emulation has an
answer-back buffer, but there still are RS-232C terminals
out there........


Cheers,
Dick Johnson
Penguin : Linux version 2.4.22 on an i686 machine (797.90 BogoMips).
            Note 96.31% of all statistics are fiction.



      parent reply	other threads:[~2003-10-17 12:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-17  1:36 Albert Cahalan
2003-10-17  9:52 ` Pavel Machek
2003-10-17 23:52   ` Albert Cahalan
2003-10-17 12:38 ` Richard B. Johnson [this message]

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=Pine.LNX.4.53.0310170834160.2962@chaos \
    --to=root@chaos.analogic.com \
    --cc=albert@users.sourceforge.net \
    --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

all inboxes | Powered by JetHome®