Skip to content

Commit 9a2aaa8

Browse files
andrewpollockCharlyReux
authored andcommitted
Fix querying by commit integration test (#2129)
60e572dbf7b4ded66b488f54773f66aaf6184321 now also matches CVE-2024-31745
1 parent bdafb80 commit 9a2aaa8

File tree

1 file changed

+60
-1
lines changed

1 file changed

+60
-1
lines changed

gcp/api/integration_tests.py

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,64 @@ class IntegrationTests(unittest.TestCase,
9595
'summary': 'Heap-use-after-free in dwarf_dealloc',
9696
}
9797

98+
_VULN_31745 = {
99+
'id': 'CVE-2024-31745',
100+
'details':
101+
('Libdwarf v0.9.1 was discovered to contain a heap use-after-free '
102+
'via the dw_empty_errlist_item function at /libdwarf/dwarf_alloc.c.'
103+
),
104+
'modified': '2024-04-20T01:04:38.640360Z',
105+
'published': '2024-04-19T13:15:13Z',
106+
'references': [{
107+
'type':
108+
'FIX',
109+
'url': ('https://github.com/davea42/libdwarf-code/commit/'
110+
'404e6b1b14f60c81388d50b4239f81d461b3c3ad')
111+
}, {
112+
'type': 'REPORT',
113+
'url': 'https://github.com/davea42/libdwarf-code/issues/238'
114+
}],
115+
'affected': [{
116+
'ranges': [{
117+
'type':
118+
'GIT',
119+
'repo':
120+
'https://github.com/davea42/libdwarf-code',
121+
'events': [{
122+
'introduced': '0'
123+
}, {
124+
'fixed': '404e6b1b14f60c81388d50b4239f81d461b3c3ad'
125+
}]
126+
}],
127+
'versions': [
128+
'20110113', '20110605', '20110607', '20110612', '20110908',
129+
'20111009', '20111030', '20111214', '20120410', '20121127',
130+
'20121130', '20130125', '20130126', '20130207', '20130729',
131+
'20130729-b', '20140131', '20140208', '20140413', '20140519',
132+
'20140805', '20150112', '20150115', '20150310', '20150507',
133+
'20150913', '20150915', '20151114', '20160116', '20160507',
134+
'20160613', '20160923', '20160929', '20161001', '20161021',
135+
'20161124', '20170416', '20170709', '20180129', '20180527',
136+
'20180723', '20180724', '20180809', '20181024', '20190104',
137+
'20190110', '20190505', '20190529', '20191002', '20191104',
138+
'20200114', '20200703', '20200719', '20200825', '20201020',
139+
'20201201', '20210305', '20210528', 'libdwarf-0.1.1',
140+
'libdwarf-0.2.0', 'libdwarf-0.3.0', 'libdwarf-0.3.1',
141+
'libdwarf-0.3.2', 'libdwarf-0.3.3', 'libdwarf-0.3.4',
142+
'libdwarf-0.4.0', 'libdwarf-0.4.1', 'libdwarf-0.4.2',
143+
'libdwarf-0.5.0', 'libdwarf-0.6.0', 'libdwarf-0.7.0',
144+
'libdwarf-0.8.0-fixedtag', 'libdwarf-0.9.0', 'libdwarf-0.9.1',
145+
'v0.3.4', 'v0.4.0', 'v0.4.1', 'v0.4.2', 'v0.5.0', 'v0.6.0',
146+
'v0.7.0', 'v0.8.0', 'v0.8.0-fixedtag', 'v0.9.0', 'v0.9.1'
147+
],
148+
'database_specific': {
149+
'source': ('https://storage.googleapis.com/cve-osv-conversion/'
150+
'osv-output/CVE-2024-31745.json')
151+
}
152+
}],
153+
'schema_version': '1.6.0'
154+
}
155+
98156
_VULN_744 = {
99157
'published': '2020-07-04T00:00:01.948828Z',
100158
'schema_version': '1.6.0',
@@ -201,7 +259,8 @@ def test_query_commit(self):
201259
'commit': '60e572dbf7b4ded66b488f54773f66aaf6184321',
202260
}),
203261
timeout=_TIMEOUT)
204-
self.assert_results_equal({'vulns': [self._VULN_890]}, response.json())
262+
self.assert_results_equal({'vulns': [self._VULN_31745, self._VULN_890]},
263+
response.json())
205264

206265
def test_query_version(self):
207266
"""Test querying by version."""

0 commit comments

Comments
 (0)