Skip to content

Commit

Permalink
golang: update to v1.19.2
Browse files Browse the repository at this point in the history
Includes fixes for security vulnerabilities:
 * [CVE-2022-27664](GHSA-69cg-p879-7622) net/http: handle server errors after sending GOAWAY
 * [CVE-2022-32190](golang/go#54385) net/url: JoinPath does not strip relative path components in all circumstances
 * [CVE-2022-2879](golang/go#54853) archive/tar: unbounded memory consumption when reading headers
 * [CVE-2022-2880](golang/go#54663) net/http/httputil: ReverseProxy should not forward unparseable query parameters
 * [CVE-2022-41715](golang/go#55949) regexp/syntax: limit memory used by parsing regexps

Addresses the build failure:
* openwrt/packages#19613

Signed-off-by: Stanislav Petrashov <s@petrashov.ru>
(cherry picked from commit 0ad7a2f)
  • Loading branch information
wormi4ok authored and Lienol committed Mar 10, 2023
1 parent 5834ef0 commit c0a32ad
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
16 changes: 11 additions & 5 deletions lang/golang/golang/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

include $(TOPDIR)/rules.mk

GO_VERSION_MAJOR_MINOR:=1.18
GO_VERSION_PATCH:=10
GO_VERSION_MAJOR_MINOR:=1.19
GO_VERSION_PATCH:=2

PKG_NAME:=golang
PKG_VERSION:=$(GO_VERSION_MAJOR_MINOR)$(if $(GO_VERSION_PATCH),.$(GO_VERSION_PATCH))
Expand All @@ -20,7 +20,7 @@ GO_SOURCE_URLS:=https://dl.google.com/go/ \

PKG_SOURCE:=go$(PKG_VERSION).src.tar.gz
PKG_SOURCE_URL:=$(GO_SOURCE_URLS)
PKG_HASH:=9cedcca58845df0c9474ae00274c44a95c9dfaefb132fc59921c28c7c106f8e6
PKG_HASH:=2ce930d70a931de660fdaf271d70192793b1b240272645bf0275779f6704df6b

PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>
PKG_LICENSE:=BSD-3-Clause
Expand Down Expand Up @@ -202,17 +202,20 @@ endif
$(eval $(call GoCompiler/AddProfile,Host,$(HOST_BUILD_DIR),$(HOST_GO_PREFIX),$(HOST_GO_VERSION_ID),$(GO_HOST_OS_ARCH),$(HOST_GO_INSTALL_SUFFIX)))

HOST_GO_VARS= \
GOHOSTARCH="$(GO_HOST_ARCH)" \
GOCACHE="$(GO_BUILD_CACHE_DIR)" \
GOENV=off \
CC="$(HOSTCC_NOCACHE)" \
CXX="$(HOSTCXX_NOCACHE)"

define Host/Compile
define Host/Configure
$(call GoCompiler/Bootstrap/CheckHost,$(BOOTSTRAP_GO_VALID_OS_ARCH))
$(call GoCompiler/Host/CheckHost,$(HOST_GO_VALID_OS_ARCH))

mkdir -p "$(GO_BUILD_CACHE_DIR)"
endef

define Host/Compile
$(call GoCompiler/Bootstrap/Make, \
$(HOST_GO_VARS) \
)
Expand Down Expand Up @@ -271,6 +274,7 @@ PKG_GO_ZBOOTSTRAP_MODS:= \
PKG_GO_ZBOOTSTRAP_PATH:=$(PKG_BUILD_DIR)/src/internal/buildcfg/zbootstrap.go
PKG_GO_VARS= \
GOHOSTARCH="$(GO_HOST_ARCH)" \
GOCACHE="$(GO_BUILD_CACHE_DIR)" \
GOENV=off \
GO_GCC_HELPER_PATH="$$$$PATH" \
Expand Down Expand Up @@ -300,9 +304,11 @@ PKG_GO_INSTALL_ARGS= \
$(if $(PKG_GO_ASMFLAGS),-asmflags "all=$(PKG_GO_ASMFLAGS)") \
$(if $(filter $(GO_PKG_ENABLE_PIE),1),-buildmode pie)
define Build/Compile
define Build/Configure
mkdir -p "$(GO_BUILD_CACHE_DIR)"
endef
define Build/Compile
@echo "Building target Go first stage"
$(call GoCompiler/Package/Make, \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Fixes #22040.

--- a/src/cmd/link/internal/ld/lib.go
+++ b/src/cmd/link/internal/ld/lib.go
@@ -1392,25 +1392,20 @@ func (ctxt *Link) hostlink() {
@@ -1502,25 +1502,20 @@ func (ctxt *Link) hostlink() {
}

if ctxt.Arch.InFamily(sys.ARM, sys.ARM64) && buildcfg.GOOS == "linux" {
Expand Down

0 comments on commit c0a32ad

Please sign in to comment.