Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 5d11be0b900593b6266c608be5e6bef45654869e6450d84b33a6791a8270ea0e
Ticket: d051b77fc18d7340dbc7db61897461a8784ac32e
segmentation fault in tclStringObj.c, line 2405
User & Date: jfe on 2018-07-25 13:25:55
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    Hi,
    I am working on a project in which I use the afl fuzzer to find bugs in open-source software and I decided to fuzz tcl.
    In doing so, I discovered a segmentation fault in generic/tclStringObj.c, line 2405. Following is a detailed backtrace
    as supplied by the address sanitizer:
    
    ASAN:DEADLYSIGNAL
    =================================================================
    ==65478==ERROR: AddressSanitizer: SEGV on unknown address 0x629000090000 (pc 0x7f3ee8d2b9dc bp 0x000000000d68 sp 0x7fffcfede090 T0)
    ==65478==The signal is caused by a WRITE memory access.
        #0 0x7f3ee8d2b9db in _IO_default_xsputn (/lib/x86_64-linux-gnu/libc.so.6+0x7b9db)
        #1 0x7f3ee8d1ee65 in _IO_padn (/lib/x86_64-linux-gnu/libc.so.6+0x6ee65)
        #2 0x7f3ee8d02cf7  (/lib/x86_64-linux-gnu/libc.so.6+0x52cf7)
        #3 0x7f3ee8cfe360 in vfprintf (/lib/x86_64-linux-gnu/libc.so.6+0x4e360)
        #4 0x7f3ee8d200d0 in _IO_vsprintf (/lib/x86_64-linux-gnu/libc.so.6+0x700d0)
        #5 0x7f3eea43ba28 in vsprintf (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x9aa28)
        #6 0x7f3eea43be56 in sprintf (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x9ae56)
        #7 0x7f3ee9f90b3b in Tcl_AppendFormatToObj /home/jfe/tcl/generic/tclStringObj.c:2405
        #8 0x7f3ee9f97dc7 in Tcl_Format /home/jfe/tcl/generic/tclStringObj.c:2513
        #9 0x7f3ee9bc62b8 in TclCompileFormatCmd /home/jfe/tcl/generic/tclCompCmds.c:3184
        #10 0x7f3ee9dc16cd in TclAttemptCompileProc /home/jfe/tcl/generic/tclEnsemble.c:3256
        #11 0x7f3ee9d62c85 in CompileCmdCompileProc /home/jfe/tcl/generic/tclCompile.c:1947
        #12 0x7f3ee9d62c85 in CompileCommandTokens /home/jfe/tcl/generic/tclCompile.c:2062
        #13 0x7f3ee9d62c85 in TclCompileScript /home/jfe/tcl/generic/tclCompile.c:2193
        #14 0x7f3ee9d6404a in TclSetByteCodeFromAny /home/jfe/tcl/generic/tclCompile.c:800
        #15 0x7f3ee9dd8ebe in TclCompileObj /home/jfe/tcl/generic/tclExecute.c:1689
        #16 0x7f3ee9b28aab in TclNREvalObjEx /home/jfe/tcl/generic/tclBasic.c:5668
        #17 0x7f3ee9b29340 in TclEvalObjEx /home/jfe/tcl/generic/tclBasic.c:5546
        #18 0x7f3ee9e2bf3b in Tcl_RecordAndEvalObj /home/jfe/tcl/generic/tclHistory.c:182
        #19 0x7f3ee9ee4b61 in Tcl_MainEx /home/jfe/tcl/generic/tclMain.c:537
        #20 0x55db82b8fc62 in main /home/jfe/tcl/unix/tclAppInit.c:84
        #21 0x7f3ee8cd1a86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21a86)
        #22 0x55db82b8fc99 in _start (/home/jfe/tcl/unix/tclsh+0xc99)
    
    AddressSanitizer can not provide additional info.
    SUMMARY: AddressSanitizer: SEGV (/lib/x86_64-linux-gnu/libc.so.6+0x7b9db) in _IO_default_xsputn
    ==65478==ABORTING
    
    This bug can be reproduced by running:
    echo "format %6600000000g 0"|tclsh
    
    cheers,
    project-repo
    
  5. foundin changed to: "9.0a0 source distribution"
  6. is_private changed to: "0"
  7. login: "jfe"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "3d546a40bbabbab36e7a717488c01c05ed9eb24a"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "jfe"
  14. subsystem changed to: "47. Bytecode Compiler"
  15. title changed to: "segmentation fault in tclStringObj.c, line 2405"
  16. type changed to: "Bug"