CVE-2023-46228
Description
zchunk before 1.3.2 contains multiple integer overflows in file parsing that can be triggered by malformed zchunk files, leading to potential memory corruption.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
zchunk before 1.3.2 contains multiple integer overflows in file parsing that can be triggered by malformed zchunk files, leading to potential memory corruption.
Vulnerability
zchunk versions prior to 1.3.2 contain multiple integer overflow vulnerabilities in the file parsing routines. The overflows occur in lib/comp/comp.c (comp_add_to_data), lib/comp/zstd/zstd.c (compress), lib/dl/multipart.c (multipart_extract), and lib/header.c (read_header_from_file). When processing a malformed zchunk file, the addition of sizes can overflow, leading to an undersized buffer allocation via zrealloc [1][2].
Exploitation
An attacker can exploit these vulnerabilities by supplying a specially crafted zchunk file to an application using the zchunk library. No authentication or special privileges are required; the file only needs to be parsed by the library. The attacker must craft the file such that the size fields cause an integer overflow during the addition operations in the affected functions [1].
Impact
Successful exploitation results in an integer overflow that causes zrealloc to allocate a buffer smaller than expected. This can lead to heap corruption when data is written into the undersized buffer, potentially allowing arbitrary code execution or denial of service. The exact impact depends on the context in which the library is used [1][2].
Mitigation
The vulnerabilities are fixed in zchunk version 1.3.2, released on 2023-10-05 [3]. Users should upgrade to this version or later. No workarounds are available; the only mitigation is to apply the patch or update the library [1][2].
AI Insight generated on May 26, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
23- zchunk/zchunkdescription
- osv-coords21 versionspkg:rpm/opensuse/zchunk&distro=openSUSE%20Leap%2015.4pkg:rpm/opensuse/zchunk&distro=openSUSE%20Leap%2015.5pkg:rpm/opensuse/zchunk&distro=openSUSE%20Leap%20Micro%205.3pkg:rpm/opensuse/zchunk&distro=openSUSE%20Leap%20Micro%205.4pkg:rpm/suse/zchunk&distro=SUSE%20Enterprise%20Storage%207.1pkg:rpm/suse/zchunk&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP2-LTSSpkg:rpm/suse/zchunk&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP3-ESPOSpkg:rpm/suse/zchunk&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP3-LTSSpkg:rpm/suse/zchunk&distro=SUSE%20Linux%20Enterprise%20Installer%20Updates%2015%20SP4pkg:rpm/suse/zchunk&distro=SUSE%20Linux%20Enterprise%20Micro%205.3pkg:rpm/suse/zchunk&distro=SUSE%20Linux%20Enterprise%20Micro%205.4pkg:rpm/suse/zchunk&distro=SUSE%20Linux%20Enterprise%20Micro%205.5pkg:rpm/suse/zchunk&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP4pkg:rpm/suse/zchunk&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP5pkg:rpm/suse/zchunk&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Package%20Hub%2015%20SP5pkg:rpm/suse/zchunk&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP2-LTSSpkg:rpm/suse/zchunk&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP3-LTSSpkg:rpm/suse/zchunk&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP2pkg:rpm/suse/zchunk&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP3pkg:rpm/suse/zchunk&distro=SUSE%20Manager%20Proxy%204.2pkg:rpm/suse/zchunk&distro=SUSE%20Manager%20Server%204.2
< 1.1.16-150400.3.7.1+ 20 more
- (no CPE)range: < 1.1.16-150400.3.7.1
- (no CPE)range: < 1.1.16-150400.3.7.1
- (no CPE)range: < 1.1.16-150400.3.7.1
- (no CPE)range: < 1.1.16-150400.3.7.1
- (no CPE)range: < 1.1.5-150200.3.5.1
- (no CPE)range: < 1.1.5-150200.3.5.1
- (no CPE)range: < 1.1.5-150200.3.5.1
- (no CPE)range: < 1.1.5-150200.3.5.1
- (no CPE)range: < 1.1.16-150400.3.7.1
- (no CPE)range: < 1.1.16-150400.3.7.1
- (no CPE)range: < 1.1.16-150400.3.7.1
- (no CPE)range: < 1.1.16-150400.3.7.1
- (no CPE)range: < 1.1.16-150400.3.7.1
- (no CPE)range: < 1.1.16-150400.3.7.1
- (no CPE)range: < 1.1.16-150400.3.7.1
- (no CPE)range: < 1.1.5-150200.3.5.1
- (no CPE)range: < 1.1.5-150200.3.5.1
- (no CPE)range: < 1.1.5-150200.3.5.1
- (no CPE)range: < 1.1.5-150200.3.5.1
- (no CPE)range: < 1.1.5-150200.3.5.1
- (no CPE)range: < 1.1.5-150200.3.5.1
Patches
0No patches discovered yet.
Vulnerability mechanics
Root cause
"Multiple integer overflows occur when processing malformed zchunk files."
Attack vector
An attacker can trigger multiple integer overflows by providing malformed zchunk files. These overflows occur during data processing, compression, and header reading operations within the zchunk library. The vulnerability can be triggered by malformed input files that cause calculations involving sizes to exceed the maximum value for their data types [ref_id=1].
Affected code
The vulnerabilities are located in multiple files within the zchunk library, including `lib/comp/comp.c`, `lib/comp/zstd/zstd.c`, `lib/dl/multipart.c`, and `lib/header.c`. Specifically, the `comp_add_to_data` function, the `compress` function, the `multipart_extract` function, and the `read_header_from_file` function are affected by integer overflows [ref_id=1]. The `read_lead` function also contains a similar integer overflow vulnerability [ref_id=1].
What the fix does
The patch introduces checks to detect potential integer overflows before performing arithmetic operations that could lead to them. For example, in `comp_add_to_data`, it now checks if `comp->data_size + src_size` would overflow before reallocating memory [ref_id=1]. Similar checks are added in other functions like `compress`, `multipart_extract`, `read_header_from_file`, and `read_lead` to prevent overflows when calculating buffer sizes or lengths [ref_id=1].
Preconditions
- inputThe zchunk library must process a malformed zchunk file.
Generated on Jun 4, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
3News mentions
0No linked articles in our index yet.