Two arm64-specific miscompiles induce vulnerabilities in curl

7 points by addison


purplesyringa

So, when we say "if you think you found a compiler bug, look again, because chances are your code is at fault", this kind of example is what we mean. As far as I can tell, there was no effort put into verifying whether this is actually a miscompile/compiler bug or UB, which the issue admits directly:

Are the underlying issues understood, or are the issues just papered over? I'm not aware of any relevant miscompilation bug report being submitted to rustc.

[...] finding the least intrusive tape to paper this over and go a little bit beyond that to document as much as I saw, to make these curl builds work, was my goal. Diving into compiler internals wasn't. [...] Finding the root cause would be nice of course

So here we have it, a dubiously correct patch merged into libcurl papering over the issue that likely just makes the issue even harder to reproduce, in a context where alleged compiler bugs had previously arisen due to incorrect hand-written assembly in dependencies, with identical test failures in code built by two completely different compilers -- with the issue closed as completed. That's not something I expected form a project claiming to be the best C project security-wise... Please don't take this as a good example.

Also, regarding the word "vulnerabilities" in the title: I don't see anyone relevant claiming that it's a vulnerability. There is no mention of security impact in the issues or the posts, and while I wouldn't be surprised if this was exploitable in the slightest, this just adds more confusion to the already muddled topic.