Subject: Re: fd 0/1/2
To: Artur Grabowski <art@blahonga.org>
From: Patrick Welche <prlw1@newn.cam.ac.uk>
List: tech-security
Date: 05/15/2002 14:20:41
On Tue, May 14, 2002 at 07:49:54PM +0200, Artur Grabowski wrote:
> itojun@iijlab.net writes:
> 
> > 	sorry for dumb question - does it affect us?
> > 
> > itojun
> 
> I'm pretty sure it doesn't. The code that was imported into NetBSD from FreeBSD
> already had the problem fixed.
> 
> I screwed up. I noticed this problem ages ago while debugging some other
> issue in that code, but instead of fixing it I just added a comment and forgot
> about it.
> 
> On the other hand. I think you should check for the problem I was debugging
> at that time. Since your code does a namei on /dev/null, you should really
> make sure that the exec:ed vnode is not vop_locked otherwise there is a great
> risk for directory locks creeping up to / before the namei and namei will
> deadlock. (Ignore me if the vnode is unlocked earlier in your exec code).
> 
> This code is triggered all the time by qmail (or was it postfix?), so if you
> have users complaining about qmail/postfix locking up the machine, that namei
> is where I'd start looking for problems.

If you do get a warning message:

set{u,g}id pid 17149 (exim-4.04-1) was invoked b y uid 104 ppid 209 (exim-4.04-1) with fd 0,1,2 closed

what should you do about it?

Cheers,

Patrick