.
D 2013-09-25T13:04:16.316
J assignee nobody
J closer nobody
J cmimetype text/plain
J comment This\sexample\shangs\stclsh\sin\sversions\sI\shave\shandy\sto\stest:\r\n\r\nregexp\s{(^(?!aa))+}\s{aa\sbb\scc}\r\n\r\nI\sbelieve\sthis\sdemonstrates\sthat\sthe\sresponse\sto\sCVE-2007-4772\s(Tcl\sbug\s1810038)\swas\sinadequate.\r\nWe\sprevented\sa\shang\sin\scases\swhere\sa\sstate-to-be-pulled-past\shas\sa\strivial\scircular\sconstraint\sarc.\s\sBut\sin\sthe\sabove\sexample,\sthere\sis\sa\sloop\sof\stwo\sstates\sconnected\sby\sconstraint\sarcs,\sand\sthe\scode\sgets\sinto\san\sinfinite\sloop\strying\sto\spush\sback\sthe\sconstraints\sindefinitely.\s\sWhile\sI've\snot\sexperimented\sto\sprove\sit,\sI\sthink\sthat\sloops\sof\sany\snumber\sof\sstates\scould\sbe\sbuilt\sby\sextending\sthis\sexample,\sso\sthe\squick-hack\ssolution\sembodied\sin\sthe\sprevious\sfix\scan't\sreadily\sbe\simproved\sto\shandle\sthis.\r\n\r\nOne\spossible\sline\sof\sattack\sto\sfix\sthis\sis\sto\sreplace\sthe\sprevious\scheck\swith\sa\sgeneric\ssearch\sto\ssee\sif\sthe\scurrent\sstate\sis\sincluded\sin\sany\scircular\schain\sof\sconstraint\sarcs.\s\sThat\smight\sbe\sexpensive\sthough.\r\n\r\nAnother\sidea\sis\sto\ssimply\sexclude\sany\sstates\screated\sduring\spull()\sfrom\ssubsequent\sprocessing\sin\spullback(),\swhich\swe\scould\sdo\sby\sremembering\sthe\slargest\sstate\snumber\sat\sentry\sto\spullback()\sand\signoring\sstates\swith\shigher\snumbers.\r\n\r\nA\squestion\sfor\seither\sof\sthese\sapproaches\sis\swhether\sthe\spullback\sprocessing\sis\snecessary\sfor\scorrectness\s(because\sit\ssatisfies\ssome\sexecution-time\sassumption)\sor\sis\sjust\san\soptimization\sthat\scan\ssafely\sbe\sskipped\sin\ssome\scases.\s\sI\sthink\sthe\slatter\sbut\sam\snot\sexactly\ssure.\r\n\r\nThoughts?
J foundin 8.5.13
J is_private 0
J login tgl
J priority 5\sMedium
J private_contact 26864b65f1c6ce8bda86f87ed9c554e19ac0390d
J resolution None
J severity Important
J status Open
J submitter tgl
J subsystem 43.\sRegexp
J title Another\scase\sthat\shangs\sregexp\soptimizer\spullback()\sphase
J type Bug
K 8f245009b0bde00454c3cecfef1d230596f78b51
U tgl
Z 7e8b280723ab8f10e2af7fb0025be666