Skip to content

Commit

Permalink
fix: update glibc pattern
Browse files Browse the repository at this point in the history
Update glibc pattern to avoid the following false positive raised in
libgnome-shell.so by "the new format specifier introduced in glibc 2.27"

Signed-off-by: Fabrice Fontaine <[email protected]>
  • Loading branch information
ffontaine committed Dec 16, 2023
1 parent 098a96f commit 102d3b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cve_bin_tool/checkers/glibc.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class GlibcChecker(Checker):
r"ld-([012](\.[0-9]+){1,2})\.so",
]
VERSION_PATTERNS = [
r"GNU C Library \(GNU libc\) stable release version ([012](\.[0-9]+){1,2})",
r"(?:glibc|GLIBC) ([012](\.[0-9]+){1,2})",
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
Expand Down
2 changes: 0 additions & 2 deletions test/test_data/gnomeshell.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@
"package_name": "gnome-shell_3.38.4-1ubuntu2_amd64.deb",
"product": "gnome-shell",
"version": "3.38.4",
"other_products": ["glibc"],
},
{
"url": "https://download-ib01.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/Packages/g/",
"package_name": "gnome-shell-40.2-1.fc35.x86_64.rpm",
"product": "gnome-shell",
"version": "40.2",
"other_products": ["glibc"],
},
]

0 comments on commit 102d3b5

Please sign in to comment.