File tree Expand file tree Collapse file tree 5 files changed +70
-1
lines changed Expand file tree Collapse file tree 5 files changed +70
-1
lines changed Original file line number Diff line number Diff line change @@ -8,3 +8,4 @@ __pycache__/
8
8
htmlcov /
9
9
.coverage
10
10
build /
11
+ .eggs /*
Original file line number Diff line number Diff line change 3
3
"bluez" ,
4
4
"curl" ,
5
5
"expat" ,
6
+ "ffmpeg" ,
6
7
"icu" ,
7
8
"kerberos" ,
8
9
"libgcrypt" ,
18
19
"xerces" ,
19
20
"xml2" ,
20
21
"zlib" ,
21
- ]
22
+ ]
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/python3
2
+
3
+ """
4
+ CVE checker for ffmpeg
5
+
6
+ References:
7
+ https://www.ffmpeg.org/
8
+ https://www.cvedetails.com/vulnerability-list/vendor_id-3611/Ffmpeg.html
9
+
10
+ Note: Some of the "first vulnerable in" data may not be entered correctly.
11
+ """
12
+ from ..util import regex_find
13
+
14
+
15
+ def get_version (lines , filename ):
16
+ """returns version information for ffmpeg as found in a given file.
17
+ The version info is returned as a tuple:
18
+ [modulename, is_or_contains, version]
19
+
20
+ modulename will be ffmpeg if ffmpeg is found (and blank otherwise)
21
+ is_or_contains indicates if the file is a copy of ffmpeg or contains one
22
+ version gives the actual version number
23
+
24
+ VPkg: ffmpeg, ffmpeg
25
+ """
26
+ is_ffmpeg = "Codec '%s' is not recognized by FFmpeg." in lines
27
+ version_regex = [r"%s version ([0-9]+\.[0-9]+\.[0-9]+)" ]
28
+ version_info = dict ()
29
+ if filename [::- 1 ].startswith (("ffmpeg" )[::- 1 ]):
30
+ version_info ["is_or_contains" ] = "is"
31
+ else :
32
+ version_info ["is_or_contains" ] = "contains"
33
+
34
+ if "is_or_contains" in version_info :
35
+ version_info ["modulename" ] = "ffmpeg"
36
+ version_info ["version" ] = regex_find (lines , * version_regex )
37
+
38
+ return version_info
Original file line number Diff line number Diff line change
1
+ #include <stdio.h>
2
+
3
+ int main () {
4
+ printf ("This program is designed to test the cve-bin-tool checker." );
5
+ printf ("It outputs a few strings normally associated with ffmepg 4.1.3." );
6
+ printf ("They appear below this line." );
7
+ printf ("------------------" );
8
+ printf ("Codec '%s' is not recognized by FFmpeg." , "whatever" );
9
+ printf ("%s version 4.1.4" , "FFmpeg" );
10
+
11
+ return 0 ;
12
+ }
Original file line number Diff line number Diff line change @@ -229,6 +229,23 @@ def test_expat_deb_2_2_0(self):
229
229
"2.2.0" ,
230
230
)
231
231
232
+ def test_ffmpeg_4_1_4 (self ):
233
+ """Scanning test-ffmpeg-4.1.4.out"""
234
+ self ._binary_test (
235
+ "test-ffmpeg-4.1.4.out" ,
236
+ "ffmpeg" ,
237
+ "4.1.4" ,
238
+ [
239
+ # known cves in 4.1.4
240
+ "CVE-2019-12730"
241
+ ],
242
+ [
243
+ # an older cve from before 4.1.4
244
+ "CVE-2019-11339"
245
+ ],
246
+ )
247
+
248
+
232
249
def test_jpeg_2_0_1 (self ):
233
250
"""Scanning test-libjpeg-turbo-2.0.1"""
234
251
self ._binary_test (
You can’t perform that action at this time.
0 commit comments