'Stack Clash' Linux Flaw Enables Root Access. Patch Now (threatpost.com)
msm1267 writes: Linux, BSD, Solaris and other open source systems are vulnerable to a local privilege escalation vulnerability known as Stack Clash that allows an attacker to execute code at root. Major Linux and open source distributors made patches available Monday, and systems running Linux, OpenBSD, NetBSD, FreeBSD or Solaris on i386 or amd64 hardware should be updated soon.
The risk presented by this flaw, CVE-2017-1000364, becomes elevated especially if attackers are already present on a vulnerable system. They would now be able to chain this vulnerability with other critical issues, including the recently addressed Sudo vulnerability, and then run arbitrary code with the highest privileges, said researchers at Qualys who discovered the vulnerability.
The risk presented by this flaw, CVE-2017-1000364, becomes elevated especially if attackers are already present on a vulnerable system. They would now be able to chain this vulnerability with other critical issues, including the recently addressed Sudo vulnerability, and then run arbitrary code with the highest privileges, said researchers at Qualys who discovered the vulnerability.
Linux. Yikes. How many kernel exploits does this make, in 2017 alone?
Very interesting that the major flavors (Sys V, BSD, and Linux [which I consider a rewrite of Sys V]) are vulnerable. Sounds like a deep seated logic flaw there. Wonder if other vendor specific ones (IRIX, SunOS, Ultrix, AIX, etc) are vulnerable.
That name will never sell, you gotta give it a name like "Spotted Donkey Cock"!
This exploit still requires local access to a machine, so it's not as bad as people claim. Unless you're giving random people shell access to your server.
It is called Stack Smashing and OpenBSD is NOT vulnerable to it!
What's odd is that I think it got fixed a very long time ago, as in v7 or maybe 4.2BSD. How did it come back and end up in Linux?
It's been a long time, maybe I am remembering incorrectly, but it seems awfully familiar.
The day before yesterdays news, tomorrow!
Red Hat sent out a notification on Monday. Nice to see the Slashdot editors catching up on the news this weekend.
https://access.redhat.com/security/cve/cve-2017-1000364
Sifting through the CVE and the write-up:
The kernel places an unmappable guard page just below the process's maximum-alloted stack space. Normally a process gets allocated only as much stack space as it needs. When the process's stack usage grows, the kernel maps additional pages to grow the process's stack space, but will not grow it beyond the maximum alloted stack size. If the process enters an infinite recursion loop, it'll hit the end of the alloted stack space, and the unmappable guard page segfaults the process out of its misery.
The problem appears to be if the process's heap is right next to the stack, with only the guard page separating it from the stack, and a single function call creates a stack frame that exceeds the size of the guard page. This effectively places the stack pointer into the heap. The function call thinks it has allocated its usual, large stack frame, but the stack pointer is in the heap.
At this point, usual code execution will typically make further use of the stack, so it ends up crapping all over the heap.
That's not good, of course. But I would expect the process in question to attempt to access its alleged stack frame before much happens. At this point the process will try to access the guard page, and gets segfaulted. That, at least, is my understanding of the vulnerability.
The overall design involving a guard page to limit the size of the process's stack is a traditional OS design, which is why the general approach affects both Linux and BSDs, here.
For this to be remotely exploitable, the attacker has to arrange for a process to execute a function call that creates a large stack frame so that the stack pointer jumps over the guard page. I would expect common, battle-tested free software that powers the intertubes to be well designed and written by experienced greybeards who fully understand how an operating system works, and the fact that the stack is not an endless resource, that it is quite a limited resource actually; with the resulting code minimizing automatically-scoped object usage on the stack, which should eliminate the vulnerability completely.
I find Red Hat's write-up somewhat puzzling. They appeared to have taken the tack of addressing the exploit by increasing the size of the guard area to a megabyte, rather than a single page.
That seems to be somewhat inadequate to me, in the brave-new 64-bit world of ours. It seems to me that the permanent fix would be to map the stack into virtual address space that's a terabyte, or two, away from the heap and everything else. Seems to be a no-brainer solution to me, dunno why they didn't do it.
Sorry if this is a dumb question but I'm pretty sure there's a lot of people with the same question.
I'm comfortable with apt-get but that's just upgrading all the softwares other than the operating system. How do I actually upgrade my OS?
My usage pattern tends to be, do a clean install of linux, install all the packages I need, edit the configuration files as I need them. Then use it till I buy a new computer only upgrading the installed packages. Then I start over. I never have actually pathced my Linux or installed an "upgrade". I'm terrified it would break all my packages.
How do I do this?
Some drink at the fountain of knowledge. Others just gargle.
paid for Poertting to develop a varied of anti-free software to how windows-ify Linux.
Of course they would put a bandaid on the gangerenous leg and only wait until septic shock kicks in to amputate it :)
You'd think that by 2017 this kind of linux vs. Microsoft childish discussion would be a thing of the past, but damn. Now, regarding TFA, it amazes me how long it took to reach /., i've read this on other portals days ago.
https://www.qualys.com/2017/06...
this affects Linux Kernel versions 4.11.5 and earlier (the stackguard page was introduced in 2010).
https://nvd.nist.gov/vuln/detail/CVE-2017-1000364/
-- kjh
it becomes vulnerable?! WTF!
The NSA made selinux. Automatic backdoor!
Does anyone really think that was an accident?
You can see the problem by checking your processes with pmap. Here's the stack for my bash:
You can see that ld-2.25.so and its writable data (?) is reachable above the stack (remember, stack grows down). It is, however, 95GB away from the stack. If you limit your programs' stack size to, say a megabyte, with ulimit -s 1024 placed in bash startup scripts, you will be safe from the attack.
Does it affect Android too?
Incredibly, but nobody found it important to mention that this vulnerability was known 12 years ago through a presentation on CanSecWest.
https://cansecwest.com/core05/memory_vulns_delalleau.pdf
And that grsec has long known about it and patched long time ago. Linux "security" is a joke.
apt-get dist-upgrade on Ubuntu doesn't change OS major or minor versions. It only impacts the 3rd level version.
For example:
14.04.1 --> 14.04.2
To get from 14.04.x to 16.04.y then there is a "do-release-upgrade" tool.
Just one of the ways that Ubuntu-based distros are different from Debian. There are others.
Have you ever heard him utter a three syllable word? Me neither. He couldn't outsmart door stop.
Are Darwin-based OSes, such as macOS and iOS, affected by this?
And if so, any information as to whether it is being, if has been, patched in those OSes?
To much work and difficulty already having over privileged over complicated surface to attack like systemd
I hate linux, Windows, BSD, ALL of it. I am sick and frigging tired of computers. I've been doing this for 13 years now and none of this line of work has turned out the way I had imagined it would go before I got into it. Its just one vulnerability after another. These things do more harm than good. I don't wanna spend another minute sitting in a chair staring into a light-box clicking a bunch of little boxes and carrying around a handheld light-box to stare into whenever I'm not at work doing it. Fuck computers. I've made up my mind: I'M GOING _ANALOG_.
wtf did i just read...? oy, that's it, time to go to bed.
Waitwut ? Oracle Solaris is 'open source' now ?
How badly does this affect the most widely used OS with all its sandboxed apps?
Try coming in her pussy, then going for doggy-style anal. That way you've got plenty of fresh lubricant immediately to, ummm, hand in a convenient container.
Birds are not dinosaur descendants;birds are dinosaurs, for all useful meanings of "birds", "are" and "dinosaurs"
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1699772
All applications using the Java Invocation API, ie. calling Java from C/C++ (LibreOffice Base, Eclipse, Octave, ImageJ, SciLab, countless others) CRASH ON STARTUP due to a bug in the patch for this security issue.