by Robin_Message · 16y ago · 0 comments
In C, this would be a short/long truncation error, and the compiler would catch it --- except in situations like this, where the variable in question was being used in two different functions. So the idea that it could have been easy to catch in assembly is hard to embrace.
The mechanism for calling into the kernel is not some half-arsed, barely important piece of code; it's one of the few surfaces the kernel should actually need to defend. A line-by-line walk-through is a lot of effort, but surely not too much on a small amount of extremely important and potentially exploitable code.
Am I expecting too much from Linux or from code reviews in general?
* Before this issue was found, it was not reasonable to expect people to find rax/eax truncation in routine audits.
* Now that it's been found, it is reasonable (though not automatic) to expect a codebase-wide rXx/eXx truncation bug hunt, a la OpenBSD in the '90s.
* Now repeat this cycle 85789789343 times as people find new random nits that blow up the Linux security model, and you see the challenge.
Yes. I know people won't like me saying this, but the number of local (user->root or user->kernel) exploits on Linux is staggering. And, given Linus et al.'s policy of silently fixing bugs, probably larger than previously thought.