<i>binary scan segfaults when too much a is requested</i> status still Open with 3 other changes
by
.
D 2017-05-03T06:21:31.268
J icomment playing\saround\sin\sgdb\son\score-8-5-branch,\sthe\sproblem\sin\sthis\scase\sseems\sto\sbe\sthat\safter\sGetFormatSpec(&format,\s&cmd,\s&count,\s&flags),\scount\sis\sadded\sto\soffset\smaking\sit\spoint\soutside\sthe\sbuffer.\r\n\r\nSpecifically,\sthis\sis\swrong:\r\n\r\nGetFormatSpec(\s..\sint\s*countPtr\s..\s)\s{\r\n\s\s\s(*countPtr)\s=\sstrtoul(\s..\s)\r\n}\r\n\r\nSimilar\sissue\slikely\sexists\sin\s[binary\sformat].\r\n\r\nSimplest\sfix\sis\sprobably\sto\sreturn\s0\sif\sthe\sstrtoul()\sresult\sis\s<0.\s\sElse\sTcl_BinaryObjCmd()\sneeds\sto\scheck\safter\seach\scall\swhether\scount\sis\sBINARY_UNSIGNED,\sBINARY_ALL,\s>=0\sand\sotherwise\sTCL_ERROR.\r\n\r\nNote:\s\sthis\slooks\slike\sa\srelatively\seasily\sexploitable\smemory\scorruption\sbug,\sfor\sanywhere\suntrusted\susers\scan\sprovide\sformat\sarguments\sto\s[binary].
J login aspect
J mimetype text/plain
K 6015221f59fd742aac833c7a4521de9745c8c868
U aspect
Z 56e7a2aa9bd6731f842cd14e04ed44b4