From ee80f8d97ab3258018e3f85f8849aaccd788168e Mon Sep 17 00:00:00 2001 From: lu|ka <79413747+lu-ka@users.noreply.github.com> Date: Tue, 8 Mar 2022 10:32:25 +0100 Subject: [PATCH] Added check for CVE-2022-0847 See https://dirtypipe.cm4all.com/ --- linPEAS/builder/linpeas_parts/1_system_information.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/linPEAS/builder/linpeas_parts/1_system_information.sh b/linPEAS/builder/linpeas_parts/1_system_information.sh index 86c053c..2e5691a 100644 --- a/linPEAS/builder/linpeas_parts/1_system_information.sh +++ b/linPEAS/builder/linpeas_parts/1_system_information.sh @@ -34,6 +34,15 @@ if [[ "$(apt list --installed 2>/dev/null | grep polkit | grep -c 0.105-26)" -ge echo "" fi +#-- SY) CVE-2022-0847 +#-- https://dirtypipe.cm4all.com/ +#-- https://stackoverflow.com/a/37939589 +kernelversion=$(uname -r | awk -F"-" '{print $1}') +if [[ $(echo $kernelversion | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }';) -lt $(echo "5.17" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }';) ]]; then + echo "Vulnerable to CVE-2022-0847" | sed -${E} "s,.*,${SED_RED_YELLOW}," + echo "" +fi + #--SY) USBCreator if (busctl list 2>/dev/null | grep -q com.ubuntu.USBCreator) || [ "$DEBUG" ]; then print_2title "USBCreator"