Out-of-bounds read in OpenCV - CVE-2019-19624

 

Out-of-bounds read in OpenCV - CVE-2019-19624

Published: December 6, 2019 / Updated: July 17, 2020


Vulnerability identifier: #VU30559
CSH Severity: Medium
CVSS v4: 6.9 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N]
CVE-ID: CVE-2019-19624
CWE-ID: CWE-125
Exploitation vector: Remote access
Exploit availability: No public exploit available

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

OpenCV
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

Install update from vendor's website.

OpenCV - update to 4.1.1
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

External References

Related Security Bulletins