4 ms·
Not a flaw in Java, a flaw in a specific overengineered logging framework. Relevantly, not a flaw that applies to JGit.
by lmm 5y ago
Not a flaw in Java, a flaw in a specific overengineered logging framework. Relevantly, not a flaw that applies to JGit.
- echelon 5y agoRuntime classloaders expose a huge blast radius. That's unfortunately a Java language feature.
- throwaway894345 5y agoNot only a feature but an idiom.
- lmm 5y agoMost languages' built-in serialization has similar issues, e.g. Python pickle.
- throwaway894345 5y agoEven if this is true, most languages don’t use dynamic code loading as often as Java.
- lmm 5y agoIn what sense? In many popular languages (Perl/Python/Ruby/...) all code loading is dynamic. Java does have more of a built in RMI framework than most languages, but it's rarely used in modern code.
- nine_k 5y agoPick a few random executables from your OS, check how many .dll or .so libraries do they dynamically link to. For Python, JavaScript, Ruby, etc it's not even a question.
- tsimionescu 5y agoAs does dynamic linking, which is perfectly equivalent.
- runeks 5y agoTrue, but that doesn’t make it better.
- tsimionescu 5y agoWell, there are 0 languages that don't support dynamic linking, so I don't see why we would single out Java.
- runeks 5y agoDynamic linking is not a language feature, it’s a feature of the operating system. If we’re talking about dynamic loading, there are plenty of languages that don’t support this natively, but only through its C bindings (e.g. Haskell).
- marginalia_nu 5y agoI guarantee Java would be vulnerable to the same category of errors even without runtime class loaders. Java puts a lot of emphasis on dependency injection, and has done this for a fairly long time. This takes the form of having classes pull dependencies themselves through some central registry over explicit construction. It's arguably a symptom of a larger problem the ecosystem's sheer size.
- netheril96 5y agoYou practically cannot have the same vulnerability in C, because no one would bother implementing that kind of flexibility in C.
- lmm 5y agoAnd if you disconnect your computer from the internet then it's safe from most remote attacks.
- pjmlp 5y agoAnother one that never saw the heyday of enterprise C code.
- dtech 5y ago"Our language is harder to use than X, so it's safer because no-one will try to do certain things with it" is hardly a compelling defence.
- rat9988 5y agoIt wasn't meant as a defence.
- reyqn 5y agoWas there not a flaw in the jndi api for ldap? log4j was just the entry point from what I understood.
- drdec 5y agoNo, JNDI is an API for accessing remote code. It stands for Java Naming and Directory Interface. Not supporting LDAP, the most common remote directory, would have been a flaw. The flaw was in log4j's use of the library which allowed remotely connecting and executing code by default based on connection strings which were possibly user-entered.
- reyqn 5y agoOk so JNDI's purpose is actually accessing remote code. You just have to not give it any untrusted data. It seems like a dangerous tool to use.