Skip to content

Commit 3d2aad3

Browse files
authored
fix: fix glibc patterns (#4437)
Drop wrong patterns to avoid the following false positive with the following lines of /usr/lib/python3/dist-packages/psutil-5.9.8.dist-info/METADATA: >>> p.memory_maps() [pmmap_grouped(path='/lib/x8664-linux-gnu/libutil-2.15.so', rss=32768, size=2125824, pss=32768, shared_clean=0, shared_dirty=0, private_clean=20480, private_dirty=12288, referenced=32768, anonymous=12288, swap=0), pmmap_grouped(path='/lib/x8664-linux-gnu/libc-2.15.so', rss=3821568, size=3842048, pss=3821568, shared_clean=0, shared_dirty=0, private_clean=0, private_dirty=3821568, referenced=3575808, anonymous=3821568, swap=0), pmmap_grouped(path='[heap]', rss=32768, size=139264, pss=32768, shared_clean=0, shared_dirty=0, private_clean=0, private_dirty=32768, referenced=32768, anonymous=32768, swap=0), pmmap_grouped(path='[stack]', rss=2465792, size=2494464, pss=2465792, shared_clean=0, shared_dirty=0, private_clean=0, private_dirty=2465792, referenced=2277376, anonymous=2465792, swap=0), ...] Signed-off-by: Fabrice Fontaine <[email protected]>
1 parent 58d8e25 commit 3d2aad3

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

cve_bin_tool/checkers/glibc.py

-11
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,5 @@ class GlibcChecker(Checker):
3434
VERSION_PATTERNS = [
3535
r"GNU C Library \([a-zA-Z0-9 \+\-\.]*\) (?:release|stable) release version ([012](\.[0-9]+){1,2})",
3636
r"GLIBC ([012](\.[0-9]+){1,2})[a-z0-9+\-]*\) \r?\n",
37-
r"libc-([012](\.[0-9]+){1,2})\.so", # patterns like this aren't ideal (check the end of the file)
38-
r"ld-([012]\.[0-9]+)\.so", # patterns like this aren't ideal
39-
r"libanl-([012](\.[0-9]+){1,2})\.so", # patterns like this aren't ideal
40-
r"ld-([012](\.[0-9]+){1,2})\.so", # patterns like this aren't ideal
4137
]
4238
VENDOR_PRODUCT = [("gnu", "glibc")]
43-
44-
45-
"""
46-
Using filenames (containing patterns like '.so' etc.) in the binaries as VERSION_PATTERNS aren't ideal.
47-
The reason behind this is that these might depend on who packages the file (like it
48-
might work on fedora but not on ubuntu)
49-
"""

0 commit comments

Comments
 (0)