snappy-java: JVM crash from unchecked ranges in Snappy.arrayCopy and SnappyOutputStream.rawWrite
Package
Affected versions
<= 1.1.10.8
Patched versions
1.1.10.9
Description
Published by the National Vulnerability Database
Oct 26, 2026
Published to the GitHub Advisory Database
Oct 27, 2026
Reviewed
Oct 27, 2026
Impact
Snappy.arrayCopy(Object src, int offset, int byteLength, Object dest, int destOffset)called a nativememcpywithout validating the ranges. A negative or oversizedbyteLengthor offset read or wrote outside the arrays and crashed the JVM.SnappyOutputStream.rawWriteandSnappyInputStream.rawRead, and therefore the typed-arraywrite/readmethods, pass caller-supplied ranges to this method.Patches
Fixed in 1.1.10.9 (#741).
Snappy.arrayCopychecks both ranges before copying. The streamread/writemethods validate offsets and lengths, and reject typed-array ranges whose byte size overflowsint.Workarounds
Validate offsets and lengths before calling these methods.
References