Re:Why was "goto fail;" added without any other change to th...
by lyngvi on Friday February 28, 2014 @10:11AM
(#7319077)
++ on mismerge. The change likely won't impact the output binary - compiler should issue a warning, which devs might ignore; then the optimizer would remove it as unreachable.
Perhaps the developer deliberately allowed that mismerge to give himself an aura of incompetence/sloppiness, enhancing his plausible deniability when it is discovered that one of his other changes led to an insidious vulnerability. But more likely it was just an accident - if he were malicious, the effect of bringing attention to his code would be highly undesirable.
Re:Why was "goto fail;" added without any other change to th...
by shawabawa3 on Friday February 28, 2014 @11:41AM
(#7319816)
> The change likely won't impact the output binary - compiler should issue a warning, which devs might ignore; then the optimizer would remove it as unreachable.
It's not unreachable - it always executes if the if condition is false.
Re:Why was "goto fail;" added without any other change to th...
by lyngvi on Tuesday March 04, 2014 @08:18PM
(#7344594)
D'oh. That's what I get for not paying attention and looking at the indentation instead of for braces. Still, my bet's on mismerge first - though it'd be worth reviewing that committer's other changes.
Re:Why was "goto fail;" added without any other change to th...
by cjbprime on Friday February 28, 2014 @01:58PM
(#7320726)
The unconditional "goto out" makes the code beneath that condition but before the "out:" label unreachable code.
Re:Why was "goto fail;" added without any other change to th...
by 0x006A on Friday February 28, 2014 @10:20AM
(#7319141)
yes the code above looks like a search and replace of ReadyHash(&SSLHashSHA1, &hashCtx, ctx)) with ReadyHash(&SSLHashSHA1, &hashCtx, ctx)) but while doing that its unlikely you touch the goto line.
I'm not saying there is no reasonable explanation, just that I am not able to come up with one. Many explanations I have seen so far, require additional code changes in that block and make no sense to me looking at the diff.
I disagree that there's no "reasonable explanation", and so do most other people who've looked at it. That doesn't mean it wasn't malicious, but it means that it has reasonably plausible deniability. (Of course, if you were being malicious, plausible deniability might be important to you.)