CVE-2023-34455snappy-java's unchecked chunk length leads to DoS
snappy-java is a fast compressor/decompressor for Java. Due to use of an unchecked chunk length, an unrecoverable fatal error can occur in versions prior to 1.1.10.1. The code in the function hasNextChunk in the fileSnappyInputStream.java checks if a given stream has more chunks to read. It does that by attempting to read 4 bytes. If it wasn’t possible to read the 4 bytes, the function returns false. Otherwise, if 4 bytes were available, the code treats them as the length of the next chunk. In the case that the `compressed` variable is null, a byte array is allocated with the size given by the input data. Since the code doesn’t test the legality of the `chunkSize` variable, it is possible to pass a negative number (such as 0xFFFFFFFF which is -1), which will cause the code to raise a `java.lang.NegativeArraySizeException` exception. A worse case would happen when passing a huge positive value (such as 0x7FFFFFFF), which would raise the fatal `java.lang.OutOfMemoryError` error. Version 1.1.10.1 contains a patch for this issue.
What to do
Fixed builds are available from Maven: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | snappy-java | Fix pending | UBUNTU-CVE-2023-34455 | |
| Ubuntu 26.04 | snappy-java | Under investigation | UBUNTU-CVE-2023-34455 | |
| Ubuntu 25.10 | snappy-java | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2023-34455 | |
| Ubuntu 24.04 | snappy-java | Under investigation | UBUNTU-CVE-2023-34455 | |
| Ubuntu 22.04 | snappy-java | Under investigation | UBUNTU-CVE-2023-34455 | |
| Ubuntu 20.04 | snappy-java | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2023-34455 | |
| Ubuntu 18.04 | snappy-java | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2023-34455 | |
| Ubuntu 16.04 | snappy-java | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2023-34455 | |
| Ubuntu 14.04 | snappy-java | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2023-34455 | |
| Red Hat Enterprise Linux 9 | log4j | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 9 | log4j-jcl | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 9 | log4j-slf4j | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 8 | log4j | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 8 | log4j-jcl | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 8 | log4j-slf4j | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 8 | log4j-web | Will not fix Will not fix | ||
| Maven library | org.xerial.snappy:snappy-java | Fixed | 1.1.10.1 | GHSA-qcwq-55hx-v3vh |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- xerial snappy-java: affected: < 1.1.10.1
References
- https://github.com/xerial/snappy-java/security/advisories/GHSA-qcwq-55hx-v3vh
- https://github.com/xerial/snappy-java/commit/3bf67857fcf70d9eea56eed4af7c925671e8eaea
- https://github.com/xerial/snappy-java/blob/05c39b2ca9b5b7b39611529cc302d3d796329611/src/main/java/org/xerial/snappy/SnappyInputStream.java#L388
- https://github.com/xerial/snappy-java/blob/master/src/main/java/org/xerial/snappy/SnappyInputStream.java
- https://security.netapp.com/advisory/ntap-20230818-0009/
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.