Skip to content

Commit fa1dfa2

Browse files
committed
Add a test to ensure that OSS-Fuzz uses the explicit versions correctly
Signed-off-by: ziad hany <[email protected]>
1 parent 5190bef commit fa1dfa2

File tree

3 files changed

+115
-0
lines changed

3 files changed

+115
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
id: OSV-2025-68
2+
summary: UNKNOWN READ in std::__1::__function::__func<cv::PngDecoder::compose_frame
3+
details: |
4+
OSS-Fuzz report: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=392318892
5+
6+
```
7+
Crash type: UNKNOWN READ
8+
Crash state:
9+
std::__1::__function::__func<cv::PngDecoder::compose_frame
10+
cv::ParallelLoopBodyWrapper::operator
11+
cv::ThreadPool::run
12+
```
13+
modified: '2025-02-05T14:25:02.989469Z'
14+
published: '2025-01-28T00:00:46.845996Z'
15+
references:
16+
- type: REPORT
17+
url: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=392318892
18+
affected:
19+
- package:
20+
name: opencv
21+
ecosystem: OSS-Fuzz
22+
purl: pkg:generic/opencv
23+
ranges:
24+
- type: GIT
25+
repo: https://github.com/opencv/opencv.git
26+
events:
27+
- introduced: b4d03256663b6ceb2994c367be4664f282c9f1ec
28+
- fixed: c21d0ad9d08d364542bb4a6eb971ee3051ccba63
29+
- fixed: 43cebe52eba056d9fbb1115928cf698ae44abd60
30+
versions:
31+
- 4.11.0
32+
- 5.0.0-alpha
33+
ecosystem_specific:
34+
severity: MEDIUM
35+
database_specific:
36+
introduced_range: a6f72f813d307f77e7597447bdba25dcb5b6447d:ff18c9cc7904e878b10273265196e0238490e692
37+
fixed_range: d5f69305cbfdb727865baac0f7cb5c82c5fdaab9:43cebe52eba056d9fbb1115928cf698ae44abd60
38+
schema_version: 1.6.0
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"advisory_id": "OSV-2025-68",
3+
"aliases": [],
4+
"summary": "UNKNOWN READ in std::__1::__function::__func<cv::PngDecoder::compose_frame\nOSS-Fuzz report: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=392318892\n\n```\nCrash type: UNKNOWN READ\nCrash state:\nstd::__1::__function::__func<cv::PngDecoder::compose_frame\ncv::ParallelLoopBodyWrapper::operator\ncv::ThreadPool::run\n```",
5+
"affected_packages": [
6+
{
7+
"package": {
8+
"type": "generic",
9+
"namespace": "",
10+
"name": "opencv",
11+
"version": "",
12+
"qualifiers": "",
13+
"subpath": ""
14+
},
15+
"affected_version_range": null,
16+
"fixed_version_range": null,
17+
"introduced_by_commit_patches": [
18+
{
19+
"vcs_url": "https://github.com/opencv/opencv",
20+
"commit_hash": "b4d03256663b6ceb2994c367be4664f282c9f1ec",
21+
"patch_text": null,
22+
"patch_checksum": null
23+
}
24+
],
25+
"fixed_by_commit_patches": [
26+
{
27+
"vcs_url": "https://github.com/opencv/opencv",
28+
"commit_hash": "c21d0ad9d08d364542bb4a6eb971ee3051ccba63",
29+
"patch_text": null,
30+
"patch_checksum": null
31+
},
32+
{
33+
"vcs_url": "https://github.com/opencv/opencv",
34+
"commit_hash": "43cebe52eba056d9fbb1115928cf698ae44abd60",
35+
"patch_text": null,
36+
"patch_checksum": null
37+
}
38+
]
39+
},
40+
{
41+
"package": {
42+
"type": "generic",
43+
"namespace": "",
44+
"name": "opencv",
45+
"version": "",
46+
"qualifiers": "",
47+
"subpath": ""
48+
},
49+
"affected_version_range": "vers:generic/4.11.0|5.0.0-alpha",
50+
"fixed_version_range": null,
51+
"introduced_by_commit_patches": [],
52+
"fixed_by_commit_patches": []
53+
}
54+
],
55+
"references_v2": [
56+
{
57+
"reference_id": "",
58+
"reference_type": "",
59+
"url": "https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=392318892"
60+
}
61+
],
62+
"patches": [],
63+
"severities": [],
64+
"date_published": "2025-01-28T00:00:46.845996+00:00",
65+
"weaknesses": [],
66+
"url": "https://test.com"
67+
}

vulnerabilities/tests/test_osv_v2.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,16 @@ def test_to_advisories_oss_fuzz2(self):
204204
result = imported_data.to_dict()
205205
util_tests.check_results_against_json(result, expected_file)
206206

207+
def test_to_advisories_oss_fuzz3(self):
208+
with open(os.path.join(TEST_DATA, "oss-fuzz/oss-fuzz-3.yaml")) as f:
209+
mock_response = saneyaml.load(f)
210+
expected_file = os.path.join(TEST_DATA, "oss-fuzz/oss-fuzz-expected-3.json")
211+
imported_data = parse_advisory_data_v3(
212+
mock_response, "generic", advisory_url="https://test.com", advisory_text=""
213+
)
214+
result = imported_data.to_dict()
215+
util_tests.check_results_against_json(result, expected_file)
216+
207217
def test_to_advisories_pypa1(self):
208218
with open(os.path.join(TEST_DATA, "pypa/pypa-1.yaml")) as f:
209219
mock_response = saneyaml.load(f)

0 commit comments

Comments
 (0)