Problems with the heap
Okay, first off, everybody breathe. Everyone is freaking out. This is not the way to do this.
Right, so, let me try a half-assed analogy here. There's a day care center and a bunch of people send their kids to it. Then one day, someone finds out that they built the playground out of the sharpest materials available. It's not that the playground is from the '70s or something, either. It's relatively new.
Saying "maybe you don't want to send your kids there" is what I did.
Now, so, this is a bad analogy, because I didn't go into details. In this case, I'd rather the world have a chance to turn this stuff off before it becomes known just what all is possible. The nature of this sort of thing means it's a race and I'm on the side of protecting machines for some reason, so I asked people to stop running it.
Now, first off, I don't know exactly how to exploit this sort of thing. I was there in the 90s when this overflow stuff started popping off, and I'm pretty sure that if you can do this, you can do much worse.
This is what I'm talking about:
Terminal 1:
user1$ random-tool
Terminal 2:
user2$ atop malloc(): corrupted top size Aborted
... that's pretty bad, right?
So you twiddle the tool a little bit and go again and...
user2$ atop Segmentation fault
That's not great, either!
Or... how about...
user2$ atop Fatal glibc error: malloc assertion failure in sysmalloc: (old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)
Again, this is not my world. I've never written a heap exploit, but reading about it briefly makes me think that there's meat on these bones.
user1 does something... and gets user2 to blow up. If you can make that do something useful, then you get user2 to run stuff on your behalf.
What if user2 is root? Then you own the box.
Okay? So maybe stop running it as root, but also just stop running it.