Skip to content
Tcl Source Code History Of Ticket 51ded417dde97f04
Login

History Of Ticket 51ded417dde97f04

Artifacts Associated With Ticket 51ded417dde97f04

  1. Ticket change [6846d64693] (rid 152778) by dkf on 2017-04-02 22:59:04:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/html"
    4. comment initialized to:
      While it is fine to have Tcl's <code>Tcl_AppendPrintfToObj</code> (et al) accept <code>%p</code>, we definitely do not want that capability exposed to Tcl scripts. Therefore, we should add code to <i><b>make sure</b></i> that neither <code>format</code> nor <code>scan</code> support it; an error indicating a bad format sequence should be received in these cases. We might be getting it right now, but we need to be ever so careful as these have been areas which have had security errors in the past in other languages (the ones that just throw it to C's <tt>sprintf</tt>/<tt>sscanf</tt>). Much better safe than sorry.
      
    5. foundin initialized to: "trunk"
    6. is_private initialized to: "0"
    7. login: "dkf"
    8. priority initialized to: "5 Medium"
    9. resolution initialized to: "None"
    10. severity initialized to: "Minor"
    11. status initialized to: "Open"
    12. submitter initialized to: "dkf"
    13. subsystem initialized to: "10. Objects"
    14. title initialized to: "Need test to ensure %p is not exposed to scripts"
    15. type initialized to: "Bug"
  2. Ticket change [c24144cdd0] (rid 152779) by dkf on 2017-04-02 22:59:21:

    1. assignee changed to: "jan.nijtmans"
    2. login: "dkf"
    3. mimetype: "text/plain"
  3. Ticket change [465f443808] (rid 152784) by jan.nijtmans on 2017-04-03 12:54:34:

    1. icomment:
      Concern understood! However, since Tcl_AppendPrintfToObj uses the internal "format" machinery, it's not easy to generate an error out of this situation. Besides... Since on the script level, Tcl doesn't know pointers, it's actually not dangerous at all!
      
      Since "%p" is equal to "%#llx" on 64-bit platforms and "%#x" on 32-bit platforms, there is no way that pointers values can be accessed. Added test-cases now to show that. Since neither "%#llu" nor "%#u" form any security risk, I claim that neither does "%p". The danger only occurs when a pointer is addressed, but that's impossible to be done from the script level. Only printing the value can never do any harm.
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/plain"
  4. Ticket change [f1ab52e482] (rid 152837) by jan.nijtmans on 2017-04-05 09:49:22:

    1. login: "jan.nijtmans"
    2. mimetype: "text/plain"
    3. resolution changed to: "Works For Me"
    4. status changed to: "Pending"
  5. Ticket change [21d67ac767] (rid 153500) by jan.nijtmans on 2017-05-03 12:25:25:

    1. closedate changed to: "2457877.01765642"
    2. closer changed to: "jan.nijtmans"
    3. login: "jan.nijtmans"
    4. mimetype: "text/plain"
    5. status changed to: "Closed"