Skip to content

Commit e6ec4f6

Browse files
authored
feat(checker): add cifs-utils checker (#5166)
Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
1 parent c2e3beb commit e6ec4f6

File tree

7 files changed

+54
-0
lines changed

7 files changed

+54
-0
lines changed

cve_bin_tool/checkers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"cflow",
6060
"chess",
6161
"chrony",
62+
"cifs_utils",
6263
"civetweb",
6364
"clang",
6465
"clamav",

cve_bin_tool/checkers/cifs_utils.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (C) 2025 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
5+
"""
6+
CVE checker for cifs-utils
7+
8+
https://www.cvedetails.com/product/81639/Samba-Cifs-utils.html?vendor_id=102
9+
10+
"""
11+
from __future__ import annotations
12+
13+
from cve_bin_tool.checkers import Checker
14+
15+
16+
class CifsUtilsChecker(Checker):
17+
CONTAINS_PATTERNS: list[str] = []
18+
FILENAME_PATTERNS: list[str] = []
19+
VERSION_PATTERNS = [r"mount\.cifs[A-Za-z0-9%: \"\-\.\r\n]*([0-9]+\.[0-9]+)"]
20+
VENDOR_PRODUCT = [("samba", "cifs-utils")]
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

test/test_data/cifs_utils.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Copyright (C) 2025 Orange
2+
# SPDX-License-Identifier: GPL-3.0-or-later
3+
4+
mapping_test_data = [
5+
{"product": "cifs-utils", "version": "6.8", "version_strings": ["mount.cifs\n6.8"]}
6+
]
7+
package_test_data = [
8+
{
9+
"url": "http://rpmfind.net/linux/fedora/linux/development/rawhide/Everything/aarch64/os/Packages/c/",
10+
"package_name": "cifs-utils-7.2-1.fc43.aarch64.rpm",
11+
"product": "cifs-utils",
12+
"version": "7.2",
13+
},
14+
{
15+
"url": "http://ftp.debian.org/debian/pool/main/c/cifs-utils/",
16+
"package_name": "cifs-utils_6.8-2+deb10u1_amd64.deb",
17+
"product": "cifs-utils",
18+
"version": "6.8",
19+
},
20+
{
21+
"url": "https://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/",
22+
"package_name": "cifs-utils-6.13-r0.apk",
23+
"product": "cifs-utils",
24+
"version": "6.13",
25+
"other_products": ["gcc"],
26+
},
27+
{
28+
"url": "https://downloads.openwrt.org/releases/packages-19.07/x86_64/packages/",
29+
"package_name": "cifsmount_6.9-1_x86_64.ipk",
30+
"product": "cifs-utils",
31+
"version": "6.9",
32+
},
33+
]

0 commit comments

Comments
 (0)