From: Soumya Sambu Date: Thu, 14 Sep 2023 16:33:48 +0000 (+0000) Subject: go: Fix CVE-2023-39319 X-Git-Tag: 2022-04.13-kirkstone~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afdc322ecff4cfd8478c89a03f7fce748a132b48;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git go: Fix CVE-2023-39319 The html/template package does not apply the proper rules for handling occurrences of " contexts. This may cause the template parser to improperly consider script contexts to be terminated early, causing actions to be improperly escaped. This could be leveraged to perform an XSS attack. References: https://nvd.nist.gov/vuln/detail/CVE-2023-39319 Signed-off-by: Soumya Sambu Signed-off-by: Steve Sakoman --- diff --git a/meta/recipes-devtools/go/go-1.17.13.inc b/meta/recipes-devtools/go/go-1.17.13.inc index 91dd886cd01..c753a26a7ec 100644 --- a/meta/recipes-devtools/go/go-1.17.13.inc +++ b/meta/recipes-devtools/go/go-1.17.13.inc @@ -1,6 +1,6 @@ require go-common.inc -FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/go-1.21:${FILE_DIRNAME}/go-1.19:${FILE_DIRNAME}/go-1.18:" +FILESEXTRAPATHS:prepend := "${FILE_DIRNAME}/go-1.21:${FILE_DIRNAME}/go-1.20:${FILE_DIRNAME}/go-1.19:${FILE_DIRNAME}/go-1.18:" LIC_FILES_CHKSUM = "file://LICENSE;md5=5d4950ecb7b26d2c5e4e7b4e0dd74707" @@ -43,6 +43,7 @@ SRC_URI += "\ file://CVE-2023-24531_1.patch \ file://CVE-2023-24531_2.patch \ file://CVE-2023-29409.patch \ + file://CVE-2023-39319.patch \ " SRC_URI[main.sha256sum] = "a1a48b23afb206f95e7bbaa9b898d965f90826f6f1d1fc0c1d784ada0cd300fd" diff --git a/meta/recipes-devtools/go/go-1.20/CVE-2023-39319.patch b/meta/recipes-devtools/go/go-1.20/CVE-2023-39319.patch new file mode 100644 index 00000000000..1554aa975c2 --- /dev/null +++ b/meta/recipes-devtools/go/go-1.20/CVE-2023-39319.patch @@ -0,0 +1,254 @@ +From 2070531d2f53df88e312edace6c8dfc9686ab2f5 Mon Sep 17 00:00:00 2001 +From: Roland Shoemaker +Date: Thu Aug 3 12:28:28 2023 -0700 +Subject: [PATCH] html/template: properly handle special tags within the script + context + +The HTML specification has incredibly complex rules for how to handle +"