CVE-2023-34455

Source
https://cve.org/CVERecord?id=CVE-2023-34455
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-34455.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2023-34455
Aliases
Downstream
Related
Published
2023-06-15T17:15:00.311Z
Modified
2026-07-22T02:25:11.768301Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
snappy-java's unchecked chunk length leads to DoS
Details

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.

Database specific
{
    "cwe_ids": [
        "CWE-770"
    ],
    "cna_assigner": "GitHub_M",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/34xxx/CVE-2023-34455.json"
}
References

Affected packages

Git / github.com/xerial/snappy-java

Affected ranges

Type
GIT
Repo
https://github.com/xerial/snappy-java
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Fixed
Database specific
{
    "source": [
        "CPE_RANGE",
        "REFERENCES"
    ],
    "cpe": "cpe:2.3:a:xerial:snappy-java:*:*:*:*:*:*:*:*",
    "extracted_events": [
        {
            "introduced": "0"
        },
        {
            "fixed": "1.1.10.1"
        }
    ]
}

Affected versions

1.*
1.0.5-M4
1.1.0
1.1.0-M1
1.1.0-M3
1.1.2.5
1.1.3-M1
1.1.3-M2
1.1.4
1.1.4-M1
1.1.4-M2
1.1.4-M3
1.1.7
1.1.7.1
1.1.7.2
1.1.7.3
1.1.7.4
1.1.7.5
1.1.7.6
1.1.7.7
1.1.7.8
1.1.8
1.1.8.1
1.1.8.2
1.1.8.3
1.1.8.4
snappy-java-1.*
snappy-java-1.0.1-rc1
snappy-java-1.0.1-rc2
snappy-java-1.0.1-rc3
snappy-java-1.0.1-rc4
snappy-java-1.0.3
snappy-java-1.0.3-rc1
snappy-java-1.0.3-rc2
snappy-java-1.0.3-rc3
snappy-java-1.0.3-rc4
snappy-java-1.0.3.1
snappy-java-1.0.3.2
snappy-java-1.0.3.3
snappy-java-1.0.4
snappy-java-1.0.4.1
v1.*
v1.1.10.0
v1.1.9.0
v1.1.9.1

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-34455.json"
vanir_signatures
[
    {
        "source": "https://github.com/xerial/snappy-java/commit/3bf67857fcf70d9eea56eed4af7c925671e8eaea",
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "function_hash": "244026794097500615154634650354854703763",
            "length": 1414.0
        },
        "id": "CVE-2023-34455-107be95b",
        "target": {
            "function": "hasNextChunk",
            "file": "src/main/java/org/xerial/snappy/SnappyInputStream.java"
        },
        "deprecated": false
    },
    {
        "source": "https://github.com/xerial/snappy-java/commit/737f3973ff392c351da2744820a23a0521c6cc77",
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "function_hash": "305806183518270641982183783563680953015",
            "length": 108.0
        },
        "id": "CVE-2023-34455-592080d3",
        "target": {
            "function": "isTooLargeFloatArrayInputLength",
            "file": "src/test/java/org/xerial/snappy/SnappyTest.java"
        },
        "deprecated": false
    },
    {
        "source": "https://github.com/xerial/snappy-java/commit/737f3973ff392c351da2744820a23a0521c6cc77",
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "function_hash": "197601775410030034425030989621733157535",
            "length": 108.0
        },
        "id": "CVE-2023-34455-5a878089",
        "target": {
            "function": "isTooLargeShortArrayInputLength",
            "file": "src/test/java/org/xerial/snappy/SnappyTest.java"
        },
        "deprecated": false
    },
    {
        "source": "https://github.com/xerial/snappy-java/commit/737f3973ff392c351da2744820a23a0521c6cc77",
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "function_hash": "204471860700078750244256335571282342429",
            "length": 112.0
        },
        "id": "CVE-2023-34455-63df3fd6",
        "target": {
            "function": "isTooLargeIntArrayInputLengthForBitShuffleShuffle",
            "file": "src/test/java/org/xerial/snappy/SnappyTest.java"
        },
        "deprecated": false
    },
    {
        "source": "https://github.com/xerial/snappy-java/commit/3bf67857fcf70d9eea56eed4af7c925671e8eaea",
        "signature_type": "Line",
        "signature_version": "v1",
        "digest": {
            "line_hashes": [
                "11759047504712812508383605626335663359",
                "140630794204187362098884038857956726760",
                "110694122174495847682487204595549176705",
                "209378172529807401014137670033614511824",
                "111846052450074792690205110610891560013"
            ],
            "threshold": 0.9
        },
        "id": "CVE-2023-34455-6771500d",
        "target": {
            "file": "src/main/java/org/xerial/snappy/SnappyInputStream.java"
        },
        "deprecated": false
    },
    {
        "source": "https://github.com/xerial/snappy-java/commit/737f3973ff392c351da2744820a23a0521c6cc77",
        "signature_type": "Line",
        "signature_version": "v1",
        "digest": {
            "line_hashes": [
                "261490785213025088667069519084385851285",
                "115180712698337214823336110482447980625",
                "185907569882866238489617931437768938230",
                "22766503012425561424347399626528426951",
                "47398372620838087293680663528119740885",
                "41439093073927938110424749635254633261",
                "241695992710027770388212532187292688290",
                "11246926499948285723754033511824957870",
                "298679599759123174924233449535123759814",
                "45439918193121619900213237061969853886",
                "30339311328546172599591398205177837163",
                "262126763193147493736605011807842713388",
                "60419524623487266613818866035678234667",
                "30814859348266383738399799573203192360",
                "88935231798783490651157935921504198216",
                "263308192564578953736411226870211669888",
                "233941339245417874827491070275106647559",
                "200258048960167040915388793802630733340",
                "183187363726692826116225043875719019933",
                "155944938025986211226064265962161225723",
                "77558098731799044015715635386911215536",
                "232903719964141847364936129034092060485",
                "245807789503580552370905330195606271044",
                "100252214819795669869488265287721696508",
                "37669627717310838818627131730005140703",
                "34001605554692726682637233224876866877",
                "279338451731205710147633082127329874606",
                "321547289523068309104143795617141525205",
                "246719486730118627021880866087983066673",
                "59120396845946570217300674942297236642",
                "62715668921460923325684843237737517265",
                "54094140783130811437880578714274541307",
                "75132167340552452825613793757449311636",
                "117477783293538305630240968745778268154",
                "196355941320863816565027561776687257012",
                "191315562440801440895118284696020563944",
                "180896432979654649654648714006639275164",
                "284569385832404136914000303131363925326",
                "88882916771909372740860740870539163218",
                "32272416715699875947325003550027131795",
                "309227563581567467663266503621092250926",
                "244751548516870372589955283081946241523",
                "9003947851440586996324164925868312933",
                "42565030544582528712807468368939449357",
                "290903690178320527250333709068364564171",
                "284917218618121208025823608059698997375",
                "155850013146986049844481716476322442081"
            ],
            "threshold": 0.9
        },
        "id": "CVE-2023-34455-6ca58f9e",
        "target": {
            "file": "src/test/java/org/xerial/snappy/SnappyTest.java"
        },
        "deprecated": false
    },
    {
        "source": "https://github.com/xerial/snappy-java/commit/737f3973ff392c351da2744820a23a0521c6cc77",
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "function_hash": "115694192477457560882035332182505764005",
            "length": 112.0
        },
        "id": "CVE-2023-34455-6cfba378",
        "target": {
            "function": "isTooLargeLongArrayInputLengthForBitShuffleShuffle",
            "file": "src/test/java/org/xerial/snappy/SnappyTest.java"
        },
        "deprecated": false
    },
    {
        "source": "https://github.com/xerial/snappy-java/commit/737f3973ff392c351da2744820a23a0521c6cc77",
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "function_hash": "246469542818760304691132520761796565410",
            "length": 108.0
        },
        "id": "CVE-2023-34455-7ccf9ef9",
        "target": {
            "function": "isTooLargeDoubleArrayInputLength",
            "file": "src/test/java/org/xerial/snappy/SnappyTest.java"
        },
        "deprecated": false
    },
    {
        "source": "https://github.com/xerial/snappy-java/commit/737f3973ff392c351da2744820a23a0521c6cc77",
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "function_hash": "246469542818760304691132520761796565410",
            "length": 108.0
        },
        "id": "CVE-2023-34455-7dfb9654",
        "target": {
            "function": "isTooLargeLongArrayInputLength",
            "file": "src/test/java/org/xerial/snappy/SnappyTest.java"
        },
        "deprecated": false
    },
    {
        "source": "https://github.com/xerial/snappy-java/commit/3bf67857fcf70d9eea56eed4af7c925671e8eaea",
        "signature_type": "Line",
        "signature_version": "v1",
        "digest": {
            "line_hashes": [
                "266794176874267546349009822655452924699",
                "221657460324295589297880384586735908364",
                "256070159223810470248444219763910262624",
                "266009674151970729244697737127660122433",
                "331207470830422801069894979267999211182",
                "290903690178320527250333709068364564171",
                "284917218618121208025823608059698997375",
                "155850013146986049844481716476322442081"
            ],
            "threshold": 0.9
        },
        "id": "CVE-2023-34455-804fcc9b",
        "target": {
            "file": "src/test/java/org/xerial/snappy/SnappyTest.java"
        },
        "deprecated": false
    },
    {
        "source": "https://github.com/xerial/snappy-java/commit/737f3973ff392c351da2744820a23a0521c6cc77",
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "function_hash": "115694192477457560882035332182505764005",
            "length": 112.0
        },
        "id": "CVE-2023-34455-87382306",
        "target": {
            "function": "isTooLargeDoubleArrayInputLengthForBitShuffleShuffle",
            "file": "src/test/java/org/xerial/snappy/SnappyTest.java"
        },
        "deprecated": false
    },
    {
        "source": "https://github.com/xerial/snappy-java/commit/737f3973ff392c351da2744820a23a0521c6cc77",
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "function_hash": "204471860700078750244256335571282342429",
            "length": 112.0
        },
        "id": "CVE-2023-34455-93cdd4ec",
        "target": {
            "function": "isTooLargeFloatArrayInputLengthForBitShuffleShuffle",
            "file": "src/test/java/org/xerial/snappy/SnappyTest.java"
        },
        "deprecated": false
    },
    {
        "source": "https://github.com/xerial/snappy-java/commit/737f3973ff392c351da2744820a23a0521c6cc77",
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "function_hash": "305806183518270641982183783563680953015",
            "length": 108.0
        },
        "id": "CVE-2023-34455-adcce448",
        "target": {
            "function": "isTooLargeIntArrayInputLength",
            "file": "src/test/java/org/xerial/snappy/SnappyTest.java"
        },
        "deprecated": false
    },
    {
        "source": "https://github.com/xerial/snappy-java/commit/737f3973ff392c351da2744820a23a0521c6cc77",
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "function_hash": "197601775410030034425030989621733157535",
            "length": 108.0
        },
        "id": "CVE-2023-34455-dc129d73",
        "target": {
            "function": "isTooLargeCharArrayInputLength",
            "file": "src/test/java/org/xerial/snappy/SnappyTest.java"
        },
        "deprecated": false
    },
    {
        "source": "https://github.com/xerial/snappy-java/commit/737f3973ff392c351da2744820a23a0521c6cc77",
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "function_hash": "194152565227331479732749147694718474634",
            "length": 112.0
        },
        "id": "CVE-2023-34455-f97fdafb",
        "target": {
            "function": "isTooLargeShortArrayInputLengthForBitShuffleShuffle",
            "file": "src/test/java/org/xerial/snappy/SnappyTest.java"
        },
        "deprecated": false
    }
]
vanir_signatures_modified
"2026-07-22T02:25:11Z"