Skip to content
Tcl Source Code History Of Ticket 402924ffffffffff
Login

History Of Ticket 402924ffffffffff

Artifacts Associated With Ticket 402924ffffffffff

  1. Ticket change [d5fd2675e7] (rid 123729) by rmax on 2000-12-19 14:52:45:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to: " "
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "rmax"
    9. subsystem initialized to: ""
    10. title initialized to: "Fix for race condition in tcl/tclUnixPipe.c"
    11. type initialized to: "Patch"
  2. Add attachment "None" [0e888d8075] (rid 94632) by rmax on 2000-12-19 21:52:45.

  3. Ticket change [64e5d5725a] (rid 92851) by rmax on 2000-12-19 21:54:36:

    1. icomment:
      oops, the path in the summary should read unix/tclUnixPipe.c
      
      
    2. login: "rmax"
    3. mimetype: "text/plain"
    4. username: "rmax"
  4. Ticket change [96a1c078cb] (rid 106351) by andreas_kupries on 2000-12-21 16:34:02:

    1. icomment:
      To which bug does this patch belong to ?
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. title changed to: "Fix for race condition in unix/tclUnixPipe.c"
    5. username: "andreas_kupries"
  5. Ticket change [d9950aebca] (rid 107636) by rmax on 2000-12-21 17:18:52:

    1. 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.
      
      
      
    2. login: "rmax"
    3. mimetype: "text/plain"
    4. username: "rmax"
  6. Ticket change [3e485eef32] (rid 121234) by dgp on 2001-02-22 07:00:35:

    1. subsystem changed to: "27. Channel Types"
  7. Ticket change [a44cf664f9] (rid 110185) by hobbs on 2001-03-29 08:38:49:

    1. assignee changed to: "hobbs"
    2. 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.
      
      
    3. login: "hobbs"
    4. mimetype: "text/plain"
    5. username: "hobbs"
  8. Ticket change [e4884ae1f6] (rid 87968) by hobbs on 2001-03-29 08:39:14:

    1. 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.
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. username: "hobbs"
  9. Ticket change [a3358c55a4] (rid 110015) by rmax on 2001-03-29 13:13:54:

    1. 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.
      
      
      
    2. login: "rmax"
    3. mimetype: "text/plain"
    4. username: "rmax"
  10. Ticket change [4eb459048b] (rid 125689) by hobbs on 2001-03-30 03:59:56:

    1. closedate changed to: "2001-03-29T20:59:56"
    2. closer changed to: "hobbs"
    3. 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.
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "hobbs"