Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have no specific insight to this patch, but I do have personal experience binary patching a popular Microsoft product.

My patch was to the VC++ compiler nearly 20 years ago. We had source, and my fix was also applied to the source (which I'd imagine is still there today), but a binary patch also made sense in the short term.

The binary that I patched was used to build another important Microsoft product, and this bug was found late in the product cycle where any compiler change was risky.

We weren't 100% confident we had the exact sources used to build that version of the compiler (git would have been handy then), we only knew, plus or minus one day, what the sources where.

After carefully evaluating the binary patch versus the risk of building from uncertain source, the binary patch was taken to reduce risk.

I'm no reverse engineer, but this was a pretty interesting exercise in RE even though I had sources. I had no symbols, and the binary was optimized so that functions were not contiguous, cold paths were moved to the end of the binary. Just finding the code I needed to patch was not easy.

The code review was fun - a dozen or so compiler engineers reviewed the change on paper printouts - the most thorough review I've had in my career, and the only one that used paper.

To the best of my knowledge, this binary was never used to build anything other than that specific version of the product which I won't name - not that it matters really, the product is still in use, but that version is unlikely to be in use anywhere anymore.



Thanks for sharing this. I suspected that "not being sure if you have the exactly right source code" could be a real world reason to patch a binary, and now I know.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: