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

Scanner crashes with -Xmx option and very low memory limits #272

Open
thl-cmk opened this issue Feb 5, 2022 · 2 comments
Open

Scanner crashes with -Xmx option and very low memory limits #272

thl-cmk opened this issue Feb 5, 2022 · 2 comments
Assignees
Labels
discussion question or suggestion

Comments

@thl-cmk
Copy link

thl-cmk commented Feb 5, 2022

Hi,

if you run the scanner with the -Xmx option and very low limits (like 1M), then the scanner srashes with

Error: Garbage-collected heap size exceeded.
java.lang.OutOfMemoryError: Garbage-collected heap size exceeded.

Scanner run with -Xmx1M option

$ sudo /usr/lib/check_mk_agent/bin/log4j2-scan / -Xmx1M
Logpresso CVE-2021-44228 Vulnerability Scanner 2.9.1 (2022-02-03)
Scanning directory by user 'root': / (without /dev, /run, /dev/shm, /run/lock, /sys/fs/cgroup, /proc/sys/fs/binfmt_misc, /run/user/126, /run/user/1000)

Scanned 1098 directories and 13102 files
Found 0 vulnerable files
Found 0 potentially vulnerable files
Found 0 mitigated files
Completed in 0.07 seconds
Error: Garbage-collected heap size exceeded.
java.lang.OutOfMemoryError: Garbage-collected heap size exceeded.

Scanner run with -Xmx10M option

$ sudo /usr/lib/check_mk_agent/bin/log4j2-scan / -Xmx10M
Logpresso CVE-2021-44228 Vulnerability Scanner 2.9.1 (2022-02-03)
Scanning directory by user 'root': / (without /dev, /run, /dev/shm, /run/lock, /sys/fs/cgroup, /proc/sys/fs/binfmt_misc, /run/user/126, /run/user/1000)

Scanned 28716 directories and 221340 files
Found 0 vulnerable files
Found 0 potentially vulnerable files
Found 0 mitigated files
Completed in 1.37 seconds
@xeraph xeraph self-assigned this Feb 5, 2022
@xeraph xeraph added the discussion question or suggestion label Feb 5, 2022
@xeraph
Copy link
Contributor

xeraph commented Feb 5, 2022

@thl-cmk In general, that is not intended memory limit. Most JVM application cannot run under 64MB.

@thl-cmk
Copy link
Author

thl-cmk commented Feb 5, 2022

I see, maybe you can add a lower limit, just to avoid the crash.

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

No branches or pull requests

2 participants