All the vulnerabilites related to xerial - snappy-java
cve-2023-34455
Vulnerability from cvelistv5
Published
2023-06-15 17:15
Modified
2024-08-02 16:10
Severity ?
EPSS score ?
Summary
snappy-java's unchecked chunk length leads to DoS
References
Impacted products
▼ | Vendor | Product |
---|---|---|
xerial | snappy-java |
{ "containers": { "adp": [ { "providerMetadata": { "dateUpdated": "2024-08-02T16:10:07.032Z", "orgId": "af854a3a-2127-422b-91ae-364da2661108", "shortName": "CVE" }, "references": [ { "name": "https://github.com/xerial/snappy-java/security/advisories/GHSA-qcwq-55hx-v3vh", "tags": [ "x_refsource_CONFIRM", "x_transferred" ], "url": "https://github.com/xerial/snappy-java/security/advisories/GHSA-qcwq-55hx-v3vh" }, { "name": "https://github.com/xerial/snappy-java/commit/3bf67857fcf70d9eea56eed4af7c925671e8eaea", "tags": [ "x_refsource_MISC", "x_transferred" ], "url": "https://github.com/xerial/snappy-java/commit/3bf67857fcf70d9eea56eed4af7c925671e8eaea" }, { "name": "https://github.com/xerial/snappy-java/blob/05c39b2ca9b5b7b39611529cc302d3d796329611/src/main/java/org/xerial/snappy/SnappyInputStream.java#L388", "tags": [ "x_refsource_MISC", "x_transferred" ], "url": "https://github.com/xerial/snappy-java/blob/05c39b2ca9b5b7b39611529cc302d3d796329611/src/main/java/org/xerial/snappy/SnappyInputStream.java#L388" }, { "name": "https://github.com/xerial/snappy-java/blob/master/src/main/java/org/xerial/snappy/SnappyInputStream.java", "tags": [ "x_refsource_MISC", "x_transferred" ], "url": "https://github.com/xerial/snappy-java/blob/master/src/main/java/org/xerial/snappy/SnappyInputStream.java" }, { "tags": [ "x_transferred" ], "url": "https://security.netapp.com/advisory/ntap-20230818-0009/" } ], "title": "CVE Program Container" } ], "cna": { "affected": [ { "product": "snappy-java", "vendor": "xerial", "versions": [ { "status": "affected", "version": "\u003c 1.1.10.1" } ] } ], "descriptions": [ { "lang": "en", "value": "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.\n\nThe 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\u2019t 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.\n\nIn 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\u2019t 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.\n\nVersion 1.1.10.1 contains a patch for this issue." } ], "metrics": [ { "cvssV3_1": { "attackComplexity": "LOW", "attackVector": "NETWORK", "availabilityImpact": "HIGH", "baseScore": 7.5, "baseSeverity": "HIGH", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "privilegesRequired": "NONE", "scope": "UNCHANGED", "userInteraction": "NONE", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "version": "3.1" } } ], "problemTypes": [ { "descriptions": [ { "cweId": "CWE-770", "description": "CWE-770: Allocation of Resources Without Limits or Throttling", "lang": "en", "type": "CWE" } ] } ], "providerMetadata": { "dateUpdated": "2023-06-15T17:15:00.311Z", "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa", "shortName": "GitHub_M" }, "references": [ { "name": "https://github.com/xerial/snappy-java/security/advisories/GHSA-qcwq-55hx-v3vh", "tags": [ "x_refsource_CONFIRM" ], "url": "https://github.com/xerial/snappy-java/security/advisories/GHSA-qcwq-55hx-v3vh" }, { "name": "https://github.com/xerial/snappy-java/commit/3bf67857fcf70d9eea56eed4af7c925671e8eaea", "tags": [ "x_refsource_MISC" ], "url": "https://github.com/xerial/snappy-java/commit/3bf67857fcf70d9eea56eed4af7c925671e8eaea" }, { "name": "https://github.com/xerial/snappy-java/blob/05c39b2ca9b5b7b39611529cc302d3d796329611/src/main/java/org/xerial/snappy/SnappyInputStream.java#L388", "tags": [ "x_refsource_MISC" ], "url": "https://github.com/xerial/snappy-java/blob/05c39b2ca9b5b7b39611529cc302d3d796329611/src/main/java/org/xerial/snappy/SnappyInputStream.java#L388" }, { "name": "https://github.com/xerial/snappy-java/blob/master/src/main/java/org/xerial/snappy/SnappyInputStream.java", "tags": [ "x_refsource_MISC" ], "url": "https://github.com/xerial/snappy-java/blob/master/src/main/java/org/xerial/snappy/SnappyInputStream.java" }, { "url": "https://security.netapp.com/advisory/ntap-20230818-0009/" } ], "source": { "advisory": "GHSA-qcwq-55hx-v3vh", "discovery": "UNKNOWN" }, "title": "snappy-java\u0027s unchecked chunk length leads to DoS" } }, "cveMetadata": { "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa", "assignerShortName": "GitHub_M", "cveId": "CVE-2023-34455", "datePublished": "2023-06-15T17:15:00.311Z", "dateReserved": "2023-06-06T16:16:53.559Z", "dateUpdated": "2024-08-02T16:10:07.032Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1" }
cve-2023-34454
Vulnerability from cvelistv5
Published
2023-06-15 16:27
Modified
2024-08-02 16:10
Severity ?
EPSS score ?
Summary
snappy-java's Integer Overflow vulnerability in compress leads to DoS
References
Impacted products
▼ | Vendor | Product |
---|---|---|
xerial | snappy-java |
{ "containers": { "adp": [ { "providerMetadata": { "dateUpdated": "2024-08-02T16:10:07.300Z", "orgId": "af854a3a-2127-422b-91ae-364da2661108", "shortName": "CVE" }, "references": [ { "name": "https://github.com/xerial/snappy-java/security/advisories/GHSA-fjpj-2g6w-x25r", "tags": [ "x_refsource_CONFIRM", "x_transferred" ], "url": "https://github.com/xerial/snappy-java/security/advisories/GHSA-fjpj-2g6w-x25r" }, { "name": "https://github.com/xerial/snappy-java/commit/d0042551e4a3509a725038eb9b2ad1f683674d94", "tags": [ "x_refsource_MISC", "x_transferred" ], "url": "https://github.com/xerial/snappy-java/commit/d0042551e4a3509a725038eb9b2ad1f683674d94" }, { "name": "https://github.com/xerial/snappy-java/blob/05c39b2ca9b5b7b39611529cc302d3d796329611/src/main/java/org/xerial/snappy/Snappy.java#L169", "tags": [ "x_refsource_MISC", "x_transferred" ], "url": "https://github.com/xerial/snappy-java/blob/05c39b2ca9b5b7b39611529cc302d3d796329611/src/main/java/org/xerial/snappy/Snappy.java#L169" }, { "name": "https://github.com/xerial/snappy-java/blob/05c39b2ca9b5b7b39611529cc302d3d796329611/src/main/java/org/xerial/snappy/Snappy.java#L422", "tags": [ "x_refsource_MISC", "x_transferred" ], "url": "https://github.com/xerial/snappy-java/blob/05c39b2ca9b5b7b39611529cc302d3d796329611/src/main/java/org/xerial/snappy/Snappy.java#L422" }, { "name": "https://github.com/xerial/snappy-java/blob/master/src/main/java/org/xerial/snappy/Snappy.java", "tags": [ "x_refsource_MISC", "x_transferred" ], "url": "https://github.com/xerial/snappy-java/blob/master/src/main/java/org/xerial/snappy/Snappy.java" } ], "title": "CVE Program Container" } ], "cna": { "affected": [ { "product": "snappy-java", "vendor": "xerial", "versions": [ { "status": "affected", "version": "\u003c 1.1.10.1" } ] } ], "descriptions": [ { "lang": "en", "value": "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.\n\nThe 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.\n\nSince 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.\n\nSince the maxCompressedLength function treats the length as an unsigned integer, it doesn\u2019t 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.\n\nThe 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\u2019t 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.\n\nVersion 1.1.10.1 contains a patch for this issue." } ], "metrics": [ { "cvssV3_1": { "attackComplexity": "HIGH", "attackVector": "NETWORK", "availabilityImpact": "HIGH", "baseScore": 5.9, "baseSeverity": "MEDIUM", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "privilegesRequired": "NONE", "scope": "UNCHANGED", "userInteraction": "NONE", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H", "version": "3.1" } } ], "problemTypes": [ { "descriptions": [ { "cweId": "CWE-190", "description": "CWE-190: Integer Overflow or Wraparound", "lang": "en", "type": "CWE" } ] } ], "providerMetadata": { "dateUpdated": "2023-06-15T16:27:45.467Z", "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa", "shortName": "GitHub_M" }, "references": [ { "name": "https://github.com/xerial/snappy-java/security/advisories/GHSA-fjpj-2g6w-x25r", "tags": [ "x_refsource_CONFIRM" ], "url": "https://github.com/xerial/snappy-java/security/advisories/GHSA-fjpj-2g6w-x25r" }, { "name": "https://github.com/xerial/snappy-java/commit/d0042551e4a3509a725038eb9b2ad1f683674d94", "tags": [ "x_refsource_MISC" ], "url": "https://github.com/xerial/snappy-java/commit/d0042551e4a3509a725038eb9b2ad1f683674d94" }, { "name": "https://github.com/xerial/snappy-java/blob/05c39b2ca9b5b7b39611529cc302d3d796329611/src/main/java/org/xerial/snappy/Snappy.java#L169", "tags": [ "x_refsource_MISC" ], "url": "https://github.com/xerial/snappy-java/blob/05c39b2ca9b5b7b39611529cc302d3d796329611/src/main/java/org/xerial/snappy/Snappy.java#L169" }, { "name": "https://github.com/xerial/snappy-java/blob/05c39b2ca9b5b7b39611529cc302d3d796329611/src/main/java/org/xerial/snappy/Snappy.java#L422", "tags": [ "x_refsource_MISC" ], "url": "https://github.com/xerial/snappy-java/blob/05c39b2ca9b5b7b39611529cc302d3d796329611/src/main/java/org/xerial/snappy/Snappy.java#L422" }, { "name": "https://github.com/xerial/snappy-java/blob/master/src/main/java/org/xerial/snappy/Snappy.java", "tags": [ "x_refsource_MISC" ], "url": "https://github.com/xerial/snappy-java/blob/master/src/main/java/org/xerial/snappy/Snappy.java" } ], "source": { "advisory": "GHSA-fjpj-2g6w-x25r", "discovery": "UNKNOWN" }, "title": "snappy-java\u0027s Integer Overflow vulnerability in compress leads to DoS" } }, "cveMetadata": { "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa", "assignerShortName": "GitHub_M", "cveId": "CVE-2023-34454", "datePublished": "2023-06-15T16:27:45.467Z", "dateReserved": "2023-06-06T16:16:53.559Z", "dateUpdated": "2024-08-02T16:10:07.300Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1" }
cve-2023-34453
Vulnerability from cvelistv5
Published
2023-06-15 16:12
Modified
2024-08-02 16:10
Severity ?
EPSS score ?
Summary
snappy-java's Integer Overflow vulnerability in shuffle leads to DoS
References
Impacted products
▼ | Vendor | Product |
---|---|---|
xerial | snappy-java |
{ "containers": { "adp": [ { "providerMetadata": { "dateUpdated": "2024-08-02T16:10:07.005Z", "orgId": "af854a3a-2127-422b-91ae-364da2661108", "shortName": "CVE" }, "references": [ { "name": "https://github.com/xerial/snappy-java/security/advisories/GHSA-pqr6-cmr2-h8hf", "tags": [ "x_refsource_CONFIRM", "x_transferred" ], "url": "https://github.com/xerial/snappy-java/security/advisories/GHSA-pqr6-cmr2-h8hf" }, { "name": "https://github.com/xerial/snappy-java/commit/820e2e074c58748b41dbd547f4edba9e108ad905", "tags": [ "x_refsource_MISC", "x_transferred" ], "url": "https://github.com/xerial/snappy-java/commit/820e2e074c58748b41dbd547f4edba9e108ad905" }, { "name": "https://github.com/xerial/snappy-java/blob/05c39b2ca9b5b7b39611529cc302d3d796329611/src/main/java/org/xerial/snappy/BitShuffle.java#L107", "tags": [ "x_refsource_MISC", "x_transferred" ], "url": "https://github.com/xerial/snappy-java/blob/05c39b2ca9b5b7b39611529cc302d3d796329611/src/main/java/org/xerial/snappy/BitShuffle.java#L107" }, { "name": "https://github.com/xerial/snappy-java/blob/master/src/main/java/org/xerial/snappy/BitShuffle.java", "tags": [ "x_refsource_MISC", "x_transferred" ], "url": "https://github.com/xerial/snappy-java/blob/master/src/main/java/org/xerial/snappy/BitShuffle.java" } ], "title": "CVE Program Container" } ], "cna": { "affected": [ { "product": "snappy-java", "vendor": "xerial", "versions": [ { "status": "affected", "version": "\u003c 1.1.10.1" } ] } ], "descriptions": [ { "lang": "en", "value": "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 a fatal error.\n\nThe function `shuffle(int[] input)` in the file `BitShuffle.java` receives an array of integers and applies a bit shuffle on it. It does so by multiplying the length by 4 and passing it to the natively compiled shuffle function. Since the length is not tested, the multiplication by four can cause an integer overflow and become a smaller value than the true size, or even zero or negative. In the case of a negative value, a `java.lang.NegativeArraySizeException` exception will raise, which can crash the program. In a case of a value that is zero or too small, the code that afterwards references the shuffled array will assume a bigger size of the array, which might cause exceptions such as `java.lang.ArrayIndexOutOfBoundsException`.\n\nThe same issue exists also when using the `shuffle` functions that receive a double, float, long and short, each using a different multiplier that may cause the same issue.\n\nVersion 1.1.10.1 contains a patch for this vulnerability." } ], "metrics": [ { "cvssV3_1": { "attackComplexity": "HIGH", "attackVector": "NETWORK", "availabilityImpact": "HIGH", "baseScore": 5.9, "baseSeverity": "MEDIUM", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "privilegesRequired": "NONE", "scope": "UNCHANGED", "userInteraction": "NONE", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H", "version": "3.1" } } ], "problemTypes": [ { "descriptions": [ { "cweId": "CWE-190", "description": "CWE-190: Integer Overflow or Wraparound", "lang": "en", "type": "CWE" } ] } ], "providerMetadata": { "dateUpdated": "2023-06-15T16:12:34.119Z", "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa", "shortName": "GitHub_M" }, "references": [ { "name": "https://github.com/xerial/snappy-java/security/advisories/GHSA-pqr6-cmr2-h8hf", "tags": [ "x_refsource_CONFIRM" ], "url": "https://github.com/xerial/snappy-java/security/advisories/GHSA-pqr6-cmr2-h8hf" }, { "name": "https://github.com/xerial/snappy-java/commit/820e2e074c58748b41dbd547f4edba9e108ad905", "tags": [ "x_refsource_MISC" ], "url": "https://github.com/xerial/snappy-java/commit/820e2e074c58748b41dbd547f4edba9e108ad905" }, { "name": "https://github.com/xerial/snappy-java/blob/05c39b2ca9b5b7b39611529cc302d3d796329611/src/main/java/org/xerial/snappy/BitShuffle.java#L107", "tags": [ "x_refsource_MISC" ], "url": "https://github.com/xerial/snappy-java/blob/05c39b2ca9b5b7b39611529cc302d3d796329611/src/main/java/org/xerial/snappy/BitShuffle.java#L107" }, { "name": "https://github.com/xerial/snappy-java/blob/master/src/main/java/org/xerial/snappy/BitShuffle.java", "tags": [ "x_refsource_MISC" ], "url": "https://github.com/xerial/snappy-java/blob/master/src/main/java/org/xerial/snappy/BitShuffle.java" } ], "source": { "advisory": "GHSA-pqr6-cmr2-h8hf", "discovery": "UNKNOWN" }, "title": "snappy-java\u0027s Integer Overflow vulnerability in shuffle leads to DoS" } }, "cveMetadata": { "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa", "assignerShortName": "GitHub_M", "cveId": "CVE-2023-34453", "datePublished": "2023-06-15T16:12:34.119Z", "dateReserved": "2023-06-06T16:16:53.558Z", "dateUpdated": "2024-08-02T16:10:07.005Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1" }
cve-2023-43642
Vulnerability from cvelistv5
Published
2023-09-25 19:03
Modified
2024-09-24 15:26
Severity ?
EPSS score ?
Summary
Missing upper bound check on chunk length in snappy-java
References
▼ | URL | Tags |
---|---|---|
https://github.com/xerial/snappy-java/security/advisories/GHSA-55g7-9cwv-5qfv | x_refsource_CONFIRM | |
https://github.com/xerial/snappy-java/commit/9f8c3cf74223ed0a8a834134be9c917b9f10ceb5 | x_refsource_MISC |
Impacted products
▼ | Vendor | Product |
---|---|---|
xerial | snappy-java |
{ "containers": { "adp": [ { "providerMetadata": { "dateUpdated": "2024-08-02T19:44:43.818Z", "orgId": "af854a3a-2127-422b-91ae-364da2661108", "shortName": "CVE" }, "references": [ { "name": "https://github.com/xerial/snappy-java/security/advisories/GHSA-55g7-9cwv-5qfv", "tags": [ "x_refsource_CONFIRM", "x_transferred" ], "url": "https://github.com/xerial/snappy-java/security/advisories/GHSA-55g7-9cwv-5qfv" }, { "name": "https://github.com/xerial/snappy-java/commit/9f8c3cf74223ed0a8a834134be9c917b9f10ceb5", "tags": [ "x_refsource_MISC", "x_transferred" ], "url": "https://github.com/xerial/snappy-java/commit/9f8c3cf74223ed0a8a834134be9c917b9f10ceb5" } ], "title": "CVE Program Container" }, { "metrics": [ { "other": { "content": { "id": "CVE-2023-43642", "options": [ { "Exploitation": "poc" }, { "Automatable": "yes" }, { "Technical Impact": "partial" } ], "role": "CISA Coordinator", "timestamp": "2024-09-24T15:26:43.352715Z", "version": "2.0.3" }, "type": "ssvc" } } ], "providerMetadata": { "dateUpdated": "2024-09-24T15:26:53.851Z", "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "shortName": "CISA-ADP" }, "title": "CISA ADP Vulnrichment" } ], "cna": { "affected": [ { "product": "snappy-java", "vendor": "xerial", "versions": [ { "status": "affected", "version": "\u003c 1.1.10.4" } ] } ], "descriptions": [ { "lang": "en", "value": "snappy-java is a Java port of the snappy, a fast C++ compresser/decompresser developed by Google. The SnappyInputStream was found to be vulnerable to Denial of Service (DoS) attacks when decompressing data with a too large chunk size. Due to missing upper bound check on chunk length, an unrecoverable fatal error can occur. All versions of snappy-java including the latest released version 1.1.10.3 are vulnerable to this issue. A fix has been introduced in commit `9f8c3cf74` which will be included in the 1.1.10.4 release. Users are advised to upgrade. Users unable to upgrade should only accept compressed data from trusted sources." } ], "metrics": [ { "cvssV3_1": { "attackComplexity": "LOW", "attackVector": "NETWORK", "availabilityImpact": "HIGH", "baseScore": 7.5, "baseSeverity": "HIGH", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "privilegesRequired": "NONE", "scope": "UNCHANGED", "userInteraction": "NONE", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "version": "3.1" } } ], "problemTypes": [ { "descriptions": [ { "cweId": "CWE-770", "description": "CWE-770: Allocation of Resources Without Limits or Throttling", "lang": "en", "type": "CWE" } ] } ], "providerMetadata": { "dateUpdated": "2023-09-25T19:03:49.145Z", "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa", "shortName": "GitHub_M" }, "references": [ { "name": "https://github.com/xerial/snappy-java/security/advisories/GHSA-55g7-9cwv-5qfv", "tags": [ "x_refsource_CONFIRM" ], "url": "https://github.com/xerial/snappy-java/security/advisories/GHSA-55g7-9cwv-5qfv" }, { "name": "https://github.com/xerial/snappy-java/commit/9f8c3cf74223ed0a8a834134be9c917b9f10ceb5", "tags": [ "x_refsource_MISC" ], "url": "https://github.com/xerial/snappy-java/commit/9f8c3cf74223ed0a8a834134be9c917b9f10ceb5" } ], "source": { "advisory": "GHSA-55g7-9cwv-5qfv", "discovery": "UNKNOWN" }, "title": "Missing upper bound check on chunk length in snappy-java " } }, "cveMetadata": { "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa", "assignerShortName": "GitHub_M", "cveId": "CVE-2023-43642", "datePublished": "2023-09-25T19:03:49.145Z", "dateReserved": "2023-09-20T15:35:38.146Z", "dateUpdated": "2024-09-24T15:26:53.851Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1" }