diff --git a/cve_bin_tool/checkers/__init__.py b/cve_bin_tool/checkers/__init__.py index 93cc32fce4..c0993c82a7 100644 --- a/cve_bin_tool/checkers/__init__.py +++ b/cve_bin_tool/checkers/__init__.py @@ -316,6 +316,7 @@ "tinyproxy", "tor", "tpm2_tss", + "traceroute", "transmission", "trousers", "twonky_server", diff --git a/cve_bin_tool/checkers/traceroute.py b/cve_bin_tool/checkers/traceroute.py new file mode 100644 index 0000000000..94f2bcd82b --- /dev/null +++ b/cve_bin_tool/checkers/traceroute.py @@ -0,0 +1,22 @@ +# Copyright (C) 2023 Orange +# SPDX-License-Identifier: GPL-3.0-or-later + + +""" +CVE checker for traceroute + +https://www.cvedetails.com/product/163596/BUC-Traceroute.html?vendor_id=33432 + +""" +from __future__ import annotations + +from cve_bin_tool.checkers import Checker + + +class TracerouteChecker(Checker): + CONTAINS_PATTERNS: list[str] = [] + FILENAME_PATTERNS: list[str] = [] + VERSION_PATTERNS = [ + r"Modern traceroute for Linux, version ([0-9]+\.[0-9]+\.[0-9]+)" + ] + VENDOR_PRODUCT = [("buc", "traceroute")] diff --git a/test/condensed-downloads/traceroute-2.1.3-1.fc40.aarch64.rpm.tar.gz b/test/condensed-downloads/traceroute-2.1.3-1.fc40.aarch64.rpm.tar.gz new file mode 100644 index 0000000000..5b5c61d03d Binary files /dev/null and b/test/condensed-downloads/traceroute-2.1.3-1.fc40.aarch64.rpm.tar.gz differ diff --git a/test/condensed-downloads/traceroute_2.1.0-2_amd64.deb.tar.gz b/test/condensed-downloads/traceroute_2.1.0-2_amd64.deb.tar.gz new file mode 100644 index 0000000000..a28e6b9228 Binary files /dev/null and b/test/condensed-downloads/traceroute_2.1.0-2_amd64.deb.tar.gz differ diff --git a/test/test_data/traceroute.py b/test/test_data/traceroute.py new file mode 100644 index 0000000000..f3b2a9c4c6 --- /dev/null +++ b/test/test_data/traceroute.py @@ -0,0 +1,24 @@ +# Copyright (C) 2023 Orange +# SPDX-License-Identifier: GPL-3.0-or-later + +mapping_test_data = [ + { + "product": "traceroute", + "version": "2.1.0", + "version_strings": ["Modern traceroute for Linux, version 2.1.0"], + } +] +package_test_data = [ + { + "url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/t/", + "package_name": "traceroute-2.1.3-1.fc40.aarch64.rpm", + "product": "traceroute", + "version": "2.1.3", + }, + { + "url": "http://ftp.fr.debian.org/debian/pool/main/t/traceroute/", + "package_name": "traceroute_2.1.0-2_amd64.deb", + "product": "traceroute", + "version": "2.1.0", + }, +]