mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Fredrik Tolf <fredrik@dolda2000.cjb.net>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: PTY DOS vulnerability?
Date: Mon, 30 Jun 2003 23:31:38 +0200	[thread overview]
Message-ID: <200306302331.38071.fredrik@dolda2000.cjb.net> (raw)
In-Reply-To: <1056995729.17590.19.camel@dhcp22.swansea.linux.org.uk>

I'll summarize some of the answers:

On Monday 30 June 2003 19:55, Alan Cox wrote:
> On Llu, 2003-06-30 at 15:18, Fredrik Tolf wrote:
> > Shouldn't PTYs be a per-user resource limit?
>
> It depends to what degree you consider your users hostile. But
> yes its possibly one of the things to do per user counting on.

It isn't necessarily an entitled user; see below. But even if it 
is, I think it should be able to limit it, just as it is 
possible to put a limit on processes.

On Monday 30 June 2003 17:52, Marcelo Bezerra wrote:
> On Mon, 2003-06-30 at 11:18, Fredrik Tolf wrote:
> > Shouldn't PTYs be a per-user resource limit?
>
> This would help, but not solve.
>
> Once he roots your box, he can easly change the script to
> setuid each uid possible and request all ptys it can.
>
> Or he could run it as root, without the limit.

That is provided that he is able to root the system. Take for 
example Apache, a program that is relatively often cracked. It, 
as many other programs, doesn't run as root. If the attacker 
could tie up all PTYs, though, he could go on his business 
(extracting confidential information, subnet scanning, etc.) 
without root being able to log in to stop him. Instead, the 
admimistrator might have to call the datacenter to get them to 
reboot the box.
Of course, if the attacker is able to root the box, it doesn't 
help very with a resource limit, but that's more of an issue for 
the grsecurity project, isn't it?

On Monday 30 June 2003 16:24, Mark Hahn wrote:
> pty's are not required for ssh activity, though they would
> make it tricker.

That is true, though, of course. Stupid me not to think about 
that. However, that means that an administrator who could find 
himself being under such an attack might not think about it 
either. Also, from the outside, the ssh client just does 
nothing, making it look as if the server is unresponsive. Of 
course, the exact error is logged to the server's syslog, but if 
you can't view it, then you won't know about it.

So all in all, do you think I should implement a per-user 
resource limit on PTYs?

Fredrik Tolf


  reply	other threads:[~2003-06-30 21:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-30 14:18 Fredrik Tolf
2003-06-30 17:55 ` Alan Cox
2003-06-30 21:31   ` Fredrik Tolf [this message]
2003-06-30 21:36     ` Alan Cox
2003-07-01 12:15       ` Jesse Pollard
2003-07-01 13:41       ` Timothy Miller
2003-07-01  6:22 ` Oleg Drokin
2003-07-01 11:57 ` Jesse Pollard
2003-07-01 19:53   ` Helge Hafting
2003-07-02  6:42     ` Paul Rolland
2003-07-03  1:14     ` Jesse Pollard
2003-07-03  1:52       ` H. Peter Anvin
2003-07-08 23:11 Clayton Weaver
2003-07-09 10:08 ` Svein Ove Aas

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=200306302331.38071.fredrik@dolda2000.cjb.net \
    --to=fredrik@dolda2000.cjb.net \
    --cc=alan@lxorguk.ukuu.org.uk \
    --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®