Skip to content

Conversation

@yawkat
Copy link
Owner

@yawkat yawkat commented Dec 2, 2025

An ArrayIndexOutOfBoundsException could indicate either an out-of-bounds access, or invalid arguments (e.g. offset < 0). Since we want to detect the former in the fuzz tests, we need to make sure the latter doesn't happen. This PR:

  • Disables the ArrayIndexOutOfBoundsException catch so that it's reported by the fuzzer
  • Fixes a bug in the test where the src length was larger than allowed
  • Adjusts the LZ4JNIFastDecompressor to throw an LZ4Exception on empty input rather than an ArrayIndexOutOfBoundsExceptions (made by @Marcono1234; not security relevant, this only changes the exception. LZ4JNIFastDecompressor is also disabled by default due to CVE-2025-12183)

With these changes, a quick fuzz run now only shows the native_fast_* tests failing, both with a segfault, which is expected due to CVE-2025-12183.

yawkat and others added 3 commits December 2, 2025 11:46
This matches the recent changes for the non-JNI fast decompressors, and allows
changing the fuzz test to not consider `ArrayIndexOutOfBoundsException` as
expected exception anymore.
@yawkat yawkat changed the title Fix src length in LZ4DecompressorTest Fix remaining ArrayIndexOutOfBoundsExceptions in LZ4DecompressorTest Dec 2, 2025
@yawkat yawkat merged commit d2d01a7 into main Dec 2, 2025
2 checks passed
@yawkat yawkat deleted the fuzz-src-length branch December 2, 2025 11:28
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

Successfully merging this pull request may close these issues.

3 participants