diff --git a/scripts/check-kernel-fix b/scripts/check-kernel-fix index cfa9577..538f908 100755 --- a/scripts/check-kernel-fix +++ b/scripts/check-kernel-fix @@ -48,6 +48,7 @@ usage() echo " ancestors." echo " -s CVSS: override the CVSS score if known. This can be useful when" echo " the CVE->CVSS DB is not synced yet." + echo " -b bsc#NUMBER: override the bugzilla number if known" } branch= @@ -278,6 +279,12 @@ find_and_print_toplevel_actions() fi fi + # EB branches do not really need to add missing references + if [[ "$branch" =~ .*-EB.* && "$state" = "missing_references" ]] + then + continue + fi + for merge_branch in $(print_merge_branches $branches_conf $branch) ; do # Make sure merge_branches are in the same cvss scope @@ -323,7 +330,7 @@ verbose_mode= quiet_mode= flat_mode=0 -while getopts "hvrqfs:" OPT +while getopts "hvrqfs:b:" OPT do case $OPT in h) @@ -344,6 +351,10 @@ do ;; s) cvss=$OPTARG + ;; + b) + bsc=$OPTARG + esac done @@ -370,13 +381,12 @@ fi print_upstream_sha_summary $sha cve=$(sha2cve $sha $refresh) -bsc= if [ -n "$cve" ] then - bsc=$(cve2bugzilla $cve $refresh) + [ -z "$bsc" ] && bsc=$(cve2bugzilla $cve $refresh) [ -z "$cvss" ] && cvss=$(cve2cvss $cve $refresh) - echo "Security fix for $cve $bsc with CVSS ${cvss:-unknown, re-check with -r or use -s score if the score is in bugzilla whiteboard}" - [ -z "$cvss" ] && exit 1 + echo "Security fix for $cve ${bsc:-bsc unknown} with CVSS ${cvss:-unknown}" + [ -z "$cvss" -o -z "$bsc" ] && fail "Incomplete references re-check with -r or use -s/-b to specify missing references" else # emulate no CVE fix as CVSS==0. This will typically happen # for upstream commit with Fixes: which we want to target to