Artifacts Associated With Ticket 402924ffffffffffffffffffffffffffffffffff
Ticket change [d5fd2675e7] (rid 123729) by rmax on 2000-12-19 14:52:45:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to: " "
- foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "rmax"
- subsystem initialized to: ""
- title initialized to: "Fix for race condition in tcl/tclUnixPipe.c"
- type initialized to: "Patch"
Add attachment "None" [0e888d8075] (rid 94632) by rmax on 2000-12-19 21:52:45.
Ticket change [64e5d5725a] (rid 92851) by rmax on 2000-12-19 21:54:36:
- icomment:
oops, the path in the summary should read unix/tclUnixPipe.c
- login: "rmax"
- mimetype: "text/plain"
- username: "rmax"
- icomment:
Ticket change [96a1c078cb] (rid 106351) by andreas_kupries on 2000-12-21 16:34:02:
- icomment:
To which bug does this patch belong to ?
- login: "andreas_kupries"
- mimetype: "text/plain"
- title changed to: "Fix for race condition in unix/tclUnixPipe.c"
- username: "andreas_kupries"
- icomment:
Ticket change [d9950aebca] (rid 107636) by rmax on 2000-12-21 17:18:52:
- icomment:
Am I supposed to create a bug entry before I submit a patch? This patch fixes a security leak that makes Tcl vulnerable to symlink attacks when it creates temporary files. I was pointed to this by our security experts.
- login: "rmax"
- mimetype: "text/plain"
- username: "rmax"
- icomment:
Ticket change [3e485eef32] (rid 121234) by dgp on 2001-02-22 07:00:35:
- subsystem changed to: "27. Channel Types"
Ticket change [a44cf664f9] (rid 110185) by hobbs on 2001-03-29 08:38:49:
- assignee changed to: "hobbs"
- icomment:
Logged In: YES user_id=72656 No need to create a bug first is necessary, but a bit of explanation is always nice. :^) In the case of this patch, it does change the meaning of the open call from truncating any existing file to throwing an error if the file exists. Of course, this shouldn't happen with tmpnam and all, but then I wonder how it is a security leak? I'm inclined to believe the security guys, I just wanted to know more about how a problem could occur.
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
Ticket change [e4884ae1f6] (rid 87968) by hobbs on 2001-03-29 08:39:14:
- icomment:
Logged In: YES user_id=72656 No need to create a bug first is necessary, but a bit of explanation is always nice. :^) In the case of this patch, it does change the meaning of the open call from truncating any existing file to throwing an error if the file exists. Of course, this shouldn't happen with tmpnam and all, but then I wonder how it is a security leak? I'm inclined to believe the security guys, I just wanted to know more about how a problem could occur.
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
- icomment:
Ticket change [a3358c55a4] (rid 110015) by rmax on 2001-03-29 13:13:54:
- icomment:
Logged In: YES user_id=124643 It is only a very tight race condition, but it exists. If someone creates a symlink in the time between tmpnam() and open() that has the same name as the temporary file you are about to open, the target file of this symlink will be deleted, if open is called with O_TRUNC. Adding O_NOFOLLOW instead of replacing O_TRUNC with O_EXCL may also help, but seems to be less portable. BTW, the manpage of tmpnam says: BUGS Never use this function. Use mkstemp(3) instead. - login: "rmax"
- mimetype: "text/plain"
- username: "rmax"
- icomment:
Ticket change [4eb459048b] (rid 125689) by hobbs on 2001-03-30 03:59:56:
- closedate changed to: "2001-03-29T20:59:56"
- closer changed to: "hobbs"
- icomment:
Logged In: YES user_id=72656 And on Solaris, the USAGE notes say: ... The tmpfile(3S) function is preferred over this function. ... Each seems to have problems, so I'll just do the O_EXCL for now. If someone wants to make a larger patch the goes with the conflicting advice of OSes, that should be separate. I've patched as per the original suggestion for 8.4a2/8.3.3. - login: "hobbs"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "hobbs"