Vulnerability In Java Commons Library Leads To Hundreds of Insecure Applications (foxglovesecurity.com)
An anonymous reader writes: Stephen Breen from the FoxGlove Security team is calling attention to what he calls the "most underrated, underhyped vulnerability of 2015." It's a remote code execution exploit that affects the latest versions of WebLogic, WebSphere, JBoss, Jenkins, and OpenMMS, and many other pieces of software. How? An extremely common Java library. He says, "No one gave it a fancy name, there were no press releases, nobody called Mandiant to come put out the fires. In fact, even though proof of concept code was released over 9 months ago, none of the products mentioned in the title of the blog post have been patched, along with many more. In fact no patch is available for the Java library containing the vulnerability. In addition to any commercial products that are vulnerable, this also affects many custom applications.
Magnitudes slower means "10-100-1000 times slower" which is BS.
Java's main problem is memory footprint, not execution speed.
Which is on par with C++ code, unless you do extreme object allocate/GC or use sin/cos (which used to be done NOT using CPUs capabilities, leading to much slower code. All to guarantee exactly the same result across platforms)
Your app needs to be accepting Serialized Java objects as input.
Yay.
Never seen that used in any project I was part of and if that would happen security concerns alarm would ring in pretty much any competent team.
The linked article takes a lot of words to get to the point, which is that "WebLogic, WebSphere, JBoss, Jenkins, and OpenMMS, and many other pieces of software." will deserialize arbitrary user-supplied Java objects. To exploit that, you just provide a serialized class from commons-collections which (by design) executes the class's code during its deserialization process. If your application doesn't whitelist the classes it deserializes from an untrusted user, you deserve everything you get.
If you are so enlightened why are you spending your Saturday night criticizing strangers over the Internet when you could be biting your nails in fear of ISIS? Clearly reckless panic will be effective, so lead by example!
"I like to lick butts!" by MobileTatsu-NJG (#32700246) (Score:5, Informative)
Comparing C++ and Java is like comparing Assembler and C++. Why dont you use assembler over C++? Same reason why ppl use Java over C++. Plus it depends on what you are developing. C# vs Java thats different story but C# has similar up and downs as Java. So this discussion is kinda pointless.
Can you deal with the details, now ?
Because it has gotten a name.
Or is "Bad Coffee" better?
Well, nobody really exposes mentioned software to the internet, right? For instance, It is accepted as good practice to have nginx used a request router, which kinda lowers the impact of this exploit, or am I am wrong?
There are so many scenarios, some where Java is faster than C++ and somewhere it is slower.
To make some kind of blanket statement makes you look like a moron.
Mod me down, my New Earth Global Warmingist friends!
http://news.softpedia.com/news/the-vulnerability-that-will-rock-the-entire-java-world-495840.shtml
This is an issue with how some users use a 3rd party library Apache Commons Collections. Java doesn't have to be fixed. And Apache Commons-Collection doesn't have to be fixed, except maybe stating the obvious...
Do not deserialize objects with executable code from the internet.
That sounds like a blanket statement to me...
I don't know "so many" but multiple small allocations/deallocations is one example.
Each new/delete is a rather complex system call, no matter how little you allocate. In case of Java it allocates quite efficiently from its internal reserve (which isn't that much of an improvement, but still some) and performs bulk GC instead of deallocating each item separately (which is a big improvement).
Garbage Collector in a lot of cases is a liability, especially if it obscures memory leaks and introduces hiccups in systems that should behave smoothly (multimedia/games). But in this particular scenario it outperforms multiple manual deallocations by strides.
C++ maybe, but never C. Its simply not possible.
Non sequitur: Your facts are uncoordinated.
Is it so subtle and insidious that it is simply impossible to name? Or do you just not understand what you're reading?
[Here, let me give it a go: Basically apps blindly trust network input and let it run in their execution context.]
[[Though I suppose when you put it _that_ way, you can't spend your time implying that it's somehow Java's fault.]]
It's not an Oracle issue though, it's how developers are using a 3rd party library.
Change is certain; progress is not obligatory.
Thanks to this bug I can see a whole bunch of you masturbating in front of your tablets right now!
That would definitely be a bug, not a feature.
Faster! Faster! Faster would be better!
Then can you show an example of some past Slashdot article and its comments that you saw being high quality?
Here is an example of how to whitelist classes by subclassing ObjectInputStream: http://www.ibm.com/developerwo...
My Hello World is 512 bytes. But it's also a valid Fat12 boot sector, Fat12 file reader, and Pmode routine.
C++ applications can and do use GC just like Java does. The difference is you can choose how you manage memory.
Your post doesn't really make much sense.
Mod me down, my New Earth Global Warmingist friends!
"Commons"? Fortunately, not universal. Naming a library "commons" does not make it part of the language. All those Apache Commons libraries share one thing: they are mostly collections of anti-patterns. Stuff that can often be done better without dependencies, with real standard libraries (part of the platform) instead of collections of trees of mutually-incompatible libraries that look as written by a lazy first-year student. They feature null checks that make it obvious that the lazy programmer that use them consider null and empty as equivalent, which should in itself raise red lights. At best, they reinvent the wheel, quite often in a bad way. Those dependencies are something you won't find in my projects, and the first thing I remove from projects that I have to take over. Whoever depends on this deserved those things. I'd need to read TFA more extensively, but is there any bug report open for the concerned app servers?
There are a lot of reasons to use apache commons beyond checking if a string is empty.
It was pretty darn hard to parse that article to understand what library the author was talking about, but after some research, the issue seems to be a vulnerability in the Apache Commons Collections library.
I don't understand why the OP calls it "Java commons" or why the author of the article goes out of his way to not mention the name "Apache", using it only when copying and pasting code lines but never stating it in prose. Sure, there are lots of people who may have Java, but if the security vulnerability is of the magnitude that is claimed, properly identifying where it is located would be the logical first step.
There is a somewhat better article at InfoQ.com that parses out the original article and describes it more clearly.
new and delete don't generally make system calls. The system call is brk(), and it's only needed to resize the heap. The C and C++ runtimes also allocate a large heap at startup, and will only resize it when it approaches exhaustion.
Basically, the entire point of your post is lost because it is based on a misunderstanding.
CVE number or it didn't happen. https://en.wikipedia.org/wiki/...
I am almost impressed at your epic failure of both reading comprehension and logic. Also, who the hell chooses Java for speed? Java has benefits and detriments. If you think you can say C++ > Java just because you wrote some big loopy tests, you are even dumber than your above statement makes you look.
The garbage collector only obscures memory leaks if you look for them in the wrong place. If you actually took the time to learn how something works before dismissing it, you might find that profiling the JVM heap and backtracking excessive object allocations / orphanings is about the easiest problem one can detect / solve in a Java application. And who the hell is using Java for gaming/multimedia? No wonder you disliked the screwdriver with which you attempted to hammer a nail. I might as well say that C++ is shit because it takes too long to build a web UI or implement an enterprise BPM engine.
Holy shit. Do you actually think that this has anything to do with the Java that is installed on your computer? To be safe, better go ahead and delete that OS too!
No, you must not be a big Java fan (or person who is the least bit aware of how it works or what it is good for). You do realize that it is not the language that would be patched but a commonly used open source project, right? And that such projects can be written in any language to have vulnerabilities? Hmm...how many vulnerability-inducing DLLs/SOs have ever been created vs .jars? Which one is more likely to allow arbitrary code execution vs. just offering somebody the ability to destabilize the application itself? Yeah, we really need to 'patch' that Java menace. And, to do a compare/contrast of Java / C++ based on syntax and the basics of object allocation just severely misses the point of why you would use one or the other.
https://soylentnews.org is a place the cool kids are trying to build out into something that does the old fun and useful /. stuff. So far, it's tough going. Obviously, the more the merrier. Come over and have an effect on the culture.
Every rule has more than one consequence.
The real fault seems to be in classes like AnnotationInvocationHandler or PriorityQueue (both part of the Java library), whose readObject() methods trustingly call some methods on their child objects.
AnnotationInvocationHandler calls map.entrySet(); PriorityQueue calls compare(). You just make sure the child object executes malicious code when executing those methods. For the child object, you can find a utility class such as LazyMap (from Commons) that executes a function while calling entrySet(). The function can be another utility class that executes some method by reflection (e.g. a Runtime method). These utility classes are all over the place to support functional-style or config-as-code programming.
But I think the real fault lies in those classes that execute child code during readObject(). It doesn't lie in the Commons classes that are used for the children.