wulonchia's picture
Upload README.md with huggingface_hub
3ca9bc3 verified

Caffe Integer Overflow PoC

Proof-of-concept files for multiple signed integer overflow vulnerabilities in BVLC/caffe.

Files

File Description
dilation_overflow_dos.prototxt Crafted model: dilation=1073741824 triggers signed overflow → DoS crash
silent_overflow_bypass.prototxt Crafted model: dilation=1073741824, kernel=5 silently bypasses all CHECKs
pad_overflow_pooling.prototxt Crafted model: pad=1073741824 triggers pooling layer overflow
caffe_overflow_poc.cpp Standalone C++ PoC reproducing the exact vulnerable arithmetic
ubsan_output.txt UBSan output showing 11 signed-integer-overflow violations

Reproduction

# Compile with UBSan
clang++ -fsanitize=undefined -fsanitize-recover=all -O0 -o poc caffe_overflow_poc.cpp

# Run
./poc

Affected Code

  • src/caffe/layers/conv_layer.cppcompute_output_shape()
  • src/caffe/layers/base_conv_layer.cppLayerSetUp(), Reshape()
  • src/caffe/layers/pooling_layer.cppReshape()
  • src/caffe/util/im2col.cppim2col_cpu(), im2col_nd_core_cpu()

Responsible Disclosure

This repository is gated for responsible disclosure purposes.