Skip to content

Commit 8837ce6

Browse files
rhythmrx9BreadGenieterriko
authored
feat(checker): libebml checker (fixes #1298) (#1559)
Co-authored-by: Bread Genie <[email protected]> Co-authored-by: Terri Oda <[email protected]>
1 parent 0976211 commit 8837ce6

File tree

8 files changed

+77
-22
lines changed

8 files changed

+77
-22
lines changed

.github/actions/spelling/allow.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ libbpg
173173
libc
174174
libcurl
175175
libdb
176+
libebml
176177
libexpat
177178
libgcrypt
178179
libical

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -194,23 +194,24 @@ The following checkers are available for finding components in binary files:
194194

195195
<!--CHECKERS TABLE BEGIN-->
196196
| | | | Available checkers | | | |
197-
|--------------- |------------ |--------------- |---------- |------------- |---------- |---------- |
197+
|--------------- |---------- |------------ |--------------- |---------- |------------- |---------- |
198198
| accountsservice |avahi |bash |bind |binutils |bolt |bubblewrap |
199199
| busybox |bzip2 |cronie |cryptsetup |cups |curl |dbus |
200200
| dnsmasq |dovecot |dpkg |enscript |expat |ffmpeg |freeradius |
201201
| ftp |gcc |gimp |glibc |gnomeshell |gnupg |gnutls |
202202
| gpgme |gstreamer |gupnp |haproxy |hdf5 |hostapd |hunspell |
203203
| icecast |icu |irssi |kbd |kerberos |kexectools |libarchive |
204-
| libbpg |libdb |libgcrypt |libical |libjpeg_turbo |liblas |libnss |
205-
| librsvg |libseccomp |libsndfile |libsoup |libsrtp |libssh2 |libtiff |
206-
| libvirt |libvncserver |libxslt |lighttpd |logrotate |lua |mariadb |
207-
| mdadm |memcached |mtr |mysql |nano |ncurses |nessus |
208-
| netpbm |nginx |node |ntp |open_vm_tools |openafs |openjpeg |
209-
| openldap |openssh |openssl |openswan |openvpn |p7zip |pcsc_lite |
210-
| pigz |png |polarssl_fedora |poppler |postgresql |pspp |python |
211-
| qt |radare2 |rsyslog |samba |sane_backends |sqlite |strongswan |
212-
| subversion |sudo |syslogng |systemd |tcpdump |trousers |varnish |
213-
| webkitgtk |wireshark |wpa_supplicant |xerces |xml2 |zlib |zsh |
204+
| libbpg |libdb |libebml |libgcrypt |libical |libjpeg_turbo |liblas |
205+
| libnss |librsvg |libseccomp |libsndfile |libsoup |libsrtp |libssh2 |
206+
| libtiff |libvirt |libvncserver |libxslt |lighttpd |logrotate |lua |
207+
| mariadb |mdadm |memcached |mtr |mysql |nano |ncurses |
208+
| nessus |netpbm |nginx |node |ntp |open_vm_tools |openafs |
209+
| openjpeg |openldap |openssh |openssl |openswan |openvpn |p7zip |
210+
| pcsc_lite |pigz |png |polarssl_fedora |poppler |postgresql |pspp |
211+
| python |qt |radare2 |rsyslog |samba |sane_backends |sqlite |
212+
| strongswan |subversion |sudo |syslogng |systemd |tcpdump |trousers |
213+
| varnish |webkitgtk |wireshark |wpa_supplicant |xerces |xml2 |zlib |
214+
| zsh | | | | | | |
214215
<!--CHECKERS TABLE END-->
215216

216217
All the checkers can be found in the checkers directory, as can the

cve_bin_tool/checkers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"libarchive",
5656
"libbpg",
5757
"libdb",
58+
"libebml",
5859
"libgcrypt",
5960
"libical",
6061
"libjpeg_turbo",

cve_bin_tool/checkers/libebml.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright (C) 2022 Intel Corporation
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
"""
5+
CVE checker for libebml
6+
7+
https://www.cvedetails.com/product/33126/Matroska-Libebml.html?vendor_id=7864
8+
9+
"""
10+
11+
from cve_bin_tool.checkers import Checker
12+
13+
14+
class LibebmlChecker(Checker):
15+
CONTAINS_PATTERNS = []
16+
FILENAME_PATTERNS = [r"libebml.so"]
17+
VERSION_PATTERNS = [
18+
r"libebml-([0-9]+\.[0-9]+\.[0-9]+)",
19+
r"([0-9]+\.[0-9]+\.[0-9]+)\nUnknown\nEBMLVoid", # This string may be brittle to changes in string ordering
20+
]
21+
VENDOR_PRODUCT = [("matroska", "libebml")]

doc/MANUAL.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -118,23 +118,24 @@ which is useful if you're trying the latest code from
118118

119119
<!--CHECKERS TABLE BEGIN-->
120120
| | | | Available checkers | | | |
121-
|--------------- |------------ |--------------- |---------- |------------- |---------- |---------- |
121+
|--------------- |---------- |------------ |--------------- |---------- |------------- |---------- |
122122
| accountsservice |avahi |bash |bind |binutils |bolt |bubblewrap |
123123
| busybox |bzip2 |cronie |cryptsetup |cups |curl |dbus |
124124
| dnsmasq |dovecot |dpkg |enscript |expat |ffmpeg |freeradius |
125125
| ftp |gcc |gimp |glibc |gnomeshell |gnupg |gnutls |
126126
| gpgme |gstreamer |gupnp |haproxy |hdf5 |hostapd |hunspell |
127127
| icecast |icu |irssi |kbd |kerberos |kexectools |libarchive |
128-
| libbpg |libdb |libgcrypt |libical |libjpeg_turbo |liblas |libnss |
129-
| librsvg |libseccomp |libsndfile |libsoup |libsrtp |libssh2 |libtiff |
130-
| libvirt |libvncserver |libxslt |lighttpd |logrotate |lua |mariadb |
131-
| mdadm |memcached |mtr |mysql |nano |ncurses |nessus |
132-
| netpbm |nginx |node |ntp |open_vm_tools |openafs |openjpeg |
133-
| openldap |openssh |openssl |openswan |openvpn |p7zip |pcsc_lite |
134-
| pigz |png |polarssl_fedora |poppler |postgresql |pspp |python |
135-
| qt |radare2 |rsyslog |samba |sane_backends |sqlite |strongswan |
136-
| subversion |sudo |syslogng |systemd |tcpdump |trousers |varnish |
137-
| webkitgtk |wireshark |wpa_supplicant |xerces |xml2 |zlib |zsh |
128+
| libbpg |libdb |libebml |libgcrypt |libical |libjpeg_turbo |liblas |
129+
| libnss |librsvg |libseccomp |libsndfile |libsoup |libsrtp |libssh2 |
130+
| libtiff |libvirt |libvncserver |libxslt |lighttpd |logrotate |lua |
131+
| mariadb |mdadm |memcached |mtr |mysql |nano |ncurses |
132+
| nessus |netpbm |nginx |node |ntp |open_vm_tools |openafs |
133+
| openjpeg |openldap |openssh |openssl |openswan |openvpn |p7zip |
134+
| pcsc_lite |pigz |png |polarssl_fedora |poppler |postgresql |pspp |
135+
| python |qt |radare2 |rsyslog |samba |sane_backends |sqlite |
136+
| strongswan |subversion |sudo |syslogng |systemd |tcpdump |trousers |
137+
| varnish |webkitgtk |wireshark |wpa_supplicant |xerces |xml2 |zlib |
138+
| zsh | | | | | | |
138139
<!--CHECKERS TABLE END-->
139140

140141
For a quick overview of usage and how it works, you can also see [the readme file](README.md).
7.46 KB
Binary file not shown.
7.15 KB
Binary file not shown.

test/test_data/libebml.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Copyright (C) 2021 Intel Corporation
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
mapping_test_data = [
5+
{
6+
"product": "libebml",
7+
"version": "1.3.9",
8+
"version_strings": ["libebml-1.3.9"],
9+
},
10+
{
11+
"product": "libebml",
12+
"version": "1.3.6",
13+
"version_strings": ["libebml-1.3.6"],
14+
},
15+
]
16+
17+
package_test_data = [
18+
{
19+
"url": "https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/l/",
20+
"package_name": "libebml-1.3.9-1.el7.x86_64.rpm",
21+
"product": "libebml",
22+
"version": "1.3.9",
23+
},
24+
{
25+
"url": "http://ftp.de.debian.org/debian/pool/main/libe/libebml/",
26+
"package_name": "libebml4v5_1.3.6-2_amd64.deb",
27+
"product": "libebml",
28+
"version": "1.3.6",
29+
},
30+
]

0 commit comments

Comments
 (0)