Skip to content

Commit

Permalink
fix: fix glibc patterns
Browse files Browse the repository at this point in the history
Drop wrong patterns to avoid the following false positive with a
METADATA python file containing the following line:

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),

Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
  • Loading branch information
ffontaine committed Sep 12, 2024
1 parent 58d8e25 commit 101baa0
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions cve_bin_tool/checkers/glibc.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,5 @@ class GlibcChecker(Checker):
VERSION_PATTERNS = [
r"GNU C Library \([a-zA-Z0-9 \+\-\.]*\) (?:release|stable) release version ([012](\.[0-9]+){1,2})",
r"GLIBC ([012](\.[0-9]+){1,2})[a-z0-9+\-]*\) \r?\n",
r"libc-([012](\.[0-9]+){1,2})\.so", # patterns like this aren't ideal (check the end of the file)
r"ld-([012]\.[0-9]+)\.so", # patterns like this aren't ideal
r"libanl-([012](\.[0-9]+){1,2})\.so", # patterns like this aren't ideal
r"ld-([012](\.[0-9]+){1,2})\.so", # patterns like this aren't ideal
]
VENDOR_PRODUCT = [("gnu", "glibc")]


"""
Using filenames (containing patterns like '.so' etc.) in the binaries as VERSION_PATTERNS aren't ideal.
The reason behind this is that these might depend on who packages the file (like it
might work on fedora but not on ubuntu)
"""

0 comments on commit 101baa0

Please sign in to comment.