Skip to content

Commit af33b7c

Browse files
authored
Added the Bluez checker (#232)
modified: checkers/__init__.py new file: checkers/bluez.py
2 parents ab0e8ea + 6d647a8 commit af33b7c

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

cve_bin_tool/checkers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@
1616
"sqlite",
1717
"kerberos",
1818
"icu",
19+
"bluez",
1920
]

cve_bin_tool/checkers/bluez.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env python3
2+
"""
3+
CVE checker for Bluez
4+
References:
5+
https://www.cvedetails.com/vulnerability-list/vendor_id-8316/product_id-35116/Bluez-Bluez.html
6+
7+
"""
8+
from ..util import regex_find
9+
10+
def get_version(lines, filename):
11+
"""Bluetoothctl will work for Version 5.0+
12+
Vpkg: bluez, bluez
13+
"""
14+
regex = [r"bluetoothctl: ([5]+\.[0-9]+\.[0-9]+)"]
15+
version_info = dict()
16+
if filename[::-1].startswith(("bluetoothctl")[::-1]):
17+
version_info["is_or_contains"] = "is"
18+
19+
if "is_or_contains" in version_info:
20+
version_info["modulename"] = "bluetoothctl"
21+
version_info["version"] = regex_find(lines, *regex)
22+
elif "libbluetooth.so" in filename:
23+
version_info["is_or_contains"] = "is"
24+
25+
return version_info

0 commit comments

Comments
 (0)