zsh-workers
 help / color / mirror / code / Atom feed
From: "C. v. Stuckrad" <stucki@math.fu-berlin.de>
To: schaefer@nbn.com
Cc: Zsh workers list <zsh-workers@math.gatech.edu>
Subject: Re: Strange coredump in new zsh-3.0.1 on Sunos4.1.3 (FIXED)
Date: Sun, 3 Nov 1996 16:37:07 +0100 (MET)	[thread overview]
Message-ID: <Pine.GSO.3.95.961103162221.8490C-100000@petzval> (raw)
In-Reply-To: <961102102158.ZM23264@candle.brasslantern.com>

On Sat, 2 Nov 1996, Bart Schaefer wrote:

> zsh is picking an arbitrary value of 20 for the OPEN_MAX constant.  If
> zclose() is being called on fd=19, chances are that at some previous
> time the fdtable[] array was overflowed and trampled on max_zsh_fd.
> 
> Chances are further that the reason for this is that `screen' is leaving
> way too many file descriptors open when it forks off children.  This is
> actually a potential security problem, because a program written to expect
> this behavior might obtain access to a pseudo-tty that it was not supposed
> to be able to access.
> 
> I seem to recall patching at least one version of `screen' to close down
> file descriptors when forking children, but that was years ago; I very
> seldom use `screen' any more since it became gnuware (no, not *because*
> it did), and I quit hacking on it even before that.

OK, setting OPEN_MAX to 64 (and applying Zoltan's fix too)
did get rid of the bug. 

Thanks a lot !

BUT, it might be something totally different than I thought, NOT 'screen'
but 'ssh' (sshd), The secure-shell- programs from Tatu Ylonen
do open and pass on a filedescriptor to all their descendants.

This filedescriptor is 'constructed' by a test-program, and seems to
somehow get a definite number. And I saw this descriptor being the LAST
POSSIBLE Number (64!).

Our 'screen' is patched to NEVER close this descriptor (knowing it's
Number by an environment variable). Before this patch screen did close
nearly all descriptors (specially the needed one :-)

So zsh on screen on sshd might have died on that ...

For now your repair seems to have worked, and I wait for the users to
complain with now problems :-))

Thanks a lot,   sincerely your's     Stucki

Christoph von Stuckrad       * *  | talk to  | <stucki@math.fu-berlin.de> \
Freie Universitaet Berlin    |/_* | nickname | ...!unido!fub!leibniz!stucki|
Fachbereich Mathematik, EDV  |\ * | 'stucki' | Tel:+49 30 838-7545{9|8}    |
Arnimallee 2-6/14195 Berlin  * *  |  on IRC  | Fax:+49 30 838-5913        /


  reply	other threads:[~1996-11-03 15:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-02 15:25 Strange coredump in new zsh-3.0.1 on Sunos4.1.3 C. v. Stuckrad
1996-11-02 15:30 ` Strange coredump in new zsh-3.0.1 on Sunos4.1.3 (2) C. v. Stuckrad
1996-11-02 18:21   ` Bart Schaefer
1996-11-03 15:37     ` C. v. Stuckrad [this message]
1996-11-03 18:44       ` Strange coredump in new zsh-3.0.1 on Sunos4.1.3 (FIXED) Bart Schaefer
1996-11-03 21:25         ` Zoltan Hidvegi
1996-11-02 22:18 ` Strange coredump in new zsh-3.0.1 on Sunos4.1.3 Zoltan Hidvegi

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.GSO.3.95.961103162221.8490C-100000@petzval \
    --to=stucki@math.fu-berlin.de \
    --cc=schaefer@nbn.com \
    --cc=zsh-workers@math.gatech.edu \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).