diff --git a/cve_bin_tool/checkers/__init__.py b/cve_bin_tool/checkers/__init__.py index 352f28841b..6f4c6d4027 100644 --- a/cve_bin_tool/checkers/__init__.py +++ b/cve_bin_tool/checkers/__init__.py @@ -129,6 +129,7 @@ "iptables", "irssi", "iucode_tool", + "iwd", "jack2", "jacksondatabind", "janus", diff --git a/cve_bin_tool/checkers/iwd.py b/cve_bin_tool/checkers/iwd.py new file mode 100644 index 0000000000..403b1efb8c --- /dev/null +++ b/cve_bin_tool/checkers/iwd.py @@ -0,0 +1,23 @@ +# Copyright (C) 2023 Orange +# SPDX-License-Identifier: GPL-3.0-or-later + + +""" +CVE checker for iwd + +https://www.cvedetails.com/product/88024/Intel-Inet-Wireless-Daemon.html?vendor_id=238 + +""" +from __future__ import annotations + +from cve_bin_tool.checkers import Checker + + +class IwdChecker(Checker): + CONTAINS_PATTERNS: list[str] = [] + FILENAME_PATTERNS: list[str] = [] + VERSION_PATTERNS = [ + r"([0-9]+\.[0-9]+)\r?\nIWD version %s", + r"iwctl version ([0-9]+\.[0-9]+)", + ] + VENDOR_PRODUCT = [("intel", "inet_wireless_daemon")] diff --git a/test/condensed-downloads/iwd-1.2-r1.apk.tar.gz b/test/condensed-downloads/iwd-1.2-r1.apk.tar.gz new file mode 100644 index 0000000000..ed01464565 Binary files /dev/null and b/test/condensed-downloads/iwd-1.2-r1.apk.tar.gz differ diff --git a/test/condensed-downloads/iwd-2.11-1.fc40.aarch64.rpm.tar.gz b/test/condensed-downloads/iwd-2.11-1.fc40.aarch64.rpm.tar.gz new file mode 100644 index 0000000000..fc7460a59f Binary files /dev/null and b/test/condensed-downloads/iwd-2.11-1.fc40.aarch64.rpm.tar.gz differ diff --git a/test/condensed-downloads/iwd_0.14-2_amd64.deb.tar.gz b/test/condensed-downloads/iwd_0.14-2_amd64.deb.tar.gz new file mode 100644 index 0000000000..6868676e0f Binary files /dev/null and b/test/condensed-downloads/iwd_0.14-2_amd64.deb.tar.gz differ diff --git a/test/test_data/iwd.py b/test/test_data/iwd.py new file mode 100644 index 0000000000..43806d4c80 --- /dev/null +++ b/test/test_data/iwd.py @@ -0,0 +1,35 @@ +# Copyright (C) 2023 Orange +# SPDX-License-Identifier: GPL-3.0-or-later + +mapping_test_data = [ + { + "product": "inet_wireless_daemon", + "version": "2.11", + "version_strings": ["iwctl version 2.11"], + }, + { + "product": "inet_wireless_daemon", + "version": "0.14", + "version_strings": ["0.14\nIWD version %s"], + }, +] +package_test_data = [ + { + "url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/i/", + "package_name": "iwd-2.11-1.fc40.aarch64.rpm", + "product": "inet_wireless_daemon", + "version": "2.11", + }, + { + "url": "http://ftp.fr.debian.org/debian/pool/main/i/iwd/", + "package_name": "iwd_0.14-2_amd64.deb", + "product": "inet_wireless_daemon", + "version": "0.14", + }, + { + "url": "https://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/", + "package_name": "iwd-1.2-r1.apk", + "product": "inet_wireless_daemon", + "version": "1.2", + }, +]