News for hackers. Stuff that matters.
Re:Log4j: Between a rock and a hard place by josephcsible on Sunday December 12, 2021 @06:01PM (#29534598)
What language besides Java has a "feature" that requires a whitelist to use reflection, that you can't just say "everything" for? Or is Java the only secure programming language that exists?
Re:Log4j: Between a rock and a hard place by pron on Monday December 13, 2021 @05:09AM (#29538279)
Strong encapsulation isn'y a whitelist for reflection. It forbids the turning off of access control by arbitrary libraries (you do know that even before modules you had to explicitly setAccessible if you wanted to break through access control) -- unless the application explicitly allows it. Some languages don't have reflection at all, and among those that do, Java is clearly the language that is by far most popular for serious business-critical applications.
Re:Log4j: Between a rock and a hard place by josephcsible on Monday December 13, 2021 @11:27AM (#29541058)
> you do know that even before modules you had to explicitly setAccessible if you wanted to break through access control

Yes, I do know that, and I'm fine with it. If it still worked then I wouldn't mind modules. My complaint in particular is that a command line whitelist is needed for setAccessible to work anymore.

Re:Log4j: Between a rock and a hard place by pron on Monday December 13, 2021 @01:52PM (#29542926)
Right, but the command-line is intentional: it is intended to make the application aware of potential maintenance and/or security issues, and setAccessible is really a potential maintenance and/or security issue. The only argument against it would be the desire to allow libraries to impose such risks on applications without the application knowing about it. I understand why some library authors would not like their users to know their libraries pose such a risk, but obviously the applications should take precedence.
Re:Log4j: Between a rock and a hard place by josephcsible on Monday December 13, 2021 @05:27PM (#29545501)
My issue isn't that it needs a command line parameter. It's that you need to create a whitelist that enumerates everything that anything is going to use individually. I'd be fine with modules if --add-opens had a "let this module reflectively access everything" wildcard, or if --illegal-access=permit were never removed.
Re:Log4j: Between a rock and a hard place by pron on Tuesday December 14, 2021 @05:59AM (#29550364)
But that wouldn't express what the potential issue is. You want to know that internal changes in which modules could break you, and/or in what way you're expanding the security attack surface area. Such a library needs to tell you what "bad" things it does and give you a list of modules whose encapsulation in breaks open that you could put on the command line.