<i>segfault in Tcl_EvalObjv (from Tcl_EvalObjEx call)</i> status still Open with 4 other changes
by
.
D 2005-02-10T03:48:42
J icomment Logged\sIn:\sYES\s\nuser_id=190660\n\nI've\sverified\sthe\sproposed\spatch\sis\sinsufficient.\s\sIt\sis\nstill\sexposed\sto\sexecution\sleave\straces\saccessing\san\sinvalid\nobjv.\nBelow\sis\sanother\sexploit\sscript\sbased\son\sTcl8.4\sexecution\nleave\strace.\nI\sinterpret\sthis\sto\smean\sthat\sTclEvalObjvInternal\salso\sneeds\nthe\sobjPtr\sarg.\nMoreover,\sthe\scheck\sprobably\sneeds\sto\sbe\sexpanded\sto\nsomething\slike:\n\n\s\s(((List\s*)\sobjPtr->internalRep.twoPtrValue.ptr1)->elements\n==\sobjv)\s&&\n\s\s/*\ssame\scheck\sfor\sobjc\shere.\s\s*/\n\nIronically,\sobjv\scould\stheoretically\sbe\sfreed\sand\nreallocatted\sto\sthe\ssame\sblock\sand\ssize\s(ie.\sback\sto\sa\slist\nagain)\sbut\salthough\snot\scorrect,\sthe\nexecution\spath\swould\sat\sleast\sbe\ssafeguarded\sfrom\ssegfaulting.\n\n\n\n\n\s\s\n######\sSCRIPT\sBEGIN\n\nset\sSRC\s[list\sFoo\s1]\nset\sN\s0\nproc\s::Foo\sstr\s{\n\s\sputs\s"FOO:\s$str"\n\s\sif\s{[incr\s::N]<3}\s{\n\s\s\s\snamespace\seval\s::\s$::SRC\n\s\s}\selse\s{\n\s\s\s\serror\s"BAD\sCALL"\n\s\s}\n}\nproc\s::Trc\sargs\s{\sputs\s"Trc:\s$args"\s}\ntrace\sadd\sexecution\sFoo\sleave\sTrc\nuplevel\s#0\s$SRC\n\n######\sSCRIPT\sEND\n
J login pcmacdon
J mimetype text/plain
J username pcmacdon
K 1119369fffffffffffffffffffffffffffffffff
U pcmacdon
Z dfb7146360b003f95fc2bb0336ead7dd