An out-of-bounds read was discovered in OpenCV before 4.1.1. Specifically, variable coarsestscale is assumed to be greater than or equal to finestscale within the calc()/oclcalc() functions in disflow.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.
[
{
"source": "https://github.com/opencv/opencv/commit/d1615ba11a93062b1429fce9f0f638d1572d3418",
"id": "CVE-2019-19624-0d107a39",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "modules/video/src/dis_flow.cpp",
"function": "DISOpticalFlowImpl::ocl_calc"
},
"digest": {
"function_hash": "162139554431137049292270821388345923312",
"length": 2056.0
},
"signature_type": "Function"
},
{
"source": "https://github.com/opencv/opencv/commit/d1615ba11a93062b1429fce9f0f638d1572d3418",
"id": "CVE-2019-19624-96afccd4",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "modules/video/test/test_OF_accuracy.cpp"
},
"digest": {
"line_hashes": [
"292434262406728731628828372549760652021",
"211662216980639316321159698469647860942",
"304814111594908040081152956091489419567"
],
"threshold": 0.9
},
"signature_type": "Line"
},
{
"source": "https://github.com/opencv/opencv/commit/d1615ba11a93062b1429fce9f0f638d1572d3418",
"id": "CVE-2019-19624-a9be7788",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "modules/video/src/dis_flow.cpp"
},
"digest": {
"line_hashes": [
"241788169997656428846655581691109904689",
"295014261042212085194381057829810711030",
"281486234171086797679885502900928839897",
"328542092674003222271231465336406420140",
"15362431844559001884177702219153463341",
"280100629722678420229231097710457023239",
"278991730339888761006996892097494869265",
"181863082256781215470609415054293150793",
"50647401497426498578065211537922309543",
"27580502085172621736855882366216454318",
"83076456701604978161207366164177336379",
"130223734785722942024318727136227919293",
"318996292682408027751279023705159956127",
"119572132128094897544301786694778489151",
"179506427962028627853688607253703072201",
"130669332271978750733384204798221200980",
"2567042413751246471380210352254762735"
],
"threshold": 0.9
},
"signature_type": "Line"
},
{
"source": "https://github.com/opencv/opencv/commit/d1615ba11a93062b1429fce9f0f638d1572d3418",
"id": "CVE-2019-19624-cd2ad34c",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "modules/video/src/dis_flow.cpp",
"function": "DISOpticalFlowImpl::calc"
},
"digest": {
"function_hash": "194708317682258746355058615638866463711",
"length": 2561.0
},
"signature_type": "Function"
}
]