← Terug naar overzicht

A vulnerability in hank-ai/darknet involves unchecked 32-bit integer arithmetic when sizing convolutional layer weight and output heap buffers from .cfg configuration files. The computation of l.nweights and l.outputs can overflow when dimension products exceed INT_MAX, causing undersized memory allocations. An attacker can craft a malicious .cfg file where dimensions like width/height of 256 with 65536 filters produce a 2^32 product wrapping to zero. The forward_convolutional_layer function then re-derives GEMM dimensions with a different operand order, causing reads and writes beyond the undersized buffer. No valid .weights file is required, only the crafted .cfg file. A proof-of-concept demonstrated heap buffer overflow reads in gemm_nn_fast under AddressSanitizer and glibc allocator metadata corruption in release builds, confirming out-of-bounds write capability.

Affected products

  • hank-ai/darknet

Related CVE's

  • CVE-2026-72852

Categories

  • Emerging Technologies
  • Zero-Day Vulnerabilities