Bug 1797450 (CVE-2019-14493)
Summary: | CVE-2019-14493 opencv: NULL pointer dereference in function cv::XMLParser::parse() in persistence_xml.cpp leading to DoS | ||
---|---|---|---|
Product: | [Other] Security Response | Reporter: | Dhananjay Arunesh <darunesh> |
Component: | vulnerability | Assignee: | Red Hat Product Security <security-response-team> |
Status: | CLOSED NOTABUG | QA Contact: | |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | unspecified | CC: | andrew, databases-maint, hhorak, jkucera, jmlich83, jridky, karlthered, kwizart, pkajaba, rakesh.pandit, sergio, viktor.vix.jancik |
Target Milestone: | --- | Keywords: | Security |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | opencv 4.1.1 | Doc Type: | If docs needed, set a value |
Doc Text: |
A NULL pointer dereference flaw was found in OpenCV in the way the Cascade Classifier algorithm loaded and processed certain classifiers. A remote attacker could exploit this flaw by providing a specially crafted XML file that, when loaded by an application linked to OpenCV, would crash the application causing a denial of service.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2020-02-13 20:09:44 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1797451 | ||
Bug Blocks: | 1797452 |
Description
Dhananjay Arunesh
2020-02-03 08:12:01 UTC
Created opencv tracking bugs for this issue: Affects: fedora-all [bug 1797451] The flaw lies in the implementation of Cascade Classifier, an algorithm used internally by OpenCV to detect objects in digital images. It is a machine learning based algorithm where a classifier is trained from a lot of "positive" and "negative" images, and then used to detect objects in other images. Specifically, the NULL pointer dereference can be triggered when the classifier (in the form of a XML file) is loaded and parsed by the cv::CascadeClassifier::load() function. This flaw was apparently introduced in OpenCV upstream version 4.0.0 with commit https://github.com/opencv/opencv/commit/0f622206e48f6050536f00d47abf47c4a2d1824a. This commit replaced function icvXMLSkipSpaces() with skipSpaces() in persistence_xml.cpp; the new implementation made it possible for skipSpaces() to return a NULL pointer: https://github.com/opencv/opencv/commit/0f622206e48f6050536f00d47abf47c4a2d1824a#diff-c9729b5bab1646d0cf30a15a7de41fd5R416. Conversely, the older implementation took care of re-initializing the NULL pointer before returning it: https://github.com/opencv/opencv/commit/0f622206e48f6050536f00d47abf47c4a2d1824a#diff-c9729b5bab1646d0cf30a15a7de41fd5L81. Statement: This flaw did not affect the versions of OpenCV as shipped with Red Hat Enterprise Linux 6, 7, and 8 as they did not include the vulnerable code, which was introduced in a newer version of the library. This bug is now closed. Further updates for individual products will be reflected on the CVE page(s): https://access.redhat.com/security/cve/cve-2019-14493 Mitigation: Avoid loading cascade classifiers from external untrusted sources. |