Skip to content
Tcl Source Code History Of Ticket 8aa32fadb361b076
Login

History Of Ticket 8aa32fadb361b076

Artifacts Associated With Ticket 8aa32fadb361b076

  1. Ticket change [d2c79b3a84] (rid 135789) by anonymous on 2013-12-03 17:22:42:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      [root@<removed> fuzz]# cat libtcl85.py
      #
      # _tkintter createfilehandler() crash poc
      #
      import _tkinter
      def errback(*args, **kw):
              raise ValueError('error')
      
      _tkinter.createfilehandler(674664117164,59.58,errback)
      [root@eagle876 fuzz]# gdb --args python libtcl85.py
      GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6_4.1)
      Copyright (C) 2010 Free Software Foundation, Inc.
      License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
      and "show warranty" for details.
      This GDB was configured as "x86_64-redhat-linux-gnu".
      For bug reporting instructions, please see:
      <http://www.gnu.org/software/gdb/bugs/>...
      Reading symbols from /usr/bin/python...(no debugging symbols found)...done.
      Missing separate debuginfos, use: debuginfo-install python-2.6.6-37.el6_4.i686 python-2.6.6-37.el6_4.x86_64
      (gdb) r
      Starting program: /usr/bin/python libtcl85.py
      [Thread debugging using libthread_db enabled]
      libtcl85.py:8: DeprecationWarning: integer argument expected, got float
        _tkinter.createfilehandler(674664117164,59.58,errback)
      
      Program received signal SIGSEGV, Segmentation fault.
      0x00007ffff05879cd in Tcl_CreateFileHandler () from /usr/lib64/libtcl8.5.so
      (gdb) q
      
      
      The second parameter typically contains an int, when provided a float a crash occurs in libtcl8.5.so.
      
    5. foundin initialized to: "libtcl8.5.so"
    6. is_private initialized to: "0"
    7. login: "anonymous"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "1f7635c52815ebebd8c66e0e9ce88f6aba7b030e"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "anonymous"
    14. subsystem initialized to: "16. Commands A-H"
    15. title initialized to: "Tcl_CreateFileHandler crash"
    16. type initialized to: "Bug"
  2. Ticket change [065f99a9cd] (rid 135795) by anonymous on 2013-12-03 21:56:33:

    1. comment changed to:
      [root@<removed> fuzz]# cat libtcl85.py
      #
      # Libtcl 8.5 createfilehandler() crash poc
      #
      # Level was here
      #
      import _tkinter
      def errback(*args, **kw):
              raise ValueError('error')
      
      _tkinter.createfilehandler(674664117164,59.58,errback)
      [root@eagle876 fuzz]# gdb --args python libtcl85.py
      GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6_4.1)
      Copyright (C) 2010 Free Software Foundation, Inc.
      License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
      and "show warranty" for details.
      This GDB was configured as "x86_64-redhat-linux-gnu".
      For bug reporting instructions, please see:
      <http://www.gnu.org/software/gdb/bugs/>...
      Reading symbols from /usr/bin/python...(no debugging symbols found)...done.
      Missing separate debuginfos, use: debuginfo-install python-2.6.6-37.el6_4.i686 python-2.6.6-37.el6_4.x86_64
      (gdb) r
      Starting program: /usr/bin/python libtcl85.py
      [Thread debugging using libthread_db enabled]
      libtcl85.py:8: DeprecationWarning: integer argument expected, got float
        _tkinter.createfilehandler(674664117164,59.58,errback)
      
      Program received signal SIGSEGV, Segmentation fault.
      0x00007ffff05879cd in Tcl_CreateFileHandler () from /usr/lib64/libtcl8.5.so
      (gdb) q
      
      
      The second parameter typically contains an int, when provided a float a crash occurs in libtcl8.5.so.
      
    2. login: "anonymous"
    3. mimetype: "text/plain"
  3. Ticket change [5c431bb007] (rid 135796) by dkf on 2013-12-04 09:05:03:

    1. assignee changed to: "aku"
    2. foundin changed to: "8.5"
    3. login: "dkf"
    4. mimetype: "text/plain"
    5. subsystem changed to: "25. Channel System"
  4. Ticket change [774cd89763] (rid 136375) by dkf on 2014-01-05 16:31:17:

    1. icomment:
      Trying to force a float (<code>double</code>?) into a <code>int</code> will never be a good thing (especially if it is ending up changing the width of the argument on the stack!). That API function is <i>specifically</i> <a href="http://www.tcl.tk/man/tcl8.5/TclLib/CrtFileHdlr.htm">documented</a> as taking an integer second argument; the bug must be in the code that glues Python to Tcl (which should reject or cast a float second argument; I don't care which).<p>We don't maintain the tkinter package. Not our bug.
      
    2. login: "dkf"
    3. mimetype: "text/html"
    4. resolution changed to: "Invalid"
    5. status changed to: "Pending"
    6. username: "dkf"
  5. Ticket change [0501051dde] (rid 256758) by serhiy.storchaka on 2026-09-20 10:46:49:

    1. icomment:
      The float was converted to 59 by Python (hence the DeprecationWarning); the crash comes from the descriptor: 674664117164 was truncated to a C int (354251692) by Python 2.6, and the select notifier passes any descriptor to <tt>FD_SET()</tt> without checking it against FD_SETSIZE, so it writes outside the <tt>fd_set</tt>. The same happens with any descriptor >= FD_SETSIZE (1024 on Linux), valid or not; with 8.6.17 and a fortified glibc: "bit out of range 0 - FD_SETSIZE on fd_set". Python 3 rejects the descriptor and the float mask of this script (OverflowError, TypeError), but <tt>createfilehandler(5000, 1, callback)</tt> or a real channel with a descriptor >= FD_SETSIZE still aborts. The epoll notifier (default on Linux in 9.x) is not affected.
      
      This is [c6897e6e6a], which has the analysis and a proposed fix (note that rejecting descriptors when channels are created does not protect Tcl_CreateFileHandler() called by an application with its own descriptors).
      
    2. login: "serhiy.storchaka"
    3. mimetype: "text/x-fossil-wiki"
    4. resolution changed to: "Duplicate"
    5. status changed to: "Closed"
  6. Ticket change [e2b9d459c0] (rid 259878) by serhiy.storchaka on 2026-10-22 17:19:24:

    1. closedate changed to: "2461303.9491796526"
    2. closer changed to: "serhiy.storchaka"
    3. login: "serhiy.storchaka"