20 ms·
Log4j: Between a rock and a hard place
- randomNumber7 5y agoJust keep rce for backward compatibility. Many poor users rely on it. Also the devs should refuse to fix this without gettin paid.
- v-erne 5y agoI can't help but to wonder. How can we ever tell that this kind of vulnerability in open source library is accident of feature creep or simply incompetnence ? What if this is a deliberate backdoor introduced by third party? I bet there are a lot of groups out there that would give leg and arm for having knowledge of this vulnerability for years it was out there in log4j.
- dexwiz 5y agoThe last part advises to be feature conservative to avoid promises all together. For that look to enterprise software where backwards compatibility is a legal agreement. This carries a bunch of alternative issues.
- eatYourFood 5y agoThe last part advises being feature conservative to avoid promises altogether. For that, look to enterprise software where backwards compatibility is a legal agreement; this carries a bunch of alternative issues. I attempted to fix your questionable grammar as to make your writing easier to understand.
- PufPufPuf 5y agoThe original is understandable. The person might not be a native speaker and calling their grammar "questionable" is too harsh, especially on an online forum. Also I don't think some of your "fixes" are necessary or meaningful.
- eatYourFood 5y agoYou cannot say “this” straight after a full stop (period). Get over it. The commenter is a native speaker and I had to read what they said more than once to understand.
- Talanes 5y agoUsing semicolons to join sentences together isn't a super common style of writing for online comment sections. If you are unable to read a paragraph composed of shorter, more discrete sentences, that's on you.
- eatYourFood 5y ago> That’s on you So they get a free pass for maybe not being a native English speaker but I don’t? Inb4 ‘but you criticised them’ - that’s not related to your attack on me.
- scubbo 5y ago> I attempted to fix your questionable grammar as[sic] to make your writing easier to understand Muphry's Law strikes again! I think you meant "...so as to make..." (+1 to the other reply - the original was perfectly readable)
- eatYourFood 5y agoIdeally you’d just remove the word ‘as’ for the most concise and correct sentence.
- floatboth 5y ago"Features" is a way too abstract thing to blame, tbh. The elephant in the room here is the excessive dynamism allowed by default on the JVM platform. How many applications actually need fancy classloaders? Why isn't every step to get there - "loading a class from anywhere that isn't my JARs", JNDI, JNDI's LDAP backend, etc. - an explicit opt-in flag to the VM? Java's wide-open defaults are what made the blast radius of this huge.
- krzyk 5y agoThere are popular languages that have `eval()`, so I don't see why blame Java only?
- jpfed 5y agoDon't get us wrong, eval() is terrible too.
- zmmmmm 5y agoJava's dynamic classloaders were one of it's original tantalising features. That you could have code from one place running somewhere else - "agents" could literally send their bytes to a device to execute there, run there and then erase themselves when they were done. It sounds crazy these days but it was all meant to be held together by the security model - built in at the core it was safe to let foreign byte code execute locally because the completely managed VM could enforce a security sandbox that allowed the code to do only exactly what it was meant to. In some ways that is where this and all those features fell down ... if log4j had constrained those classes within a security sandbox it wouldn't matter what they did. But nobody understands or uses Java security permissions. The whole system is byzantine and drives people crazy whenever they do run into it. But if it had worked you could be asking the question, "why did log4j allow the permission for the remote code to do bad things" rather than "why was remote code allowed to execute".
- deleted 5y ago[deleted]
- dvhh 5y agoMeaning that Log4J is certainly not the only library to have the problem, maybe the one with the larger footprint, what about JSP ?
- throwawayboise 5y agoIsn't there a middle ground? You can get the "safe" non-backwards-compatible update as free/open source, or you can pay for updates that retain backwards compatibility. There is already a model for this, where companies will pay for support for old versions of software that have been declared EOL and no longer getting "free" updates. Microsoft offers this for older Windows NT versions, for example.
- zamalek 5y ago> for a feature we all dislike yet needed to keep due to backward compatibility concerns. It's logging. While logging is extremely important, I think we could all tolerate removing a vulnerable feature. Or, just move the feature to a separate package. I have made bad decisions, we have all made bad decisions. Own them, improve, and celebrate the opportunity to learn and improve. Keeping this around, as a default, was a bad decision. If your enterprise contracts don't want to turn a flag on, then they can always skip upgrading (they generally do regardless).
- diroussel 5y agoThey didn’t know it was vulnerable, they just didn’t like it for other reasons. Should maintainers of all core apache libs just remove or disable features they don’t like, when not known to be insecure? That said, log4j2 isn’t that old. Not sure why this was added in the first place. At the very least it’s a performance issue.
- wpietri 5y ago> Should maintainers of all core apache libs just remove or disable features they don’t like, when not known to be insecure? I'd bet more will start doing so. If nobody is excited to keep the feature up and any unloved code contains risks, getting rid of it seems fine to me. If companies want that code maintained, they can pay up or get one of their people to do it.
- zamalek 5y ago> Should maintainers of all core apache libs just remove or disable features they don’t like, Why not? I can just go into a parity package.
- matkoniecz 5y ago> Should maintainers of all core apache libs just remove or disable features they don’t like, when not known to be insecure? If noone funds their development and they maintain it for free? Then yes, why not.
- manquer 5y ago
- stefan_ 5y agoThere seems to be a misunderstanding here. We have on the one side a garbage feature that should never have been implemented - but if you want to keep it for backwards compatibility, sure. But then we have log4j scanning all values instead of only format strings - I think it can be argued that this behavior is a critical bug and was never intended to begin with. It seems to have only come about because whoever implemented the JNDI stuff lost their bearing in the absurd class hierarchies and abstractions in log4j. Of course the last part holds the solution for our backwards compatibility issue. Remove the JNDI nonsense from the default package and move it into an extension package. Whoever wants to keep it can just add that to their dependencies and continue to enjoy logging functions that sometimes also make network connections and block your program.
- ehsankia 5y agoRight, I was also confused by the blame on backward compatibility. You can keep things backward compatible without necessarily making it on by default. There is no reason why `formatMsgNoLookups` should the default. If it is indeed an obscure and hacky feature for backward compatibility, just make it opt-in. People who really care about it will enable it, most people won't have to carry that baggage and we wouldn't be in a situation like this.
- iratewizard 5y agoHindsight is always 20-20.
- Thorrez 5y ago>for a feature we all dislike yet needed to keep due to backward compatibility concerns. If they really dislike the feature that much, they likely dislike the code and want to completely delete it. I'm not sure if making it opt-in would make them as happy as fully deleting it, so they are less motivated to make it opt-in than they would be to fully delete it.
- ehsankia 5y agoThey could also "fully" delete it by putting it in a separate opt-in package.
- boricj 5y agoTo add some perspective, log4j has gone for 20 years with only two major versions. Assuming that they are following semantic versioning, that means they added new features/fixes in a backwards-compatible way and only broke compatibility _once_ in over two decades. That's both a testament to the stability of the library over time and a reminder that all the cruft accumulated over the years at most gets gated off through saner defaults.
- shaldengeki 5y agoThis assumption isn't true, though. APIs routinely get changed in minor versions, which can make it non-trivial to upgrade large codebases that use lots of features.
- fouc 5y agoIf breaking changes on an API are made in minor versions then they're not actually following semantic versioning.. and that's by choice.
- shawnz 5y agoYes, they never claimed to be using semantic versioning so the assumption that they were using it is wrong.
- Aperocky 5y ago> use lots of features. That's the problem, you use log4j to log. Any 'feature' outside of that being used is wrong. Any 'feature' outside of that being implemented, is wrong. If JNDI string interpolation is desired, write another module that does that. I hate 'is-odd' but this is another extreme and demonstratably worse.
- WJW 5y agoSemantic versioning itself is substantially younger than 20 years.
- 5y ago
- mooreds 5y agoI 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...
- smasher164 5y agoIt'd be interesting to see a library versioning model where every release is a breaking release, where we accept that Hyrum's law is a fact of reality (like Nix I guess?). Then, the release process of a new version is additionally required to provide some migration path from previous releases. For example, if the language-level API is the same, but the behavior is slightly different, provide a diagnostic message that shows up in the editor when the library's updated. On the other hand, if the language-level API has changed, additionally provide a "go fix"-like program that can migrate the user's code to use the updated library. As long as a migration path is provided/automated, updating libraries would be as easy updating to use an API-compatible release.
- dang 5y agoRecent and related: Log4j RCE Found - https://news.ycombinator.com/item?id=29504755 https://news.ycombinator.com/item?id=29504755 - Dec 2021 (457 comments) Widespread exploitation of critical remote code execution in Apache Log4j - https://news.ycombinator.com/item?id=29520415 https://news.ycombinator.com/item?id=29520415 - Dec 2021 (80 comments)
- agilob 5y ago> What does backwards compatibility mean to me? > I want to not spend much time upgrading a dependency > Go compatibility promise: >So whenever a change in behavior happens in an upstream library You are comparing a promise from language designers to no promise from the library developers. Syntax from Oak (before Java was called Java) still compiles and works in Java 17 right now: jshell pub| Welcome to JShell -- Version 17 | For an introduction type: /help intro jshell> public abstract interface I {} | created interface I You can still type (public abstract interface - all interfaces are abstract by default since Java 1) and it works. One of the reasons I gave up on writing desktop applications in Go was libraries were breaking compatibility with every commit. GTK+ binding was literary unusable as before gomod this would break literally, and I mean literally, every day. Please tell me that none Go library had any breaking changes in the last 5 years and I'm using it as my default ecosystem from tomorrow.
- azth 5y agoWhat do you write desktop applications in these days?
- mrtweetyhack 5y agothey don't have to make promises since it's not a paid product. Do with it as you please.
- bshipp 5y agoI'm still flabbergasted that the original maintainers are rushing around trying to patch these problems. Unless their specific personal/professional projects are at risk they have no responsibility to hurry and fix a thing. You'd think, in the spirit of open source, these multi-billion dollar companies--like Apple and Google and Amazon--would recognize the danger and immediately divert the best engineers they had to help this team identify and mitigate the problems. They should have been buried in useful pull requests. For that matter, they should have really picked them all up in private jets and flown them to neutral working space with those engineers for a one or two week hackathon/code sprint to clean up the outstanding issues and set the project on a sustainable path. To get those maintainers there they should offer a six figure consulting fee and negotiate with their current employers to secure their temporary help. I can't believe these folks just get abandoned like this while CEOs/CTOs from rich companies wring their hands wailing about the problems and not offering solutions.
- iJohnDoe 5y agoGreat comment. I think this speaks to overall what’s happening in the world today.
- thrdbndndn 5y agoI knew you're deliberately exaggerating but isn't it a little bit over the top? That ("...private jets..") doesn't happen because the solution isn't exactly the hard part, and the unpaid original maintainers are doing them anyway.
- bshipp 5y agoI admit to a certain level of exaggeration but, at the same time, we are talking literal peanuts to a large company. They could spend a million dollars and it'd be a rounding error on their balance sheet. In all seriousness, taking actions like I identified above would cost the companies virtually nothing but result in huge long-term benefits by signaling to the rest of the open source world that "we love your work and will be right beside you helping if the chips are down." This is, of course, not a suitable compensation model for popular open source projects. Thats a separate conversation. But it would at least be something.
- forrestthewoods 5y agoCan someone explain exactly what bad thing someone can do with this exploit? I understand passing a data to a second server and being able to exfiltrate environment vars. (Environment vars are evil.) But I feel like I’m missing a step. How does this let someone take over a machine? How can attacker upload and run their own binary that can actually do real damage?
- didibus 5y agoYou can execute arbitrary code into someone's server. You gain full control of whatever the user running your application is allowed to do.
- peterwaller 5y agoIt lets the hacker take over the machine because there are strings which are interpreted as (IIUC, I am not a java engineer) variables within a class, and you can express a remote URL to load a class from, apparently (through something like (jndi://... ldap... URL), resulting in fetching code from somewhere and running it, in the service of writing a log message. This is apparently being exploited in the minecraft ecosystem by simply writing chat messages containing the full exploit, which gets executed by both servers and clients.
- forrestthewoods 5y ago> resulting in fetching code from somewhere and running it Ahhh ok. I didn’t realize the service would fetch and execute. Yikes.
- teget 5y agoBy my understanding the RCE part of the exploit should not apply to recent java versions if the default options are used (minecraft shipped older version afaik, and all bets are off for unmaintained enterprise applications). The data extraction however will work on any java version if the server in question has the capability to connect to a server under the control of an attacker, as the network request will be performed even if the JVM options that should avoid the RCE are enabled. Big problem for client applications (as usually most outgoing connections are allowed). A bit harder to evaluate the impact in the enterprise context as many companies will not allow their servers to connect to "random" endpoints or at least require target-specific proxies to connect to the internet/intranet which makes this harder to exploit.
- johnsolo1701 5y agoWhen a Javascript logging package has a vulnerability: "Why do you need a package for something so basic as logging? This should be part of JS core lib, or just roll your own." When a Java logging package has a vulnerability: Sober introspection about the role of maintainers, dependencies, and backward compatibility in the OSS ecosystem.
- throwaway19937 5y agoThese aren't conflicting beliefs. It's perfectly reasonable to believe that JavaScript has an inadequate standard library and recognize that other ecosystems can have dependency issues.
- notreallyserio 5y agoYeah but one uses npm and the other maven.
- yjftsjthsd-h 5y agoSo it's all glass houses?
- vinceguidry 5y agoHonestly speaking, nobody should be surprised by this. Javascript on the server is a daft pursuit, and shops that rely on it are continuously rolling the dice on their uptime anyway. Anyone can release a NodeJS package, and anyone can pick it up as a dependency. Which is nominally true for Java. But Java enjoys the advantage of maturity. These things are supposed to have been foreseen. Java projects have a lot more resources thrown at them by their orgs, and there is a great deal of talent out there making sure all of this stuff is reliable. This... caught that whole ecosystem off guard. Javascript devs have to always be on guard, because Javascript is the wild west. Nobody blissfully using and loving Javascript really understands why Javascript has so much trouble coming up with a standard library, but anyone who gets deep enough into Java understands very painfully why you just can't rely on it like you can Java. Nobody starts asking sober, realistic questions when Javascript breaks because Javascript is always breaking.
- ordiel 5y agoPeople and, many companies seem to forget that such software comes "AS IS" and it means, AS IS, I would be glad to see fortune 500 companies try to put together a team providing flawless logging capabilites. In reality I know they would not be able to get to be half as good as an open source library, fist of all drowning developers in unnecessary administrative tasks, imposing stupidly unreasonable deadlines and fully ignoring engineering advice from... well the engineering team. It's an insult that those companies profiting masively from so many open source projects still have the audacity to put blame on (again) software whose premise is "AS IS" specially when if you look at their projects (even the ones they sell to their customers) are basically bullshit put thogether with spit and boogers (and I've work in more than one FAANG to know this is truth by experience)
- unbanned 5y agoConsole.log("my message") Job done. Logging libraries are unnecessarily complicated.
- mike22 5y agoNow add a date/time stamp. And thread name, current class/method, request trace ID, severity level, etc., to every log line in your app. Or just grab your favorite logging lib from Maven Central and call it a day.
- piaste 5y agoCool, now make it so that only high-severity logs from a particular set of subroutines get sent to a particular subset of employees, grouped into a daily email. And make it possible to change any of those knobs at runtime, without touching the code (minimum severity, set of subroutines, set of recipients, delivery method).
- unbanned 5y agoLog parsing service filters and alerts (data dog, newrelic, splunk etc..)
- 5y ago
- titzer 5y ago> This is where software goes wrong the most for me. I want, year after year, to come back to a tool and be able to apply the knowledge I acquired the last time I used it, to new things I learn, and build on it. I want to hone my craft by growing a deep understanding of the tools I use. This resonates with me deeply. Mastery of any subject needs a level of stability and permanence so that a skill base and a knowledge base doesn't erode away over time. Change is that erosive force, and we're so bad at knowing what changes to make in the software world.
- rdxm 5y agoI call *BULL SHIT** Backwards compatibility doesn't trump catastrophic failure. Break people's shit to prevent a disaster. The idea that backwards compatibility is more important than safety is moronic. That simple....
- seanieb 5y agoMuch like the truism I heard over the last week “friends don’t let friends use us-east-1”, this is one I heard a few years ago “Everything under the Apache umbrella is shit or will turn to shit.”
- dboreham 5y agoI doubt anyone would have demanded retention of a feature where log _payload_ could cause the library to punch a connection to a server specified in the payload then _execute_ the response for any reason, never mind backwards compatibility.
- rodmena 5y agoBy the way, what was the last time we experienced such catastrophic bugs in Python/Erlang/Ruby/Go... libraries? I think simplicity is deeply interconnected with security. Perfection comes from simplicity, and the choice of programming language can and will affect the security of your platform. Although I have to admit, bad engineering and over usage of libraries could happen in every environment, but Java technologies are unnecessarily complex compare to others tech stacks.
- deleted 5y ago[deleted]
- _old_dude_ 5y ago10 years ago, with DDOS attacks using hash table collision [1]. It was a sad Christmas, lot of RoR servers to patch. [1] https://www.securityweek.com/hash-table-collision-attacks-could-trigger-ddos-massive-scale https://www.securityweek.com/hash-table-collision-attacks-co...
- rodmena 5y agohttps://imgs.xkcd.com/comics/dependency.png https://imgs.xkcd.com/comics/dependency.png
- grogers 5y agoIronically, on a previous team I had switched our log4j2 log formats over to %m{nolookups} like 8 months ago... I didn't realize the whole jndi issue, what we ran into was the O(n^2) behavior of its string substitution. While deploying an ancillary change, our jvms started locking up for minutes on end. What was happening was that we were logging customer input, and the change caused it to run certain things in parallel, which ended up logging the data multiple times. Normally the extra logging didn't matter but one customer had data like "${foo} ${bar} ${baz} ...". Even when the ${foo} portion is replaced wothout modification, this triggers quadratic behavior. So we were already potentially vulnerable to the DOS but it was rare enough that we never got locked up until logging the string multiple times, which then overflowed log4js internal buffer and blocked worker threads. You can try this yourself by just logging a string like "${}${}${}..." And in fairly short order it starts taking forever. I'm very glad the fix in 2.15 is to disable lookups by default. I hope that in the time after I left, the security org at the big tech company I worked at and reported this to (as I thought it was - a dos vector, not the complete pwnage it actually was) forced teams to switch to nolookups. Otherwise a lot of people had a bad week forcing updates through...
- kaeso 5y ago> So we were already potentially vulnerable to the DOS [...] > the security org at the big tech company I worked at and reported this to I'm confused about these two statements, because I did not find any recent CVEs for log4j in the DoS category, nor related to format lookup (other than CVE-2021-44228 of course). Perhaps I misread it, but are you basically saying that (after you reported the issue to them internally) the security team at your previous company could not successfully report a DoS vulnerability in the default configuration of a widely used (by them, at least) Apache library and make sure a CVE got assigned to track it? If so, it would be interesting to know where the CVE/vuln-reporting chain broke, possibly to reduce the blast radius for similar future cases. Hypothetically speaking, a CVE in March for a DoS in a problematic design/feature could have resulted in flipping the default setting earlier. Instead of chasing live RCE in the wild in December.
- cerved 5y ago
- stalfosknight 5y agoBut who wanted this feature for “backward compatibility reasons”?
- dvhh 5y agoThe thing is with such a large footprint you would have little desire to deal with "this release broke my application" type of ticket that would require you hours of attention before finding out what removed feature broke the user case.
- stalfosknight 5y agoThen don't deal with it. It's free software without any warranty. No one is under any obligation to make any user happy.
- dvhh 5y agoKeeping the feature around is also a way of not dealing with it.
- deleted 5y ago[deleted]
- 66fm472tjy7 5y ago> Log4j maintainers have been working sleeplessly on mitigation measures; fixes, docs, CVE, replies to inquiries, etc. They've been doing a poor job of communicating. Considering the attention this issue is getting, they should have a prominent notice on their project page[0] about it like the one Logback[1] has telling people that they are not affected. Furthermore, even their post about the issue[2] still fails to clarify many details like * are people using newer JDK versions safe, like one commenter in this very thread assumed[3] ? * does it only affect the format string and not parameters as many [falsely] claimed when the news started making the rounds ? * what should people trying to block exploitation on a firewall level look for ? > for a feature we all dislike yet needed to keep due to backward compatibility concerns. They have not recognized the security risk posed by what is effectively an expression language interacting with user-submitted data. Java projects used in server-side templating like OGNL, JSP and JSF implementations, Spring keep having security vulnerabilities with this even after 20+ years. It is an effectively impossible task to get this 100% secure. The ridicule Log4j is getting serves a purpose beyond fun: it lets people know that the project's maintainers are not up to the task and another logging library should be used instead, as there might be more issue still undiscovered or added in the future. [0] https://archive.ph/ZhjWO https://archive.ph/ZhjWO [1] https://archive.fo/QkzIy https://archive.fo/QkzIy [2] https://archive.fo/NvjKP https://archive.fo/NvjKP [3] https://archive.fo/5cNtw https://archive.fo/5cNtw
- dvhh 5y ago- Newer version of JDK kind of mitigate the issue by disallowing by default the vector used to get the untrusted code. - Parameters are affected as well as it seems that there is some form of recursive string interpolation going on. - Packet inspection would lookup for the string interpolation for jndi lookup in the client message "${jndi:" which in most case should have no reason in being in client trafic (if not compressed). Again the risk is real when the server use un-sanitized client data.
- andrew_ 5y ago> Yet nothing is stopping people to bash us, for work we aren't paid for, for a feature we all dislike yet needed to keep due to backward compatibility concerns. Does log4j not utilize a versioning scheme that has the notion of "breaking changes"? Anyone following semver, for example, could simply release a major to do away with an extremely troubling, and apparently well-known, back compat issue. Sounds like folks are right to criticize for poor decision making.
- smarx007 5y ago> but complaints would have bubbled up to the Apache umbrella organization, which no doubt has plenty of Words written about "proper" versions, and the letter of rules would have been used to add heavily to their burden, while the spirit of compatibility is ignored. Tailscale is wonderful software, but with all due respect I don't think David has much experience with Apache Foundation or Eclipse Foundation projects. I am a project lead of one (way smaller) Eclipse Foundation project and keep a close watch on another (bigger, but nowhere near the log4j scale) Apache Foundation project. We are free to make breaking changes (and make them we do). In both Foundations, there is a Project Management Committee that signs off on releases. They would normally raise an eyebrow if you try to push a breaking change into a patch release, but their reaction would normally be "why don't you bump the major version?". Edit: there is indeed a social contract between the project leadership and the users. We have a social contract of supporting the oldest possible JVM for our project. Now some of our dependencies (guess what, that ASF project!) dropped Java 8 support and published a few CVEs since and we are going to move to JDK 11 as a baseline soon. Yes, some users are grumpy but people understand that unless someone forks that ASF project and starts backporting CVE fixes, we got to make the move. Bottom line: it's a much more social process than a bureaucratic one.
- optimalsolver 5y ago>but complaints would have bubbled up to the Apache umbrella organization Like a thrown exception.
- crawshaw 5y agoHello. You're right that I have little experience with them, I've submitted code but never run a project. I believe I misread some commentary to convince myself of this. Paragraph removed. Thanks! I suspect there is some kind of cultural pressure somewhere. Perhaps some of that comes from the versioning system, the maintainers are convinced they can't remove a feature without bumping a major version, and are simultaneously convinced they need to do a lot of work for others they don't have time to to bump the major version number? I believe neither statement should be true in reasonably run open source.
- cplusplusfellow 5y agoMaybe this will hasten the demise of Java
- erdaniels 5y agoWhy does Java the language have to be a target of demise because of an exploit in a library written in it? This kind of exploit would be possible in other languages.
- aszen 5y agoJava has remote code execution as a feature built in, which is possible in other languages but not widely used.
- deleted 5y ago[deleted]
- revskill 5y agoNow i could consider Java as Flash in server and it'll eventually be killed by Javascript ?
- InTheArena 5y agoI just noticed that my Ubiquti Dream Machine Pro's IPS feature (which is just suricata) was just updated to block this attack.
- universenz 5y agoHow do you know what the UDM IPS does/does not block? Is it displayed somewhere? Is it updated at a different cadence to the firmware/software updates?
- barbarbar 5y agoBut the issue was also fixed in all recent versions of JVM's. So it is only an issue on "old" versions - right?
- xendo 5y agoThat's incorrect, while LDAP portion of this problem is mitigated im new JDKs there are other vectors of attack like RMI. It's by far the easiest and most severe vulnerability I've ever seen.
- barbarbar 5y agoDo you have a source for that?
- xendo 5y agohttps://www.veracode.com/blog/research/exploiting-jndi-injections-java https://www.veracode.com/blog/research/exploiting-jndi-injec...
- barbarbar 5y agoAs they mention these are custom examples where you make lookup on user supplied string. But do you have an example of that? It seems highly unlikely to do jndi lookups based on user input.
- xendo 5y ago${jndi:rmi://localhost:1099/ObjectName} will do the lookup to the lookup to the RMI server for ObjectName.
- cooldevguy 5y agoCompletely understandable critical point on why "backward compatibility" means so much. I remember submitting a bug report and a pull request in the Amazon SES SDK library for .Net that basically fixed an issue when trying to send an attachment to anyone in the BCC field, just to be told it couldn't be done since it would break backward compatibility...even when the feature itself was broken....
- dotancohen 5y ago> I want to be able to build knowledge of the library over a long time, to hone my craft. This is my problem not only with programing languages but also with desktop environments and other tools. It's actually why I see people preferring LibreOffice Writer over MS Word in some fields, and why some people stick with e.g. PHP when NodeJS or Python would, in a stable world, be the objectively better technology.
- alkonaut 5y agoI have used logging all my life (2 decades career) and even log4j at times, but I can’t remember ever logging any messages that were expanded by the logging runtime (rather than at compile time or by the language runtime). Have I been missing out on anything important? Of course the configured log pattern is expanded like log level and date, but if I understand correctly this expansion can take place in log messages?
- pcl 5y agoYes — simple pattern expansion is pretty handy. For example: log.debug(“Added {} records”, added.size()); In this example, the cost of string concatenation / interpolation can be avoided when debug-level logging isn’t enabled, which is a lot cleaner to read than surrounding all the detailed logging with “if (log.debugEnabled())” checks. I agree that the more complex expansions that log4j evolved to support are of pretty marginal use. The oft-cited examples — context information — are IMO better added as additional fields in the log record than developer-interpolated strings.
- alkonaut 5y agoYes that expansion I use of course. But that’s what I meant by by the language runtime, e.g the log(String msg, object[] args) is merely used as an alias for log(String.format(msg, args)).
- pcl 5y agoGotcha. The difference is important, since a good log framework won't simply delegate, but will first check that the log level is enabled. This often matters, if there are any log statements in high-cardinality loops, since the memory pressure of creating all the strings adds up, but the trivial stack frames can often be optimized away / trivialized, depending on the language, runtime, etc. I used to be a big believer in doing manual log-enabled checks, but man, does that make the code noisy. I still do that when I want to log something non-trivial to compute, but that's the exception, not the rule.
- jasode 5y ago
- nova22033 5y agoCompare the shifting sands of Swift with the stability of awk. That is not a good comparison..
- darthrupert 5y agoBackwards compatibility over quality is possibly the dumbest fucking idea our field has punished itself with. When we fail to combat it, we deserve the pain we get. That said, unpaid developers deserve shit just as much as they are receiving compensation. Although fame can be some sort of compensation, you shouldn't lose more of it than you've gained by doing the project.
- dvhh 5y agoFor exposure
- m3047 5y agoSure, people who are making money building on FOSS tools should understand that they bear the burden of fitness for their environment. Maybe they do. If so, they've done a good job of deflecting attention. Let me tell you a story about something that happened to me this spring. I had trouble logging in to my customer account at a critical infrastructure provider (utility provider). When I called customer support one thing led to another and they ended up reading me my password from their internal systems. (Let that sink in.) So I spent a week trying to get ahold of someone to let them know how fucked up that is, which they avoided, until ultimately they claimed I was "threatening" them. I reached out to the "hidden hand" of the internet, did anyone have contacts with their MSP (with "National" and [edit: changed from "Infrastructure"] "Information" in the name)? But nobody did, so someone whose name would be recognized offered to tweet it. Didn't take long to hear from MSP's Chief Cloud Architect. The story that they tell is that they'd like to turn the feature off but the customer won't let them. Discuss.
- sandmandf137731 5y agoHow we visualized and fixed runtime exposure due to vulnerable Elasticsearch, using ThreatMapper https://deepfence.io/cve-2021-44228-log4j2-exploitability-and-attack-path-mitigation-with-threatmapper/ https://deepfence.io/cve-2021-44228-log4j2-exploitability-an... https://github.com/deepfence/ThreatMapper https://github.com/deepfence/ThreatMapper