CVE-2023-34454 snappy-java's Integer Overflow vulnerability in compress leads to DoS
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: no · technical impact: partial
- Technology
- Ubuntu
Description
snappy-java is a fast compressor/decompressor for Java. Due to unchecked multiplications, an integer overflow may occur in versions prior to 1.1.10.1, causing an unrecoverable fatal error.
The function compress(char[] input) in the file Snappy.java receives an array of characters and compresses it. It does so by multiplying the length by 2 and passing it to the rawCompress` function.
Since the length is not tested, the multiplication by two can cause an integer overflow and become negative. The rawCompress function then uses the received length and passes it to the natively compiled maxCompressedLength function, using the returned value to allocate a byte array.
Since the maxCompressedLength function treats the length as an unsigned integer, it doesn’t care that it is negative, and it returns a valid value, which is casted to a signed integer by the Java engine. If the result is negative, a java.lang.NegativeArraySizeException exception will be raised while trying to allocate the array buf. On the other side, if the result is positive, the buf array will successfully be allocated, but its size might be too small to use for the compression, causing a fatal Access Violation error.
The same issue exists also when using the compress functions that receive double, float, int, long and short, each using a different multiplier that may cause the same issue. The issue most likely won’t occur when using a byte array, since creating a byte array of size 0x80000000 (or any other negative value) is impossible in the first place.
Version 1.1.10.1 contains a patch for this issue.
Upgrade path
11 packages: 2 fixed, 9 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| ubuntu/snappy-java(Ubuntu 14.04) | = 1.0.4.1~dfsg-1; All versions | No fix listed | No fix yet |
| ubuntu/snappy-java(Ubuntu 16.04) | = 1.1.1.7-2; = 1.1.2-1; = 1.1.2.1-2; All versions | No fix listed | No fix yet |
| ubuntu/snappy-java(Ubuntu 18.04) | = 1.1.4-1; All versions | No fix listed | No fix yet |
| ubuntu/snappy-java(Ubuntu 20.04) | = 1.1.7.2-1; = 1.1.7.3-1; = 1.1.7.3-1build1; All versions | No fix listed | No fix yet |
| ubuntu/snappy-java(Ubuntu 22.04) | = 1.1.8.3-1; All versions | No fix listed | No fix yet |
| ubuntu/snappy-java(Ubuntu 24.04) | = 1.1.8.3-1; = 1.1.10.5-1; = 1.1.10.5-1build1; All versions | No fix listed | No fix yet |
| ubuntu/snappy-java(Ubuntu 25.10) | = 1.1.10.7-1; All versions | No fix listed | No fix yet |
| ubuntu/snappy-java(Ubuntu 26.04) | = 1.1.10.7-1; = 1.1.10.8-1; All versions | No fix listed | No fix yet |
| ubuntu/snappy-java(Ubuntu 26.10) | = 1.1.10.8-1; All versions | No fix listed | No fix yet |
| org.xerial.snappy/snappy-java(Maven) | < 1.1.10.1; <= 1.1.10.0; = 1.0.1-rc1; = 1.0.1-rc2 +73 more | 1.1.10.1 | Fixed |
| xerial snappy-java | < 1.1.10.1; = < 1.1.10.1 | 1.1.10.1 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| org.xerial.snappy/snappy-java(Maven) | <= 1.1.10.0 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | < 1.1.10.1 | 1.1.10.1 |
| org.xerial.snappy/snappy-java(Maven) | = 1.0.1-rc1 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.0.1-rc2 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.0.1-rc3 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.0.1-rc4 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.0.3 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.0.3-rc1 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.0.3-rc2 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.0.3-rc3 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.0.3-rc4 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.0.3.1 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.0.3.2 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.0.3.3 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.0.4 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.0.4.1 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.0.5 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.0.5-M1 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.0.5-M2 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.0.5-M3 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.0.5-M4 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.0.5.1 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.0.5.2 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.0.5.3 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.0.5.4 | No fix listed |
Show 79 more
| Product | Affected versions | Fixed in |
|---|---|---|
| org.xerial.snappy/snappy-java(Maven) | = 1.1.0 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.0-M1 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.0-M2 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.0-M3 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.0-M4 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.0.1 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.1 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.1-M1 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.1-M2 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.1-M3 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.1-M4 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.1.1 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.1.2 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.1.3 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.1.4 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.1.5 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.1.6 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.1.7 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.10.0 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.2 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.2-M1 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.2-RC1 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.2-RC2 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.2-RC3 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.2.1 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.2.2 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.2.3 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.2.4 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.2.5 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.2.6 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.3-M1 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.3-M2 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.4 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.4-M1 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.4-M2 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.4-M3 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.7 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.7.1 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.7.2 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.7.3 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.7.4 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.7.5 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.7.6 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.7.7 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.7.8 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.8 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.8.1 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.8.2 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.8.3 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.8.4 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.9.0 | No fix listed |
| org.xerial.snappy/snappy-java(Maven) | = 1.1.9.1 | No fix listed |
| xerial snappy-java | = < 1.1.10.1 | No fix listed |
| ubuntu/snappy-java(Ubuntu:22.04) | All versions | No fix listed |
| xerial snappy-java | < 1.1.10.1 | 1.1.10.1 |
| ubuntu/snappy-java(Ubuntu:24.04) | All versions | No fix listed |
| ubuntu/snappy-java(Ubuntu:26.04) | All versions | No fix listed |
| ubuntu/snappy-java(Ubuntu:26.10) | All versions | No fix listed |
| ubuntu/snappy-java(Ubuntu:14.04) | All versions | No fix listed |
| ubuntu/snappy-java(Ubuntu:14.04) | = 1.0.4.1~dfsg-1 | No fix listed |
| ubuntu/snappy-java(Ubuntu:16.04) | All versions | No fix listed |
| ubuntu/snappy-java(Ubuntu:16.04) | = 1.1.1.7-2 | No fix listed |
| ubuntu/snappy-java(Ubuntu:16.04) | = 1.1.2-1 | No fix listed |
| ubuntu/snappy-java(Ubuntu:16.04) | = 1.1.2.1-2 | No fix listed |
| ubuntu/snappy-java(Ubuntu:18.04) | All versions | No fix listed |
| ubuntu/snappy-java(Ubuntu:18.04) | = 1.1.4-1 | No fix listed |
| ubuntu/snappy-java(Ubuntu:20.04) | All versions | No fix listed |
| ubuntu/snappy-java(Ubuntu:20.04) | = 1.1.7.2-1 | No fix listed |
| ubuntu/snappy-java(Ubuntu:20.04) | = 1.1.7.3-1 | No fix listed |
| ubuntu/snappy-java(Ubuntu:20.04) | = 1.1.7.3-1build1 | No fix listed |
| ubuntu/snappy-java(Ubuntu:22.04) | = 1.1.8.3-1 | No fix listed |
| ubuntu/snappy-java(Ubuntu:24.04) | = 1.1.8.3-1 | No fix listed |
| ubuntu/snappy-java(Ubuntu:24.04) | = 1.1.10.5-1 | No fix listed |
| ubuntu/snappy-java(Ubuntu:24.04) | = 1.1.10.5-1build1 | No fix listed |
| ubuntu/snappy-java(Ubuntu:25.10) | All versions | No fix listed |
| ubuntu/snappy-java(Ubuntu:25.10) | = 1.1.10.7-1 | No fix listed |
| ubuntu/snappy-java(Ubuntu:26.10) | = 1.1.10.8-1 | No fix listed |
| ubuntu/snappy-java(Ubuntu:26.04) | = 1.1.10.7-1 | No fix listed |
| ubuntu/snappy-java(Ubuntu:26.04) | = 1.1.10.8-1 | No fix listed |
References
- https://github.com/xerial/snappy-java/security/advisories/GHSA-fjpj-2g6w-x25r exploit issue-tracking vendor-advisory
- https://github.com/xerial/snappy-java/commit/d0042551e4a3509a725038eb9b2ad1f683674d94 issue-tracking patch
- https://github.com/xerial/snappy-java/blob/05c39b2ca9b5b7b39611529cc302d3d796329611/src/main/java/org/xerial/snappy/Snappy.java#L169 issue-tracking
- https://github.com/xerial/snappy-java/blob/master/src/main/java/org/xerial/snappy/Snappy.java issue-tracking product
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com
- github.com product
- Ubuntu CVE tracker issue-tracking vendor-advisory
- www.cve.org issue-tracking