Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 02cc03cf2fff37e199e55aa39ae4bc1ab9cc40309ce02aceebdc7b5931278183
Ticket: a6ba4e271400a01a17b9e07f65304252872005c7
leaking NTLM Hashes vulnerability & Denial Of Service vulnerability
User & Date: sebres on 2022-03-07 19:54:47
Changes

  1. closedate changed to: "2459646.32972076"
  2. closer changed to: "sebres"
  3. icomment:
    <blockquote><i>> Denial of Service vulnerability</i></blockquote>
    
    Neither this is a DoS vulnerability, nor this has something to do with vulnerability at all.
    
    Every kind of unverified user input evaluating directly in script language processor is evil. Even a simplest busy loop, like <code>while 1 {}</code> may block a thread with full load.
    
    <blockquote><i>> this informations shows that wish.exe and wish86.exe are crashed</i></blockquote>
    
    They are not crashed but controlled terminated (panic to stdout and exit with error code).
    Your Tcl seems to be 32-bit version, thus it is subject to the same restrictions as any onther 32-bit process (cannot allocate more than 2GB memory), what an evaluation of such long (unknown) command may imply.
    
    Similar behavior you could see using this (depending on version):
    <pre><code>
    > echo puts -nonewline "eval "; puts [string repeat A 1000000000];  | tclsh86 | tclsh86
    unable to realloc 478150625 bytes
    </code></pre>
    
    Basically NOMEM is an extraordinary situation so there is almost nothing one can do to avoid this excepting probably an attempt to show a message box with error in UI case (in tk applicaion, e.g. using wish). Simplest way to achieve that would be to set another panic handler with <code>Tcl_SetPanicProc</code> which would try to show native message box and then exit.
    
    There are many corner cases where one'd need to "fix" it, but the effort and costs are too large to handle NOMEM in some different way, e. g. stop command/script evaluation only and put an error "invalid command" (which may be again too long for this particular case).
    
    And last but not least, neither any "fix", nor a 64-bit build of the Tcl library would make it safe either.<br/>
    Such an unfiltered foreign input evaluated in tcl directly can open much more attack vectors than simple DoS, because the script would evaluate everything in context of the user and so can do basically everything what permissions allow, for instance delete files or directories, send spam, build a small PE (virus) and start them hereafter, etc. 
    But this is not matter of Tcl and valid for every script language.
    
  4. login: "sebres"
  5. mimetype: "text/x-fossil-wiki"
  6. resolution changed to: "Invalid"
  7. status changed to: "Closed"
  8. subsystem changed to: "41. Memory Allocation"