Skip to content

Commit

Permalink
Merge pull request #65 from exploide/cve-false-positives
Browse files Browse the repository at this point in the history
CVE false positives fix
  • Loading branch information
diego-treitos authored May 27, 2022
2 parents 9e07dbe + 91499b5 commit bf6f985
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
Empty file modified cve/cve-2021-3156.sh
100644 → 100755
Empty file.
6 changes: 6 additions & 0 deletions cve/cve-2021-4034.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ lse_cve_test() { #(
35)
package_fixed="0.120-1.fc35.1"
;;
36)
package_fixed="0.120-3.fc36"
;;
*)
[ $((distro_release)) -gt 36 ] && exit 1
;;
esac
;;
#TODO: Add RedHat and other distros, although their info about patches is very poor
Expand Down
19 changes: 9 additions & 10 deletions cve/cve-2022-0847.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,15 @@ lse_cve_test() { #(
v3=$(echo "$kernel" | cut -d '.' -f3)
v1=${v1:-0};v2=${v2:-0};v3=${v3:-0};

if [ "$v1" = 5 ]; then
if [ $((v2)) -lt 8 ] ||
{ [ "$v2" = 10 ] && [ $((v3)) -ge 102 ]; } ||
{ [ "$v2" = 15 ] && [ $((v3)) -ge 25 ]; } ||
{ [ "$v2" = 16 ] && [ $((v3)) -ge 11 ]; } ||
[ $((v2)) -gt 16 ]
then
# Not vulnerable
exit 1
fi
if [ "$v1" != 5 ] ||
[ $((v2)) -lt 8 ] ||
{ [ "$v2" = 10 ] && [ $((v3)) -ge 102 ]; } ||
{ [ "$v2" = 15 ] && [ $((v3)) -ge 25 ]; } ||
{ [ "$v2" = 16 ] && [ $((v3)) -ge 11 ]; } ||
[ $((v2)) -gt 16 ]
then
# Not vulnerable
exit 1
fi

case "$lse_distro_codename" in
Expand Down

0 comments on commit bf6f985

Please sign in to comment.