aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-02-12 19:35:07 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-02-12 19:35:07 +0100
commit28742e2d005443ff7fa9d405301f8208d6fa8a67 (patch)
tree192131b89b844537aad9cdc59db5c3d6dd421885
parent4ec2d279d8b19c4442a74b17cdd9925150426e3c (diff)
downloadvulns-28742e2d005443ff7fa9d405301f8208d6fa8a67.tar.gz
bippy: fix up issue when vuln/fix is in same release
Also drop the From: line in the mbox Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rwxr-xr-xscripts/bippy15
1 files changed, 13 insertions, 2 deletions
diff --git a/scripts/bippy b/scripts/bippy
index 8e45bd7f..0e8e3772 100755
--- a/scripts/bippy
+++ b/scripts/bippy
@@ -174,10 +174,12 @@ function version_match
local MINOR_1=${REL_ARRAY_1[1]}
local MINOR_2=${REL_ARRAY_2[1]}
if [[ "${MINOR_1}" == "${MINOR_2}" ]] ; then
+ # dbg "version_match: ${1} ${2}: succeeded"
return 1
fi
fi
+ # dbg "version_match: ${1} ${2}: failed"
return 0
}
@@ -394,7 +396,9 @@ if [[ "${fixes_lines}" != "" ]] ; then
# Ick, no fixes version was found to be a mainline release, so
# we must have a stable-tree-only regression, so pick the
# "first" version as it must be the one.
- og_vuln=${vuln_kernels[0]}
+ if [[ "${og_vuln}" == "0" ]] ; then
+ og_vuln=${vuln_kernels[0]}
+ fi
fi
dbg "og_vuln=${og_vuln}"
fi
@@ -457,6 +461,7 @@ for fixed_entry in ${fixed_kernels[@]}; do
if [[ "${fixed_entry}" == "${vuln_entry}" ]] ; then
# this entry was broken and fixed in the same version,
# so skip it
+ create=1 # fake that an entry was created.
break
fi
@@ -483,6 +488,11 @@ for fixed_entry in ${fixed_kernels[@]}; do
fi
done
+dbg "We have found ${#fixed_pairs[@]} vulnerable:fixed kernel pairs"
+if [[ "${#fixed_pairs[@]}" == "0" ]] ; then
+ echo "No vulnerable and then fixed pairs of kernels were found for commit ${GIT_SHA_FULL}"
+ exit 1
+fi
for entry in ${fixed_pairs[@]}; do
dbg "${entry}"
done
@@ -618,7 +628,8 @@ fi # end json creation
#########################
if [[ "${MBOX_FILE}" != "" ]] ; then
cat << EOF > "${MBOX_FILE}"
-From: Linux Kernel CVE team <cve@kernel.org>
+To: <linux-cve-announce@vger.kernel.org>
+Reply-to: <cve@kernel.org>
Subject: ${CVE_NUMBER}: ${subject}
Description