-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(analysis): better tolerate GIT analysis crashes (#2884)
This commit improves tolerance for GIT commit analysis failures. When GIT range analysis crashes, the entire record is discarded. The record's `affected[]` may contain other non-GIT events (i.e. `package` entries) that will be of value. There are two known scenarios where GIT range analysis crashes: - the commit being analysed is an orphaned commit - the commit cannot be found in the repository (because it is from a fork) Includes a test to confirm behaviour
- Loading branch information
1 parent
a7dd06d
commit 743b45e
Showing
6 changed files
with
338 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
{ | ||
"id": "CVE-2016-10046", | ||
"severity": [ | ||
{ | ||
"type": "CVSS_V3", | ||
"score": "CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H" | ||
} | ||
], | ||
"details": "Heap-based buffer overflow in the DrawImage function in magick/draw.c in ImageMagick before 6.9.5-5 allows remote attackers to cause a denial of service (application crash) via a crafted image file.", | ||
"affected": [ | ||
{ | ||
"package": { | ||
"name": "imagemagick", | ||
"ecosystem": "Debian:11" | ||
}, | ||
"ranges": [ | ||
{ | ||
"type": "ECOSYSTEM", | ||
"events": [ | ||
{ | ||
"introduced": "0" | ||
}, | ||
{ | ||
"fixed": "8:6.9.6.2+dfsg-2" | ||
} | ||
] | ||
} | ||
], | ||
"ecosystem_specific": { | ||
"urgency": "not yet assigned" | ||
} | ||
}, | ||
{ | ||
"package": { | ||
"name": "imagemagick", | ||
"ecosystem": "Debian:12" | ||
}, | ||
"ranges": [ | ||
{ | ||
"type": "ECOSYSTEM", | ||
"events": [ | ||
{ | ||
"introduced": "0" | ||
}, | ||
{ | ||
"fixed": "8:6.9.6.2+dfsg-2" | ||
} | ||
] | ||
} | ||
], | ||
"ecosystem_specific": { | ||
"urgency": "not yet assigned" | ||
} | ||
}, | ||
{ | ||
"package": { | ||
"name": "imagemagick", | ||
"ecosystem": "Debian:13" | ||
}, | ||
"ranges": [ | ||
{ | ||
"type": "ECOSYSTEM", | ||
"events": [ | ||
{ | ||
"introduced": "0" | ||
}, | ||
{ | ||
"fixed": "8:6.9.6.2+dfsg-2" | ||
} | ||
] | ||
} | ||
], | ||
"ecosystem_specific": { | ||
"urgency": "not yet assigned" | ||
} | ||
}, | ||
{ | ||
"ranges": [ | ||
{ | ||
"type": "GIT", | ||
"repo": "https://github.com/imagemagick/imagemagick", | ||
"events": [ | ||
{ | ||
"introduced": "0" | ||
}, | ||
{ | ||
"fixed": "989f9f88ea6db09b99d25586e912c921c0da8d3f" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "GIT", | ||
"repo": "https://github.com/imagemagick/imagemagick6", | ||
"events": [ | ||
{ | ||
"introduced": "0" | ||
}, | ||
{ | ||
"last_affected": "969a96ed7eea9603bea46492e9116c2ba28da60f" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"references": [ | ||
{ | ||
"type": "ADVISORY", | ||
"url": "http://www.securityfocus.com/bid/95183" | ||
}, | ||
{ | ||
"type": "ADVISORY", | ||
"url": "https://github.com/ImageMagick/ImageMagick/commit/989f9f88ea6db09b99d25586e912c921c0da8d3f" | ||
}, | ||
{ | ||
"type": "ARTICLE", | ||
"url": "http://www.openwall.com/lists/oss-security/2016/12/26/9" | ||
}, | ||
{ | ||
"type": "FIX", | ||
"url": "https://github.com/ImageMagick/ImageMagick/commit/989f9f88ea6db09b99d25586e912c921c0da8d3f" | ||
}, | ||
{ | ||
"type": "REPORT", | ||
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=1410448" | ||
}, | ||
{ | ||
"type": "REPORT", | ||
"url": "https://github.com/ImageMagick/ImageMagick/commit/989f9f88ea6db09b99d25586e912c921c0da8d3f" | ||
}, | ||
{ | ||
"type": "WEB", | ||
"url": "http://www.openwall.com/lists/oss-security/2016/12/26/9" | ||
}, | ||
{ | ||
"type": "WEB", | ||
"url": "http://www.securityfocus.com/bid/95183" | ||
}, | ||
{ | ||
"type": "ADVISORY", | ||
"url": "https://security-tracker.debian.org/tracker/CVE-2016-10046" | ||
} | ||
], | ||
"modified": "2024-09-18T01:00:20Z", | ||
"published": "2017-03-23T17:59:00Z" | ||
} |
146 changes: 146 additions & 0 deletions
146
docker/worker/testdata/UpdateTest_analysis_crash_handling.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
{ 'affected': [], | ||
'affected_fuzzy': [ '6-9-4-0', | ||
'6-9-4-1', | ||
'6-9-4-10', | ||
'6-9-4-2', | ||
'6-9-4-3', | ||
'6-9-4-4', | ||
'6-9-4-5', | ||
'6-9-4-6', | ||
'6-9-4-7', | ||
'6-9-4-8', | ||
'6-9-4-9', | ||
'6-9-5-0', | ||
'6-9-5-1', | ||
'6-9-5-2', | ||
'6-9-5-3', | ||
'6-9-5-4'], | ||
'affected_packages': [ { 'database_specific': None, | ||
'ecosystem_specific': { 'urgency': 'not yet ' | ||
'assigned'}, | ||
'package': { 'ecosystem': 'Debian:11', | ||
'name': 'imagemagick', | ||
'purl': 'pkg:deb/debian/imagemagick?arch=source'}, | ||
'ranges': [ { 'events': [ { 'type': 'introduced', | ||
'value': '0'}, | ||
{ 'type': 'fixed', | ||
'value': '8:6.9.6.2+dfsg-2'}], | ||
'repo_url': '', | ||
'type': 'ECOSYSTEM'}], | ||
'severities': [], | ||
'versions': []}, | ||
{ 'database_specific': None, | ||
'ecosystem_specific': { 'urgency': 'not yet ' | ||
'assigned'}, | ||
'package': { 'ecosystem': 'Debian:12', | ||
'name': 'imagemagick', | ||
'purl': 'pkg:deb/debian/imagemagick?arch=source'}, | ||
'ranges': [ { 'events': [ { 'type': 'introduced', | ||
'value': '0'}, | ||
{ 'type': 'fixed', | ||
'value': '8:6.9.6.2+dfsg-2'}], | ||
'repo_url': '', | ||
'type': 'ECOSYSTEM'}], | ||
'severities': [], | ||
'versions': []}, | ||
{ 'database_specific': None, | ||
'ecosystem_specific': { 'urgency': 'not yet ' | ||
'assigned'}, | ||
'package': { 'ecosystem': 'Debian:13', | ||
'name': 'imagemagick', | ||
'purl': 'pkg:deb/debian/imagemagick?arch=source'}, | ||
'ranges': [ { 'events': [ { 'type': 'introduced', | ||
'value': '0'}, | ||
{ 'type': 'fixed', | ||
'value': '8:6.9.6.2+dfsg-2'}], | ||
'repo_url': '', | ||
'type': 'ECOSYSTEM'}], | ||
'severities': [], | ||
'versions': []}, | ||
{ 'database_specific': None, | ||
'ecosystem_specific': None, | ||
'package': { 'ecosystem': '', | ||
'name': '', | ||
'purl': None}, | ||
'ranges': [ { 'events': [ { 'type': 'introduced', | ||
'value': '0'}, | ||
{ 'type': 'fixed', | ||
'value': '989f9f88ea6db09b99d25586e912c921c0da8d3f'}], | ||
'repo_url': 'https://github.com/imagemagick/imagemagick', | ||
'type': 'GIT'}, | ||
{ 'events': [ { 'type': 'introduced', | ||
'value': '0'}, | ||
{ 'type': 'last_affected', | ||
'value': '969a96ed7eea9603bea46492e9116c2ba28da60f'}], | ||
'repo_url': 'https://github.com/imagemagick/imagemagick6', | ||
'type': 'GIT'}], | ||
'severities': [], | ||
'versions': [ '6.9.4-0', | ||
'6.9.4-1', | ||
'6.9.4-10', | ||
'6.9.4-2', | ||
'6.9.4-3', | ||
'6.9.4-4', | ||
'6.9.4-5', | ||
'6.9.4-6', | ||
'6.9.4-7', | ||
'6.9.4-8', | ||
'6.9.4-9', | ||
'6.9.5-0', | ||
'6.9.5-1', | ||
'6.9.5-2', | ||
'6.9.5-3', | ||
'6.9.5-4']}], | ||
'aliases': [], | ||
'credits': [], | ||
'database_specific': None, | ||
'db_id': 'CVE-2016-10046', | ||
'details': 'Heap-based buffer overflow in the DrawImage function in ' | ||
'magick/draw.c in ImageMagick before 6.9.5-5 allows remote ' | ||
'attackers to cause a denial of service (application crash) via ' | ||
'a crafted image file.', | ||
'ecosystem': ['Debian', 'Debian:11', 'Debian:12', 'Debian:13'], | ||
'fixed': '', | ||
'has_affected': True, | ||
'import_last_modified': DatetimeWithNanoseconds(2024, 9, 18, 1, 0, 20), | ||
'is_fixed': True, | ||
'issue_id': None, | ||
'last_modified': DatetimeWithNanoseconds(2021, 1, 1, 0, 0), | ||
'project': ['imagemagick'], | ||
'public': True, | ||
'purl': [ 'pkg:deb/debian/imagemagick', | ||
'pkg:deb/debian/imagemagick?arch=source'], | ||
'reference_url_types': { 'http://www.openwall.com/lists/oss-security/2016/12/26/9': 'WEB', | ||
'http://www.securityfocus.com/bid/95183': 'WEB', | ||
'https://bugzilla.redhat.com/show_bug.cgi?id=1410448': 'REPORT', | ||
'https://github.com/ImageMagick/ImageMagick/commit/989f9f88ea6db09b99d25586e912c921c0da8d3f': 'REPORT', | ||
'https://security-tracker.debian.org/tracker/CVE-2016-10046': 'ADVISORY'}, | ||
'regressed': '', | ||
'related': [], | ||
'search_indices': [ '10046', | ||
'11', | ||
'12', | ||
'13', | ||
'2016', | ||
'cve', | ||
'cve-2016-10046', | ||
'debian', | ||
'debian:11', | ||
'debian:12', | ||
'debian:13', | ||
'github.com/imagemagick/imagemagick', | ||
'github.com/imagemagick/imagemagick6', | ||
'https://github.com/imagemagick/imagemagick', | ||
'https://github.com/imagemagick/imagemagick6', | ||
'imagemagick', | ||
'imagemagick6'], | ||
'semver_fixed_indexes': [], | ||
'severities': [ { 'score': 'CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H', | ||
'type': 'CVSS_V3'}], | ||
'source': 'source', | ||
'source_id': 'source:CVE-2016-10046.json', | ||
'source_of_truth': 2, | ||
'status': 1, | ||
'summary': '', | ||
'timestamp': DatetimeWithNanoseconds(2017, 3, 23, 17, 59), | ||
'withdrawn': None} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters