Skip to content

Commit bcb22cc

Browse files
committed
feat: added Libsrtp checker (#1489)
1 parent e36bc96 commit bcb22cc

File tree

5 files changed

+43
-0
lines changed

5 files changed

+43
-0
lines changed

cve_bin_tool/checkers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
"libnss",
6363
"libsndfile",
6464
"libsoup",
65+
"libsrtp",
6566
"libssh2",
6667
"libtiff",
6768
"libvirt",

cve_bin_tool/checkers/libsrtp.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright (C) 2021 Intel Corporation
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
"""
5+
CVE checker for libsrtp
6+
7+
https://www.cvedetails.com/vulnerability-list/vendor_id-16/product_id-26868/version_id-502930/Cisco-Libsrtp--.html
8+
9+
"""
10+
11+
from cve_bin_tool.checkers import Checker
12+
13+
14+
class LibsrtpChecker(Checker):
15+
CONTAINS_PATTERNS = [
16+
r"An implementation of the Secure Real-time Transport Protocol \(SRTP\)",
17+
r"This package provides an implementation of the Secure Real-time",
18+
r"Transport Protocol \(SRTP\), the Universal Security Transform \(UST\), and",
19+
r"a supporting cryptographic kernel\.",
20+
]
21+
FILENAME_PATTERNS = [r"libsrtp"]
22+
VERSION_PATTERNS = [r"libsrtp-([0-9]+\.[0-9]+\.[0-9]+)"]
23+
VENDOR_PRODUCT = [("cisco", "libsrtp")]
Binary file not shown.
Binary file not shown.

test/test_data/libsrtp.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
mapping_test_data = [
2+
{"product": "libsrtp", "version": "1.5.4", "version_strings": ["libsrtp-1.5.4"]},
3+
{"product": "libsrtp", "version": "2.3.0", "version_strings": ["libsrtp-2.3.0"]},
4+
]
5+
6+
package_test_data = [
7+
{
8+
"url": "https://rpmfind.net/linux/centos/8-stream/AppStream/aarch64/os/Packages/",
9+
"package_name": "libsrtp-1.5.4-8.el8.aarch64.rpm",
10+
"product": "libsrtp",
11+
"version": "1.5.4",
12+
},
13+
{
14+
"url": "https://rpmfind.net/linux/centos-stream/9-stream/AppStream/aarch64/os/Packages/",
15+
"package_name": "libsrtp-2.3.0-7.el9.aarch64.rpm",
16+
"product": "libsrtp",
17+
"version": "2.3.0",
18+
},
19+
]

0 commit comments

Comments
 (0)