<div dir="ltr">The llvm-3.2 taint engine does not properly taint the results of a gets() call.<br><br>For gets(), since none of the function arguments are tainted, ProgramStateRef GenericTaintChecker::TaintPropagationRule::process() bails out early. Most other input functions take stdin as an argument; gets() is a special case, wherein stdin is implied.<br>
The attached patch includes a fix for this issue and a regression test case. This fix does slightly change the semantics of TaintPropagationRule, but I think it maintains correctness.<br>Note: this patch is against llvm/clang 3.2. Due to a bug, I can't use 3.3, and HEAD is too unstable for my purposes. My apologies if this bug has been fixed already!<br>
Also, I mistakenly submitted this patch as Bug 16475. If this is committed, could someone please close that bug? Thanks!<a href="http://llvm.org/bugs/show_bug.cgi?id=16475">http://llvm.org/bugs/show_bug.cgi?id=16475</a><br>
<br>Keaton Mowery</div>