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

History Of Ticket 218964ffffffffff

Artifacts Associated With Ticket 218964ffffffffff

  1. Ticket change [fe738d7cd8] (rid 108590) by nobody on 2000-10-26 01:08:41:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 3336 Bug
      Version: 8.2.1
      SubmitDate: '1999-11-05'
      LastModified: '1999-12-04'
      Severity: CRIT
      Status: Released
      Submitter: techsupp
      ChangedBy: hobbs
      OS: Linux
      OSVersion: Debian (Potato)
      FixedDate: '1999-12-04'
      FixedInVersion: 8.2.3
      ClosedDate: '2000-10-25'
      
      
      Name: Patrick Earl
      
      
      
      Comments:
      
      This bug affects no less than 8.0.5, 8.2.0, and 8.2.1, probably the
      
      entire 8.x series.
      
      
      
      I did not search for other occurences of the same type of bug, where
      
      Tcl_UtfBackslash was called during the parsing of a counted string.
      
      Considering it can be remotely activated depending on the application,
      
      it is an important situation to check for.  If you would like, I would
      
      be willing to look over the rest of the Tcl code for the same situation,
      
      although since my knowledge of the Tcl codebase is limited, there may be
      
      people more appropriate for that job.
      
      
      
      ReproducibleScript:
      
      Called Tcl_ScanCountedElement with a hex sequence as the last portion of
      
      the string.  The string was not null terminated.
      
      
      
      ObservedBehavior:
      
      Tcl crashed and burned.  In Tcl_ScanCountedElement it called
      
      Tcl_UtfBackslash which parsed the backslash sequence without any regaurd
      
      to where Tcl_ScanCountedElement knows the string ends.
      
      Tcl_ScanCountedElement's loop checks for a != end condition, so if the
      
      end of your string happened to be \x01 and the next character in memory
      
      was a C, Tcl_UtfBackslash would parse it as \x01C and
      
      Tcl_ScanCountedElement would be messed up.
      
      
      
      DesiredBehavior:
      
      The loop should check for < instead of !=.
      
      
      
      Either that, or there could be an if statement after the
      
      Tcl_UtfBackslash statement checking to see if it went over, and
      
      rectifying the situation if it did.
      
      
      
      Patch:
      
      *** tclUtil.c   Fri May 21 19:20:13 1999
      
      --- tclUtil.c.new       Tue Oct  5 19:59:20 1999
      
      ***************
      
      *** 581,587 ****
      
            if ((p == lastChar) || (*p == '{') || (*p == '"')) {
      
              flags |= USE_BRACES;
      
            }
      
      !     for ( ; p != lastChar; p++) {
      
              switch (*p) {
      
                  case '{':
      
                      nestingLevel++;
      
      --- 581,587 ----
      
            if ((p == lastChar) || (*p == '{') || (*p == '"')) {
      
              flags |= USE_BRACES;
      
            }
      
      !     for ( ; p < lastChar; p++) {
      
              switch (*p) {
      
                  case '{':
      
                      nestingLevel++;
      
      
      
      PatchFiles:
      
      tclUtil.c
      
      
      
      Added to 8.2.3. 
      -- 12/04/1999 hobbs
      
    4. foundin initialized to: "obsolete: 8.2.1"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "69. Other"
    10. title initialized to:
      Tcl_ScanCountedElement causes sigsegv on input with \x near 
      
    11. type initialized to: "Bug"
  2. Ticket change [5bbe5f0372] (rid 118385) by welch on 2000-10-26 08:32:16:

    1. closedate changed to: "2000-10-26T01:32:16"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [f4b749d647] (rid 129971) by dgp on 2001-04-19 04:16:06:

    1. closedate changed to: "2001-04-18T21:16:06"
    2. closer changed to: "dgp"
    3. subsystem changed to: "10. Objects"