mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Glen Turner <glen.turner@aarnet.edu.au>
To: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: Pavel Machek <pavel@ucw.cz>, Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Kumar Gala <galak@kernel.crashing.org>,
	linux-kernel@vger.kernel.org
Subject: Re: 8250 serial console fixes -- issue
Date: Tue, 07 Feb 2006 14:30:38 +1030	[thread overview]
Message-ID: <43E81B66.5060502@aarnet.edu.au> (raw)
In-Reply-To: <20060206205459.GB9388@flint.arm.linux.org.uk>


[Noting that I know next-to-nothing about kernel programming,
  but I have been down this particular road before...]

Russell King wrote:
 > Maybe flush_old_exec() should be a little more careful
 > about what it copies, changing non-alphanumeric characters
 > to '?' ?

I'm not sure it can do that, if the kernel policy is to
be 8-bit clean (to allow UTF-8 to work without coding
UTF-8 knowledge into the kernel).

What the code could do is not printk() user-influenced strings
at all. For example, mm/oom_kill.c could print just the process
ID here:

   printk(KERN_ERR "Out of Memory: Killed process %d (%s).\n",
          p->pid, p->comm);


The usual solution to this problem is to mark user-derived
strings as tainted and then check for the taint attribute
when strings are requested to be output.  But since this
is a kernel I don't suppose you'd be keen doing that :-)

I suppose you need a policy decision -- are strings scrubbed
on input (I've coded this once and it is really quite tricky).
And then do you need a scrubbed and non-scrubbed version of
p->comm (as comparing scrubbed p->comm for equality is
problematic and probably expolitable). Or do you simply not
output strings which have been tainted by contact with users.

-- 
  Glen Turner         Tel: (08) 8303 3936 or +61 8 8303 3936
  Australia's Academic & Research Network  www.aarnet.edu.au

  reply	other threads:[~2006-02-07  4:02 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-02  1:21 Kumar Gala
2006-02-02  1:47 ` Alan Cox
2006-02-02  5:54   ` Kumar Gala
2006-02-02  8:05     ` Kumar Gala
2006-02-02 17:10       ` Kumar Gala
2006-02-03  1:58   ` Glen Turner
2006-02-03  9:40     ` Russell King
2006-02-03 14:27       ` Glen Turner
2006-02-03 16:02         ` Russell King
2006-02-03 17:08           ` Glen Turner
2006-02-03 22:23             ` Russell King
2006-02-04 11:15               ` Russell King
2006-02-04 16:18               ` Krzysztof Halasa
2006-02-04 23:16                 ` Russell King
2006-02-04 23:54                   ` Krzysztof Halasa
2006-02-05  0:00                     ` Russell King
2006-02-05 12:57                       ` Krzysztof Halasa
2006-02-03 17:46           ` Krzysztof Halasa
2006-02-03 22:13             ` Russell King
2006-02-04 16:08               ` Krzysztof Halasa
2006-02-04 23:20                 ` Russell King
2006-02-05  3:12                   ` Glen Turner
2006-02-05 21:26                     ` Krzysztof Halasa
2006-02-06  9:47                     ` Russell King
2006-02-07  3:27                       ` Glen Turner
2006-02-03 15:05       ` Kumar Gala
2006-02-06 20:26       ` Pavel Machek
2006-02-06 20:55         ` Russell King
2006-02-07  4:00           ` Glen Turner [this message]
2006-02-07  9:18           ` Pavel Machek
2006-02-07 17:43             ` Russell King
2006-02-07 22:23               ` Krzysztof Halasa
2006-02-08  0:59               ` Junio C Hamano
2006-02-08  1:19                 ` Lee Revell
2006-02-03 10:00 linux

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=43E81B66.5060502@aarnet.edu.au \
    --to=glen.turner@aarnet.edu.au \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=galak@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rmk+lkml@arm.linux.org.uk \
    /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

Powered by JetHome