diff --git a/cve_bin_tool/checkers/__init__.py b/cve_bin_tool/checkers/__init__.py index 772de420f0..cb662c67ad 100644 --- a/cve_bin_tool/checkers/__init__.py +++ b/cve_bin_tool/checkers/__init__.py @@ -235,6 +235,7 @@ "monit", "mosquitto", "motion", + "mp4v2", "mpg123", "mpv", "msmtp", diff --git a/cve_bin_tool/checkers/mp4v2.py b/cve_bin_tool/checkers/mp4v2.py new file mode 100644 index 0000000000..c2210f8a4a --- /dev/null +++ b/cve_bin_tool/checkers/mp4v2.py @@ -0,0 +1,26 @@ +# Copyright (C) 2024 Orange +# SPDX-License-Identifier: GPL-3.0-or-later + + +""" +CVE checker for mp4v2 + +https://www.cvedetails.com/product/48319/Techsmith-Mp4v2.html?vendor_id=9035 +https://www.cvedetails.com/product/44070/Mp4v2-Project-Mp4v2.html?vendor_id=17731 +https://www.cvedetails.com/product/142097/Mp4v2-Mp4v2.html?vendor_id=30832 + +""" +from __future__ import annotations + +from cve_bin_tool.checkers import Checker + + +class Mp4V2Checker(Checker): + CONTAINS_PATTERNS: list[str] = [] + FILENAME_PATTERNS: list[str] = [] + VERSION_PATTERNS = [r"MP4v2\r?\nversion:\r?\n([0-9]+\.[0-9]+\.[0-9]+)"] + VENDOR_PRODUCT = [ + ("mp4v2", "mp4v2"), + ("mp4v2_project", "mp4v2"), + ("techsmith", "mp4v2"), + ] diff --git a/test/condensed-downloads/libmp4v2-1:2.1.3-2-aarch64.pkg.tar.xz.tar.gz b/test/condensed-downloads/libmp4v2-1:2.1.3-2-aarch64.pkg.tar.xz.tar.gz new file mode 100644 index 0000000000..cd9f656940 Binary files /dev/null and b/test/condensed-downloads/libmp4v2-1:2.1.3-2-aarch64.pkg.tar.xz.tar.gz differ diff --git a/test/test_data/mp4v2.py b/test/test_data/mp4v2.py new file mode 100644 index 0000000000..34355e5ccc --- /dev/null +++ b/test/test_data/mp4v2.py @@ -0,0 +1,19 @@ +# Copyright (C) 2024 Orange +# SPDX-License-Identifier: GPL-3.0-or-later + +mapping_test_data = [ + { + "product": "mp4v2", + "version": "4.1.2", + "version_strings": ["MP4v2\nversion:\n4.1.2"], + } +] +package_test_data = [ + { + "url": "https://eu.mirror.archlinuxarm.org/aarch64/extra/", + "package_name": "libmp4v2-1:2.1.3-2-aarch64.pkg.tar.xz", + "product": "mp4v2", + "version": "2.1.3", + "other_products": ["gcc"], + }, +]