From 48d9b9daaae48bfa502acf95db167d0b03ee3e45 Mon Sep 17 00:00:00 2001 From: Tad Date: Mon, 5 Feb 2018 19:21:44 -0500 Subject: [PATCH] Update CVE patchers and add a helper patch function --- Patches/Linux | 2 +- .../CVE_Patchers/android_kernel_asus_msm8916.sh | 3 ++- .../CVE_Patchers/android_kernel_google_marlin.sh | 5 ++++- .../CVE_Patchers/android_kernel_htc_msm8994.sh | 3 ++- .../CVE_Patchers/android_kernel_huawei_angler.sh | 3 ++- .../CVE_Patchers/android_kernel_lge_bullhead.sh | 3 ++- .../CVE_Patchers/android_kernel_lge_msm8992.sh | 3 ++- .../CVE_Patchers/android_kernel_moto_shamu.sh | 3 ++- .../CVE_Patchers/android_kernel_motorola_msm8992.sh | 3 ++- .../CVE_Patchers/android_kernel_nextbit_msm8992.sh | 3 ++- Scripts/LineageOS-14.1/Functions.sh | 10 ++++++++++ 11 files changed, 31 insertions(+), 10 deletions(-) diff --git a/Patches/Linux b/Patches/Linux index 9ed7eb85..b6651d01 160000 --- a/Patches/Linux +++ b/Patches/Linux @@ -1 +1 @@ -Subproject commit 9ed7eb85d4646d0cf2e72e3004ef7f400d15231e +Subproject commit b6651d01e9b675d20459be5f1e134f8837db6d80 diff --git a/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_asus_msm8916.sh b/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_asus_msm8916.sh index 96463e65..d799edda 100644 --- a/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_asus_msm8916.sh +++ b/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_asus_msm8916.sh @@ -58,9 +58,10 @@ git apply $cvePatchesLinux/CVE-2017-5972/ANY/0002.patch git apply $cvePatchesLinux/CVE-2017-7533/3.10/0002.patch git apply $cvePatchesLinux/CVE-2017-8281/3.10/0001.patch git apply $cvePatchesLinux/CVE-2017-8281/3.10/0003.patch +git apply $cvePatchesLinux/CVE-2017-9723/ANY/0001.patch git apply $cvePatchesLinux/LVT-2017-0003/3.10/0001.patch git apply $cvePatchesLinux/CVE-2016-6693/ANY/0001.patch git apply $cvePatchesLinux/CVE-2016-6696/ANY/0001.patch git apply $cvePatchesLinux/CVE-2017-0750/ANY/0001.patch -editKernelLocalversion "-dos.p62" +editKernelLocalversion "-dos.p63" cd $base diff --git a/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_google_marlin.sh b/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_google_marlin.sh index c388d62b..918444a1 100644 --- a/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_google_marlin.sh +++ b/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_google_marlin.sh @@ -127,6 +127,9 @@ git apply $cvePatchesLinux/CVE-2017-13218/3.18/0006.patch git apply $cvePatchesLinux/CVE-2017-13218/3.18/0011.patch git apply $cvePatchesLinux/CVE-2017-13219/ANY/0001.patch git apply $cvePatchesLinux/CVE-2017-14873/3.18/0001.patch +git apply $cvePatchesLinux/CVE-2017-14877/3.18/0002.patch +git apply $cvePatchesLinux/CVE-2017-14891/ANY/0001.patch +git apply $cvePatchesLinux/CVE-2017-14892/ANY/0001.patch git apply $cvePatchesLinux/CVE-2017-14897/3.18/0002.patch git apply $cvePatchesLinux/CVE-2017-15265/^4.14/0001.patch git apply $cvePatchesLinux/CVE-2017-15847/ANY/0001.patch @@ -195,5 +198,5 @@ git apply $cvePatchesLinux/CVE-2016-6696/ANY/0001.patch git apply $cvePatchesLinux/CVE-2017-0610/ANY/0001.patch git apply $cvePatchesLinux/CVE-2017-0750/ANY/0001.patch git apply $cvePatchesLinux/CVE-2017-15845/ANY/0001.patch -editKernelLocalversion "-dos.p195" +editKernelLocalversion "-dos.p198" cd $base diff --git a/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_htc_msm8994.sh b/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_htc_msm8994.sh index 0c46a98d..192255b1 100644 --- a/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_htc_msm8994.sh +++ b/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_htc_msm8994.sh @@ -101,10 +101,11 @@ git apply $cvePatchesLinux/CVE-2017-8243/3.10/0001.patch git apply $cvePatchesLinux/CVE-2017-8281/3.10/0001.patch git apply $cvePatchesLinux/CVE-2017-8281/3.10/0003.patch git apply $cvePatchesLinux/CVE-2017-9242/^4.11/0001.patch +git apply $cvePatchesLinux/CVE-2017-9723/ANY/0001.patch git apply $cvePatchesLinux/LVT-2017-0003/3.10/0001.patch git apply $cvePatchesLinux/Untracked/ANY/0008-nfsd-check-for-oversized-NFSv2-v3-arguments.patch git apply $cvePatchesLinux/CVE-2016-6693/ANY/0001.patch git apply $cvePatchesLinux/CVE-2016-6696/ANY/0001.patch git apply $cvePatchesLinux/CVE-2017-0750/ANY/0001.patch -editKernelLocalversion "-dos.p106" +editKernelLocalversion "-dos.p107" cd $base diff --git a/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_huawei_angler.sh b/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_huawei_angler.sh index cc72656d..ba434f87 100644 --- a/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_huawei_angler.sh +++ b/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_huawei_angler.sh @@ -100,6 +100,7 @@ git apply $cvePatchesLinux/CVE-2017-13218/3.10/0001.patch git apply $cvePatchesLinux/CVE-2017-13218/3.10/0002.patch git apply $cvePatchesLinux/CVE-2017-13218/3.10/0003.patch git apply $cvePatchesLinux/CVE-2017-13218/3.10/0004.patch +git apply $cvePatchesLinux/CVE-2017-14877/3.10/0001.patch git apply $cvePatchesLinux/CVE-2017-14897/3.10/0001.patch git apply $cvePatchesLinux/CVE-2017-15265/^4.14/0001.patch git apply $cvePatchesLinux/CVE-2017-15850/ANY/0001.patch @@ -145,5 +146,5 @@ git apply $cvePatchesLinux/CVE-2016-2475/ANY/0001.patch git apply $cvePatchesLinux/CVE-2016-6693/ANY/0001.patch git apply $cvePatchesLinux/CVE-2016-6696/ANY/0001.patch git apply $cvePatchesLinux/CVE-2017-15845/ANY/0001.patch -editKernelLocalversion "-dos.p145" +editKernelLocalversion "-dos.p146" cd $base diff --git a/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_lge_bullhead.sh b/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_lge_bullhead.sh index e2da417f..385d40e9 100644 --- a/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_lge_bullhead.sh +++ b/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_lge_bullhead.sh @@ -93,6 +93,7 @@ git apply $cvePatchesLinux/CVE-2017-13218/3.10/0001.patch git apply $cvePatchesLinux/CVE-2017-13218/3.10/0002.patch git apply $cvePatchesLinux/CVE-2017-13218/3.10/0003.patch git apply $cvePatchesLinux/CVE-2017-13218/3.10/0004.patch +git apply $cvePatchesLinux/CVE-2017-14877/3.10/0001.patch git apply $cvePatchesLinux/CVE-2017-14897/3.10/0001.patch git apply $cvePatchesLinux/CVE-2017-14903/3.10/0001.patch git apply $cvePatchesLinux/CVE-2017-15265/^4.14/0001.patch @@ -136,5 +137,5 @@ git apply $cvePatchesLinux/LVT-2017-0003/3.10/0001.patch git apply $cvePatchesLinux/Untracked/ANY/0008-nfsd-check-for-oversized-NFSv2-v3-arguments.patch git apply $cvePatchesLinux/CVE-2016-6693/ANY/0001.patch git apply $cvePatchesLinux/CVE-2016-6696/ANY/0001.patch -editKernelLocalversion "-dos.p136" +editKernelLocalversion "-dos.p137" cd $base diff --git a/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_lge_msm8992.sh b/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_lge_msm8992.sh index 03ba4333..b5e543a2 100644 --- a/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_lge_msm8992.sh +++ b/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_lge_msm8992.sh @@ -96,6 +96,7 @@ git apply $cvePatchesLinux/CVE-2017-13218/3.10/0001.patch git apply $cvePatchesLinux/CVE-2017-13218/3.10/0002.patch git apply $cvePatchesLinux/CVE-2017-13218/3.10/0003.patch git apply $cvePatchesLinux/CVE-2017-13218/3.10/0004.patch +git apply $cvePatchesLinux/CVE-2017-14877/3.10/0001.patch git apply $cvePatchesLinux/CVE-2017-14897/3.10/0001.patch git apply $cvePatchesLinux/CVE-2017-15265/^4.14/0001.patch git apply $cvePatchesLinux/CVE-2017-15850/ANY/0001.patch @@ -161,5 +162,5 @@ git apply $cvePatchesLinux/CVE-2016-6693/ANY/0001.patch git apply $cvePatchesLinux/CVE-2016-6696/ANY/0001.patch git apply $cvePatchesLinux/CVE-2017-15845/ANY/0001.patch git apply $cvePatchesLinux/CVE-2017-8281/3.10/0003.patch -editKernelLocalversion "-dos.p161" +editKernelLocalversion "-dos.p162" cd $base diff --git a/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_moto_shamu.sh b/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_moto_shamu.sh index 07bd9bce..1f1cbaea 100644 --- a/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_moto_shamu.sh +++ b/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_moto_shamu.sh @@ -73,6 +73,7 @@ git apply $cvePatchesLinux/CVE-2017-11600/3.10/0001.patch git apply $cvePatchesLinux/CVE-2017-12153/3.2-^3.16/0001.patch git apply $cvePatchesLinux/CVE-2017-13215/ANY/0001.patch git apply $cvePatchesLinux/CVE-2017-13216/3.10/0001.patch +git apply $cvePatchesLinux/CVE-2017-14877/3.10/0001.patch git apply $cvePatchesLinux/CVE-2017-16526/^4.13/0001.patch git apply $cvePatchesLinux/CVE-2017-16531/^4.13/0001.patch git apply $cvePatchesLinux/CVE-2017-16532/^4.13/0001.patch @@ -103,5 +104,5 @@ git apply $cvePatchesLinux/CVE-2017-9242/^4.11/0001.patch git apply $cvePatchesLinux/Untracked/ANY/0008-nfsd-check-for-oversized-NFSv2-v3-arguments.patch git apply $cvePatchesLinux/CVE-2016-2475/ANY/0001.patch git apply $cvePatchesLinux/CVE-2017-0750/ANY/0001.patch -editKernelLocalversion "-dos.p103" +editKernelLocalversion "-dos.p104" cd $base diff --git a/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_motorola_msm8992.sh b/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_motorola_msm8992.sh index f3f87aed..26fccc2e 100644 --- a/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_motorola_msm8992.sh +++ b/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_motorola_msm8992.sh @@ -116,6 +116,7 @@ git apply $cvePatchesLinux/CVE-2017-13218/3.10/0001.patch git apply $cvePatchesLinux/CVE-2017-13218/3.10/0002.patch git apply $cvePatchesLinux/CVE-2017-13218/3.10/0003.patch git apply $cvePatchesLinux/CVE-2017-13218/3.10/0004.patch +git apply $cvePatchesLinux/CVE-2017-14877/3.10/0001.patch git apply $cvePatchesLinux/CVE-2017-15265/^4.14/0001.patch git apply $cvePatchesLinux/CVE-2017-15850/ANY/0001.patch git apply $cvePatchesLinux/CVE-2017-15868/3.10/0001.patch @@ -186,5 +187,5 @@ git apply $cvePatchesLinux/CVE-2016-6696/ANY/0001.patch git apply $cvePatchesLinux/CVE-2017-0750/ANY/0001.patch git apply $cvePatchesLinux/CVE-2017-15845/ANY/0001.patch git apply $cvePatchesLinux/CVE-2017-8281/3.10/0003.patch -editKernelLocalversion "-dos.p186" +editKernelLocalversion "-dos.p187" cd $base diff --git a/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_nextbit_msm8992.sh b/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_nextbit_msm8992.sh index bf0ce7dc..4c9d03a0 100644 --- a/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_nextbit_msm8992.sh +++ b/Scripts/LineageOS-14.1/CVE_Patchers/android_kernel_nextbit_msm8992.sh @@ -55,9 +55,10 @@ git apply $cvePatchesLinux/CVE-2017-7533/3.10/0002.patch git apply $cvePatchesLinux/CVE-2017-8243/3.10/0001.patch git apply $cvePatchesLinux/CVE-2017-8281/3.10/0001.patch git apply $cvePatchesLinux/CVE-2017-8281/3.10/0003.patch +git apply $cvePatchesLinux/CVE-2017-9723/ANY/0001.patch git apply $cvePatchesLinux/LVT-2017-0003/3.10/0001.patch git apply $cvePatchesLinux/CVE-2016-6693/ANY/0001.patch git apply $cvePatchesLinux/CVE-2016-6696/ANY/0001.patch git apply $cvePatchesLinux/CVE-2017-0750/ANY/0001.patch -editKernelLocalversion "-dos.p59" +editKernelLocalversion "-dos.p60" cd $base diff --git a/Scripts/LineageOS-14.1/Functions.sh b/Scripts/LineageOS-14.1/Functions.sh index a0a4b4c0..9819a349 100644 --- a/Scripts/LineageOS-14.1/Functions.sh +++ b/Scripts/LineageOS-14.1/Functions.sh @@ -15,6 +15,16 @@ #You should have received a copy of the GNU General Public License #along with this program. If not, see . +startPatcher() { + java -jar $cvePatcher patch $base $androidWorkspace"Patches/" $cveScripts $1; +} +export -f startPatcher; + +patchAllKernels() { + startPatcher "kernel_amazon_hdx-common kernel_asus_msm8916 kernel_fairphone_msm8974 kernel_google_marlin kernel_google_msm kernel_htc_flounder kernel_htc_msm8974 kernel_htc_msm8994 kernel_huawei_angler kernel_lge_bullhead kernel_lge_g3 kernel_lge_hammerhead kernel_lge_mako kernel_lge_msm8974 kernel_lge_msm8992 kernel_lge_msm8996 kernel_motorola_msm8916 kernel_motorola_msm8992 kernel_moto_shamu kernel_nextbit_msm8992 kernel_oneplus_msm8974 kernel_samsung_jf kernel_samsung_msm8974 kernel_samsung_smdk4412 kernel_samsung_universal8890"; +} +export -f patchAllKernels; + enter() { echo "================================================================================================" dir=$1;