DescriptionAn 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.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
opencv (PTS)buster3.2.0+dfsg-6vulnerable
sid, trixie4.6.0+dfsg-13.1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
opencvsourcejessie(not affected)
opencvsourcestretch(not affected)


[buster] - opencv <no-dsa> (Minor issue; can be fixed via point release)
[stretch] - opencv <not-affected> (Vulnerable code introduced later)
[jessie] - opencv <not-affected> (Vulnerable code introduced later)

Search for package or bug name: Reporting problems