⚠️ SECURITY RESEARCH ARTIFACT — DO NOT LOAD
This repository contains a deliberately malicious Darknet model pair (.cfg + .weights)
used as the proof-of-concept for a coordinated-disclosure vulnerability report filed via
huntr.com against hank-ai/darknet
(the maintained Darknet / YOLO native framework).
Do NOT load these files with darknet or any Darknet-based tool on a machine you care about.
Loading b1_e2e.weights triggers a heap out-of-bounds write during weight transposition and
will corrupt process memory / crash the loader.
What it triggers
- Weakness: CWE-190 (Integer Overflow) → CWE-787 (Out-of-bounds Write), heap.
- Sink:
transpose_matrix()insrc-lib/weights.cpp, reached at model-load time viaload_weights → load_weights_upto → load_connected_weights → transpose_matrix. - Mechanism: the
.weightsheader setsmajor=1001, which enables the transpose path. The[connected]layer'sinputs (65536) × outputs (65537)overflows the 32-bitintused to size the transpose scratch buffer (wraps to 65536), soxcallocunder-allocates, but the transpose loop iterates the truerows × colsrange and writes past the buffer. - Verified end-to-end under AddressSanitizer against the real framework parser + loader:
heap-buffer-overflow WRITE of size 4, 0 bytes after a 262144-byte regionintranspose_matrix.
Files
| File | Size | SHA-256 |
|---|---|---|
b1_e2e.cfg |
440 B | 71ef43b8ed939e9b93ca738637e84b4ca4ecfc8c17e92bf37b13c735b659f645 |
b1_e2e.weights |
524320 B | 2569da9c25328db82e38aa628dfb70a49c63a7ef81fbec09996fac66bd6f36a0 |
Note on file size: the .weights file carries the full ~512 KiB float payload on purpose.
Darknet's xfread fatally aborts on a short read, so the biases and weights reads must fully
succeed for execution to reach the transpose sink. A truncated file dies before the bug. The
b1_e2e.cfg prepends a no-op 1×1 [convolutional] layer solely to preserve the 256×256×1
input volume (feeding inputs=65536) and to avoid an unrelated divide-by-zero on a
connected-only network — see the huntr report for details.
Disclosure status
Filed for coordinated disclosure through huntr. Please do not redistribute or public-post this PoC until the maintainer coordination and disclosure window have completed. This artifact exists only to let the maintainers and huntr triagers reproduce and fix the issue.
Contact: huntr handle Ano1X8.