Downloads · 30 days
0
pragnyanramtha/opencv-darknet-groups-zero-sigfpe-poc
opencv-darknet-groups-zero-sigfpe-poc is a machine learning model from pragnyanramtha. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for opencv.
This repository contains a benign Darknet .cfg model artifact that demonstrates an OpenCV DNN Darknet importer denial-of-service issue. The PoC does not execute code, persist state, access credentials, or make network…
Downloads · 30 days
0
Access
Public
Updated May 12, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.txt6.4 KB · 39%
From the Hugging Face model README
groups=0 SIGFPE PoCThis repository contains a benign Darknet .cfg model artifact that demonstrates an OpenCV DNN Darknet importer denial-of-service issue.
The PoC does not execute code, persist state, access credentials, or make network calls; it only demonstrates a native SIGFPE crash in a local model loader.
groups_zero_conv.cfg defines a minimal Darknet network with a [convolutional] block containing groups=0.
When OpenCV DNN imports the model, the Darknet parser reads groups from the model-controlled config and reaches a modulo/division operation using that value.
The tested wheel, opencv-python-headless==4.13.0.92, exits with SIGFPE when loading the artifact through both explicit Darknet APIs and generic cv2.dnn.readNet(...) paths.
Local ASAN evidence maps the signal to OpenCV's Darknet cfg parser. Source review points to modules/dnn/src/darknet/darknet_io.cpp, where groups is read from the model config and used in tensor_shape[0] % groups / tensor_shape[0] / groups without first validating groups > 0.
.cfg) with companion weights headeropencv-python-headless==4.13.0.92cv2.dnn.readNetFromDarknet(cfg)cv2.dnn.readNetFromDarknet(cfg, weights)cv2.dnn.readNetFromDarknet(bytearray(cfg), ...)cv2.dnn.readNet(cfg)cv2.dnn.readNet(cfg, weights)artifacts/groups_zero_conv.cfg
bf20ae166213003e112e9fa85a078e12d0325c5c4050aab35626601c1bc568abartifacts/header_only.weights
2d42634a033bb4952d353d7e9b896478a7e1f2553888199f8df89e42ca2c281bInstall OpenCV, then run:
python verify_darknet_groups_zero_sigfpe.py
Expected high-level result:
groups_zero_conv.cfg returns SIGFPE (-8 through Python subprocess, shell status 136) across the importer paths.Manual minimal reproduction:
python - <<'PY'
import cv2
cv2.dnn.readNetFromDarknet("artifacts/groups_zero_conv.cfg", "artifacts/header_only.weights")
PY
ModelScan 0.8.8 reports zero issues and scans zero files for these Darknet artifacts.
This is not presented as a scanner bypass by itself because Darknet is unsupported. The security impact comes from a current real loader reaching native unsafe arithmetic from model-controlled fields.
The evidence/ directory contains captured local outputs, including ASAN output for the SIGFPE and scanner output.
This is a native process crash in a model importer, not arbitrary code execution.