Tcl Source Code

View Ticket
Login
Ticket UUID: 772581
Title: children inherit 2 open pipes (security?)
Type: Bug Created on: 2003-07-16 20:23:55
Submitter: xtifr Assigned to: vasiljevic
Subsystem: 49. Threading Severity:
Priority: 5 Medium Last modified: 2026-10-22 17:19:32
Status: Closed Closed by: serhiy.storchaka
Resolution: Fixed Closed on: 2026-10-21 10:03:40
Version: obsolete: 8.4.3
Description:
As reported by Debian's SELinux (Security Enhanced
Linux) maintainer, Russell Coker, in
<http://bugs.debian.org/201062>: the threaded *nix
versions of tcl seem to open a pair of pipes, and the
filehandles are not set to close-on-exec.  Quoting
Russell: "If the program runs in a different security
context then these open file handles may allow the
program to interfere with the operation of expect [or
tclsh or whatever] and therefore gain undesired access
to the system."

Normally, of course, pipes should be inherited by
children (that's their whole purpose), but these pipes
seem to be used just for internal communications
between threads, as far as I can tell.  I'm not 100%
sure this is a bug, but if it is, then I'm fairly sure
it's an important one, and should probably be fixed
before 8.4.4 is released.

cheers
User Comments:
vasiljevic added on 2003-10-16 16:29:54:
Logged In: YES 
user_id=95086

Andreas, should I take over this one?

andreas_kupries added on 2006-03-15 05:14:15:
Logged In: YES 
user_id=75003

Boy, am I late. Yes please.

serhiy.storchaka added on 2026-10-21 10:03:40:

Fixed in 8.6.0 by [5a5e87fae7] and in 8.5.13 by [662a69f571] ([2417695]): the notifier's internal pipe is close-on-exec, so exec'd children no longer inherit it.