Out-of-bounds read in OpenCV - CVE-2019-19624
Published: December 6, 2019 / Updated: July 17, 2020
Vulnerability details
The vulnerability allows a remote non-authenticated attacker to #BASIC_IMPACT#.
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.
Affected software
Ubuntu
libopencv-contrib4.5d (Ubuntu package)
libopencv-core4.5d (Ubuntu package)
libopencv-dev (Ubuntu package)
libopencv-dnn4.5d (Ubuntu package)
libopencv-flann4.5d (Ubuntu package)
libopencv-imgcodecs4.5d (Ubuntu package)
libopencv-objdetect4.5d (Ubuntu package)
opencv-data (Ubuntu package)
libopencv-core3.2 (Ubuntu package)
How to mitigate CVE-2019-19624
libopencv-contrib4.5d (Ubuntu package) - update to Ubuntu Pro
libopencv-core4.5d (Ubuntu package) - update to Ubuntu Pro
libopencv-dev (Ubuntu package) - update to Ubuntu Pro
libopencv-dnn4.5d (Ubuntu package) - update to Ubuntu Pro
libopencv-flann4.5d (Ubuntu package) - update to Ubuntu Pro
libopencv-imgcodecs4.5d (Ubuntu package) - update to Ubuntu Pro
libopencv-objdetect4.5d (Ubuntu package) - update to Ubuntu Pro
opencv-data (Ubuntu package) - update to Ubuntu Pro
libopencv-core3.2 (Ubuntu package) - update to Ubuntu Pro