Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Critical issue on Windows #35

Closed
KrisJanssen opened this issue Dec 17, 2021 · 3 comments
Closed

Critical issue on Windows #35

KrisJanssen opened this issue Dec 17, 2021 · 3 comments

Comments

@KrisJanssen
Copy link
Contributor

KrisJanssen commented Dec 17, 2021

@yunzheng : you use standard path libraries for the lookups of files in zip files: this approach is incorrect.

image

On windows the Exception will always be hit becasue the path for lookup of the class gets passed in the wrong format:

'org\\apache\\logging\\log4j\\core\\lookup\\JndiLookup.class'

rather than

'org/apache/logging/log4j/core/lookup/JndiLookup.class'

And since you have defaulted to setting has_lookup = False, VULNERABLE jars are being labeled PATCHED.

This is very bad if people using windows are to rely on your tool...

The behavior is inconsistent across your codebase... this is OK:

image

Furtheron it is not OK:

image

@yunzheng
Copy link
Member

Hi, thanks for reporting the issue!

I will look into the path joining inconsistencies in Zip files on windows later, for now I merged a patch that fixes the correct intended behavious (has_lookup=True). So it should not show up as PATCHED by default now.

@KrisJanssen
Copy link
Contributor Author

I have a fix... will send pull request

@yunzheng
Copy link
Member

Issue should be fixed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants