Skip to content

Commit c100651

Browse files
committed
added new checker libseccomp
1 parent d6ade7c commit c100651

File tree

8 files changed

+69
-20
lines changed

8 files changed

+69
-20
lines changed

.github/actions/spelling/allow.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ liblas
180180
libnss
181181
libpng
182182
libraryname
183+
libseccomp
183184
libsndfile
184185
libsoup
185186
libsqlite

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -191,23 +191,23 @@ The following checkers are available for finding components in binary files:
191191

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

213213
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
@@ -60,6 +60,7 @@
6060
"libjpeg_turbo",
6161
"liblas",
6262
"libnss",
63+
"libseccomp",
6364
"libsndfile",
6465
"libsoup",
6566
"libsrtp",

cve_bin_tool/checkers/libseccomp.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright (C) 2022 Intel Corporation
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
"""
5+
CVE checker for libseccomp
6+
7+
https://www.cvedetails.com/vulnerability-list/vendor_id-19760/product_id-53398/Libseccomp-Project-Libseccomp.html
8+
"""
9+
from cve_bin_tool.checkers import Checker
10+
11+
12+
class LibseccompChecker(Checker):
13+
CONTAINS_PATTERNS = []
14+
FILENAME_PATTERNS = [r"libseccomp"]
15+
VERSION_PATTERNS = [
16+
r"libseccomp.so.([0-9]+\.[0-9]+\.[0-9]+)"
17+
] # patterns like this aren't ideal
18+
VENDOR_PRODUCT = [("libseccomp_project", "libseccomp")]

doc/MANUAL.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -118,23 +118,23 @@ 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 |
128128
| libbpg |libdb |libgcrypt |libical |libjpeg_turbo |liblas |libnss |
129-
| libsndfile |libsoup |libsrtp |libssh2 |libtiff |libvirt |libvncserver |
130-
| libxslt |lighttpd |logrotate |lua |mariadb |mdadm |memcached |
131-
| mtr |mysql |nano |ncurses |nessus |netpbm |nginx |
132-
| node |ntp |open_vm_tools |openafs |openjpeg |openldap |openssh |
133-
| openssl |openswan |openvpn |p7zip |pcsc_lite |pigz |png |
134-
| polarssl_fedora |poppler |postgresql |pspp |python |qt |radare2 |
135-
| rsyslog |samba |sane_backends |sqlite |strongswan |subversion |sudo |
136-
| syslogng |systemd |tcpdump |trousers |varnish |webkitgtk |wireshark |
137-
| wpa_supplicant |xerces |xml2 |zlib |zsh | | |
129+
| libseccomp |libsndfile |libsoup |libsrtp |libssh2 |libtiff |libvirt |
130+
| libvncserver |libxslt |lighttpd |logrotate |lua |mariadb |mdadm |
131+
| memcached |mtr |mysql |nano |ncurses |nessus |netpbm |
132+
| nginx |node |ntp |open_vm_tools |openafs |openjpeg |openldap |
133+
| openssh |openssl |openswan |openvpn |p7zip |pcsc_lite |pigz |
134+
| png |polarssl_fedora |poppler |postgresql |pspp |python |qt |
135+
| radare2 |rsyslog |samba |sane_backends |sqlite |strongswan |subversion |
136+
| sudo |syslogng |systemd |tcpdump |trousers |varnish |webkitgtk |
137+
| wireshark |wpa_supplicant |xerces |xml2 |zlib |zsh | |
138138
<!--CHECKERS TABLE END-->
139139

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

test/test_data/libseccomp.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright (C) 2022 Intel Corporation
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
mapping_test_data = [
5+
{
6+
"product": "libseccomp",
7+
"version": "2.3.1",
8+
"version_strings": ["libseccomp.so.2.3.1"],
9+
},
10+
{
11+
"product": "libseccomp",
12+
"version": "2.5.0",
13+
"version_strings": ["libseccomp.so.2.5.0"],
14+
},
15+
]
16+
package_test_data = [
17+
{
18+
"url": "http://mirror.centos.org/centos/7/os/x86_64/Packages/",
19+
"package_name": "libseccomp-2.3.1-4.el7.x86_64.rpm",
20+
"product": "libseccomp",
21+
"version": "2.3.1",
22+
},
23+
{
24+
"url": "https://download-ib01.fedoraproject.org/pub/fedora/linux/releases/34/Everything/x86_64/os/Packages/l/",
25+
"package_name": "libseccomp-2.5.0-4.fc34.x86_64.rpm",
26+
"product": "libseccomp",
27+
"version": "2.5.0",
28+
},
29+
]

0 commit comments

Comments
 (0)