From bd1e930ce1a66272f81494e439a356c31e38147b Mon Sep 17 00:00:00 2001 From: misaka00251 Date: Mon, 21 Jul 2025 11:41:03 +0800 Subject: [PATCH] Backport missing part of Patch1001 for riscv64 --- ...t-pcrel-itype-in-fips140-for-riscv64.patch | 32 +++++++++++++++++++ golang.spec | 7 +++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 1005-cmd-internal-obj-enable-got-pcrel-itype-in-fips140-for-riscv64.patch diff --git a/1005-cmd-internal-obj-enable-got-pcrel-itype-in-fips140-for-riscv64.patch b/1005-cmd-internal-obj-enable-got-pcrel-itype-in-fips140-for-riscv64.patch new file mode 100644 index 0000000..0d9a39d --- /dev/null +++ b/1005-cmd-internal-obj-enable-got-pcrel-itype-in-fips140-for-riscv64.patch @@ -0,0 +1,32 @@ +From 2363897932cfb279dd8810d2c92438f7ddcfd951 Mon Sep 17 00:00:00 2001 +From: Meng Zhuo +Date: Fri, 18 Jul 2025 11:06:24 +0800 +Subject: [PATCH] cmd/internal/obj: enable got pcrel itype in fips140 for + riscv64 + +This CL enable R_RISCV_GOT_PCREL_ITYPE in fips140 +Fixes #74662 + +Change-Id: Ic189c4e352517ae74034f207a5f944b610f2eb73 +Reviewed-on: https://go-review.googlesource.com/c/go/+/688635 +Reviewed-by: Mark Ryan +Reviewed-by: Cherry Mui +LUCI-TryBot-Result: Go LUCI +Reviewed-by: Carlos Amedee +Reviewed-by: Julian Zhu +--- + src/cmd/internal/obj/fips140.go | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/cmd/internal/obj/fips140.go b/src/cmd/internal/obj/fips140.go +index eb6ffff009a349..ea36849a21d96d 100644 +--- a/src/cmd/internal/obj/fips140.go ++++ b/src/cmd/internal/obj/fips140.go +@@ -384,6 +384,7 @@ func (s *LSym) checkFIPSReloc(ctxt *Link, rel Reloc) { + objabi.R_RISCV_TLS_IE, + objabi.R_RISCV_TLS_LE, + objabi.R_RISCV_GOT_HI20, ++ objabi.R_RISCV_GOT_PCREL_ITYPE, + objabi.R_RISCV_PCREL_HI20, + objabi.R_RISCV_PCREL_LO12_I, + objabi.R_RISCV_PCREL_LO12_S, diff --git a/golang.spec b/golang.spec index 529141f..c2cd9d1 100644 --- a/golang.spec +++ b/golang.spec @@ -68,7 +68,7 @@ Name: golang Version: 1.24.2 -Release: 34 +Release: 35 Summary: The Go Programming Language License: BSD and Public Domain URL: https://golang.org/ @@ -130,6 +130,8 @@ Patch1001: 1001-cmd-link-cmd-internal-add-R_GOT_PCREL_ITYPE_RELOC-fo.patch Patch1002: 1002-cmd-compile-don-t-merge-symbols-on-riscv64-when-dyna.patch Patch1003: 1003-CVE-2025-22874-crypto-x509-decouple-key-usage-and-po.patch Patch1004: 1004-CVE-2025-4673-net-http-strip-sensitive-proxy-headers.patch +# Missing part of Patch1001 +Patch1005: 1005-cmd-internal-obj-enable-got-pcrel-itype-in-fips140-for-riscv64.patch Patch9001: 0001-fix-asan_test-test-case-failure.patch @@ -370,6 +372,9 @@ fi %files devel -f go-tests.list -f go-misc.list -f go-src.list %changelog +* Mon Jul 21 2025 misaka00251 - 1.24.2-35 +- Backport missing part of Patch1001 for riscv64 + * Fri Jun 20 2025 wujichao - 1.24.2-34 - Type:CVE - CVE:CVE-2025-22874,CVE-2025-4673 -- Gitee