Description
hank-ai/darknet sizes a convolutional layer's weight and output heap buffers by multiplying configuration fields taken from a .cfg file in unchecked 32-bit int arithmetic. In src-lib/convolutional_layer.cpp, l.nweights is computed as (c / groups) * n * size * size and l.outputs as l.out_h * l.out_w * l.out_c, and both feed xcalloc directly. A .cfg whose true dimension product exceeds INT_MAX wraps to a small or zero value, so the allocation is undersized; for example width and height of 256 with filters of 65536 gives 2^32, which wraps to 0. forward_convolutional_layer then re-derives the GEMM dimensions with a different operand order, computing k as l.size*l.size*l.c / l.groups where the allocation divided before multiplying, and reads and writes through the undersized buffer. Loading the crafted .cfg for inference or training is sufficient and no valid .weights file is required. The reported proof of concept observed a heap buffer overflow read in gemm_nn_fast under AddressSanitizer and glibc allocator metadata corruption in a release build of the same input, indicating an out-of-bounds write.
Published: 2026-08-20
Score: 8.5 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

hank-ai darknet performs convolutional layer buffer sizing using unchecked 32‑bit arithmetic, causing integer overflows when configuration values from a .cfg file multiply to exceed INT_MAX. The undersized buffers are allocated with xcalloc but later accessed through derived dimensions that fail to match the allocation size, leading to out‑of‑bounds reads and writes. This can corrupt heap metadata or read arbitrary memory, which in turn could enable arbitrary code execution. The weakness is a classic integer overflow (CWE‑190) combined with an unchecked buffer usage (CWE‑787).

Affected Systems

The flaw exists in the hank‑ai darknet project, specifically in source files convolutional_layer.cpp compiled in version 6.0 as referenced in the advisory. No other version information is available in the current data set.

Risk and Exploitability

The CVSS score of 8.5 indicates high severity. With no EPSS data available, the exact exploitation probability cannot be quantified at present, and the vulnerability is not listed in the CISA KEV catalog. Exploitation requires the attacker to supply a crafted .cfg file to darknet during inference or training, which is a local or host‑dependent action. Nevertheless, due to the potential for uncontrolled heap writes, the risk of arbitrary code execution remains significant if an attacker can run or influence the darknet process.

Generated by OpenCVE AI on August 21, 2026 at 01:36 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the latest official patch or upgrade darknet to a version that corrects the convolutional layer buffer sizing logic
  • Validate or constrain all integer inputs from .cfg files, ensuring dimensions do not exceed INT_MAX and rejecting configurations that would overflow
  • Run darknet in a restricted environment or with privilege separation to limit the impact of a potential heap corruption

Generated by OpenCVE AI on August 21, 2026 at 01:36 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 25 Aug 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Fri, 21 Aug 2026 12:30:00 +0000

Type Values Removed Values Added
First Time appeared Hank-ai
Hank-ai darknet
Vendors & Products Hank-ai
Hank-ai darknet

Thu, 20 Aug 2026 18:45:00 +0000

Type Values Removed Values Added
Description hank-ai/darknet sizes a convolutional layer's weight and output heap buffers by multiplying configuration fields taken from a .cfg file in unchecked 32-bit int arithmetic. In src-lib/convolutional_layer.cpp, l.nweights is computed as (c / groups) * n * size * size and l.outputs as l.out_h * l.out_w * l.out_c, and both feed xcalloc directly. A .cfg whose true dimension product exceeds INT_MAX wraps to a small or zero value, so the allocation is undersized; for example width and height of 256 with filters of 65536 gives 2^32, which wraps to 0. forward_convolutional_layer then re-derives the GEMM dimensions with a different operand order, computing k as l.size*l.size*l.c / l.groups where the allocation divided before multiplying, and reads and writes through the undersized buffer. Loading the crafted .cfg for inference or training is sufficient and no valid .weights file is required. The reported proof of concept observed a heap buffer overflow read in gemm_nn_fast under AddressSanitizer and glibc allocator metadata corruption in a release build of the same input, indicating an out-of-bounds write.
Title darknet Integer Overflow in Convolutional Layer Buffer Sizing Leads to Heap Buffer Overflow
Weaknesses CWE-190
CWE-787
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 8.5, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-25T15:18:13.753Z

Reserved: 2026-08-10T15:16:31.371Z

Link: CVE-2026-72852

cve-icon Vulnrichment

Updated: 2026-08-25T15:18:04.207Z

cve-icon NVD

Status : Received

Published: 2026-08-20T19:17:00.830

Modified: 2026-08-25T16:17:25.713

Link: CVE-2026-72852

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-21T12:08:41Z

Weaknesses