358 points · by 2510c39011c5 · 11y ago · 130 comments
NT 3.5 had the GUI entirely outside the kernel. For compatibility with Windows 95, much of the Windows 95 GUI code was moved into the kernel. 20 years later, that decision is still causing bugs.
Also, it could be argued that vulnerabilities like these which are only locally exploitable are not all that scary, as a personal computer should be by definition one that obeys its user no matter what. It's a bug, but not a "someone can take over your computer without you doing anything". Maybe it's because I grew up with personal computers that practically invited you to do whatever you want with them and had absolutely no "protection" whatsoever (early 8-bit machines, then DOS on a PC) that I find it hard to get scared or excited by local-only exploits like these.
In the 8-bit world, if you don't have a hard drive, and your only "network" is trading floppies with your friends, and "Elk Cloner"[1] is the nastiest virus you have to worry about, then there isn't much reason to be scared.
Nowadays, though...if you consider inserting an infected USB stick to be a local-only attack vector, then Stuxnet was local-only.
It's the internet age, now. Local-only really isn't any more.
Part of the reason it's so easy to infect technically illiterate crowd nowadays is that they didn't develop an immunity system - something us who grew up with computers take almost for granted. It doesn't really take that much to become almost completely immune to malware - 90% of it is simple to spot (don't download things from CNET or any other site that has lots of ads, and especially those that try to trick you into clicking them; don't open .exe's you didn't explicitly requested; know what's an .exe; don't open attachments you didn't expect; etc.) - but somehow the society at large doesn't bother. And yet they expect someone else to fix it for them. As the saying goes, "Any fool can use a computer. Many do.".
I understand how we got there. I don't like it, but well, Moloch does what he wants. The thing to remember is, the increased sterility of the ecosystem and all those things done "for Security!" come at the cost of the ability of general-purpose computation. Future systems will tend to be dumbed down to the point they're not general-purpose computers anymore.
I wish, I hope, they'll let us keep PCs as specialized machines, like lathes and mills.
But this is basically orthogonal to the modern application of (OS-level) privilege boundaries, which is to protect the user from compromised application processes. This escalation doesn't let someone "take over your computer without you doing anything" by itself, but once someone has exploited an IE bug and found themselves able to run arbitrary code on users' computers in a sandbox - which happens all the time - that's exactly what it allows.
I'm not that familliar with Docker but looking at http://en.wikipedia.org/wiki/Docker_%28software%29 it is built on the same resource isolation features as LXC which I am using on two of my test systems.
The resource isolation features are, in fact, built on top of a large multi-user system, which happens to have powerful security context support and abstractions built in. The contained applications operate, from a userspace perspective, as if they are their own system when in reality their kernel is actually the host kernel and their users really virtually re-mapped to distinct accounts within the host kernel.
That didn't seem to be the case to me? It seemed to be a privilege escalation bug.
EDIT: I'm stupid. Some other user talked about physical access bugs, so confused that with locally exploitable.
Meaning instead of doing things with your user account, they can instead hijack your whole system. A keylogger on windows, for instance, does not need ring0 to function. The difference isn't really that large on a personal single-user windows setup. You're pretty screwed even if they don't manage to get ring0.
I think MS is eternally hamstrung by performance and legacy issues because those two things are in demand for so many of their customers. Windows fits this market, which is fairly sizeable. Of course now with hardware at the speed its at, you can get a lot more slack. I've found the linux desktop to be horribly slow until the past couple of years where there's a glut of CPU/GPU performance on even the most commodity equipment. I can run, and have run, Win7 on equipment that shipped with XP and its been a fairly pleasant experience. Running, say, a gnome or KDE WM on that equipment is a nightmare. MS, for all its faults, is fairly conservative in many regards, especially performance.
At the end of the day this is yet another security issue that needs to be patched. The larger issue in my mind isn't MS decisions from 15 years ago, but why so much of our software infrastructure is being written in languages that more or less beg for stack/malloc vulnerabilities. These constant tirades about MS are just more "the beatings will continue until morale improves" and not really a constructive conversation about security. I think in the near future we'll be looking at all our stuff written in Rust-like languages and wonder why the hell it took so long to do.
Lastly, Win10 is a technical preview. Finding bugs is exactly what should be going on here. Are we really being this critical on pre-release software? I don't see any other software held up to such a standard.
FTA: "We have verified this exploit against all supported Windows desktop versions, including Windows 10 Technical Preview."
The specific "Windows 10" aspect is click-bait; the exploit is for Windows
Well i don't buy that part. When I first came across sysmon/regmon/procmon, I found it to be an amazing piece of work. An extremely small free standalone program that gave you a realtime insight into the OS? Heck, if I kept a list of people to hire, he would definitely be on it!
That thing was even 1/10 of the "hello world" Go program I compiled!!!*
*(~100Kb vs 1Mb) I know Garbage Collection adds a lot to size but its still a fun comparison.
Having said that, he was quite vocal at the time, and I personally think that he may have been a large part of the huge Vista -> Win7 improvements, although have no evidence to support this. The timing just seems about right.
... and they tasked him with this obnoxious and highly dispensable cloud computing project. Anything just to keep Mark shut up, ANYTHING.
and for a windows system, it needs to support a range of hardware configurations...Some could be really slow...
On my last count, you needed to swallow 11 different types of messages.
it's pretty core to the idea of windows though. kind of like a printer - i wouldn't be surprised if a printer driver was in the kernel. or age of empires, which is a Microsoft property. just load it into the kernel in case you need it and you dont need much DRM, if people end up buying it it can get unlocked.
in essence i was agreeing that a microkernel is no place for a scroll bar!
I am more than happy to criticize microsoft. I truly hate windows and everything it represents. But the system seems to have worked here. The bug was reported and patched before it became a widespread issue. I'll save my venom for those all-to-common days where Microsoft fails to address a problem in a timely manner. (or also Apple, plenty of venom for them too.)
Why's that?
I'm hoping for an in-depth substantive analysis of the factors leading you to come to such a conclusion, but I don't want to take up a bunch of your time or make it seem like I'm asking you to justify anything.
I have never met anyone who truly likes windows. They tolerate it. They are used to it. But they never say "Yes, I am happy with this new version. The upgrade sure made my life easier!" I'd rather have my wisdom teeth re-installed and re-pulled than be part of another office transitioning from one version of windows to another.
I gave up on windows when, after buying a little netbook, I decided to give it a chance. I plugged in an MS-brand optical mouse and was told that windows needed to connect to the internet to download the driver to run the mouse. That was windows's last breath on any of my personal machines.
And death to docx.
I used to have the same "that upgrade DIDN'T make my life easier" with every new version of Fedora that I installed, until GNOME3, which completely removed any trace of productivity that I had.
I then ditched desktop Linux.
I don't think people enjoy new versions of anything (look at the backlash to Lion since Snow Leopard), there are still vocal complaints about Yosemite in OSX land.
My parents like Windows.
My brother likes Windows.
I use it daily and find it tolerable, like you.
But I think it would be naive to say that nobody likes Windows, don't you? Try giving any of my family or my wife my MacBook and see how angry they get in a short space of time.
I like windows.
https://system76.com/ https://www.apple.com/macbook-air/ https://www.dell.com/us/business/p/precision-m3800-workstati...
I wouldn't mind some elaboration on this point; I would think it's a step up from .doc at the least.
Plenty of people felt that way about the Vista to Windows 7 upgrade. (fewer felt that way about the 7 to 8 transition)
Interestingly, I've seen a small group of Windows fanbois arise within the last couple of years. Very much like the Apple fanbois; just as irrational and quick to take offense at any criticism of MS and Windows.
But I agree with you that most people I know also tolerate windows. Some are even happy with it because they can do things with a computer that has windows.
That was until Windows 8 came out. I was surprised by the amount of hate windows 8 received, and it was well deserved IMHO. But then I was also surprised by the few people who didn't hate Windows 8, some even liked it. The fanbois.
CP/M (circa 1974) had a command line prompt like this: "C>"
Windows (circa 2014) has a command line prompt like this: "C:>"
Basically the same after 40 years. Forty ... years. Same old totally obsolete "drive letter" file system architecture.
Although the comparison is to be obviously taken with a grain of salt, it is clear to old-timers like me that Windows has been ultra-conservative with advanced software technologies (modular filesystems, ZFS, etc...) and this has hurt tremendously the evolution of OS software "for the masses".
It does not require a big leap of faith to believe that we could have had a far more advanced <consumer> OS if Windows had not existed.
Quite a pity.
You can have filesystem drivers, filesystem filter drivers, and pseudo-filesystems. It's just that the documentation is buried in the DDK. And there isn't a "community" of users for Windows in the way there is for Open Source.
http://arstechnica.com/security/2013/06/nsa-gets-early-acces...
https://msdn.microsoft.com/en-us/library/windows/desktop/hh7...
Apparently, chromium - which uses seccomp on linux - uses ProcessSystemCallDisablePolicy on windows: https://src.chromium.org/chrome/branches/1312/src/sandbox/wi...
There's your problem right there.
The Windows API and all related systems are stable and mature.
And I'm saying this as an OSX user.
No, I'm saying that implementing scrollbar handling in the kernel is a bad idea. It's not something which requires privileged system access, and thus should be done in user mode where bugs like this won't lead to privilege escalation.
I think OSX got around this problem by removing scrollbars haha only kidding
You make an excellent point, sorry to misunderstand your original post.
I'm not sure if that's enough though, considering that, in general, the kernel can't assume anything passed to it by reference via a system call isn't mutated by another userland thread. Furthermore, even if everything were written in Rust, the kernel can't just trust that a userland process was actually compiled in a way that faithfully employed Rusts compile-time safety guarantees... so I think any notion of shared garbage collection is tricky without a program loader that did code verification.
Microsoft have done some work in this area with their Singularity and Midori projects[0]. Singularity in particular eliminates hardware isolation between processes.
I think the simple answer here is that the kernel should be copying anything passed to it by reference if it intends to do anything beyond a single atomic read operation. This is why, on Linux for instance, send() can't return to user space until the data has been copied in to kernel controlled memory, and why we have nice things like splice() and sendfile() to deal with the performance hit of doing so for common cases.
[0] https://en.wikipedia.org/wiki/Midori_%28operating_system%29
One option would be for the kernel to temporarily mark the page(s) referenced as read-only, and do copy-on-write where necessary. This would prevent the (presumably) common case of not having the page modified by another thread while the kernel processes the data to not incur the delay of copying the data. Might only be worth it for larger amounts of data, though.
Rust is memory-safe so assuming the rust implementation is correct, it should never lead to executing user data. OTOH there have been plenty of e.g. JVM exploits over the years, which were mitigated by DEP, and the JVM offers the same kind of safety guarantees.
Rust would help as long as unsafe code blocks aren't exposed to the outside world. Which still seems a bit hard to accomplish, as many Github projects suffer from unsafe overdose.
However, even memory safe languages suffer from logical errors.
[1] https://en.wikipedia.org/wiki/Modula-2#Modula-GM
[2] http://www.cbsnews.com/news/car-hacked-on-60-minutes/
[3] http://www.caranddriver.com/features/can-your-car-be-hacked-...
I have used flawfinder, cppcheck and Xcode (clang's) analysis which has helped me find issues.
Wait, now I'm confused... was it a single bit, or an entire word that triggers this bug? ;)