Out-of-bounds Read in OpenCV
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| opencv-python PyPI |
|
|
| opencv-python-headless PyPI |
|
|
| opencv-contrib-python PyPI |
| Product | Affected | Fixed in |
|---|---|---|
| opencv-python PyPI |
|
|
| opencv-python-headless PyPI |
|
|
| opencv-contrib-python PyPI |
< 4.1.0.25
|
| opencv-contrib-python-headless PyPI |
|
|
An out-of-bounds read was discovered in OpenCV before 4.1.1. Specifically, variable coarsest_scale is assumed to be greater than or equal to finest_scale within the calc()/ocl_calc() functions in dis_flow.cpp. However, this is not true when dealing with small images, leading to an out-of-bounds read of the heap-allocated arrays Ux and Uy.
From the CVE record · mitre
OpenCV before 4.1.1 has an out-of-bounds read in the calc() and ocl_calc() functions in dis_flow.cpp. Processing small images can cause a read beyond the heap-allocated Ux and Uy arrays. The input does not specify whether exploitation requires network access, authentication, or user interaction.
Engineers using PyPI opencv-python, opencv-python-headless, opencv-contrib-python, or opencv-contrib-python-headless versions earlier than 4.1.0.25 should check their installations.