Commit Graph

65 Commits

Author SHA1 Message Date
Jeffery To 901f80aae7
golang: Update to 1.17.3
Contains fixes for:

* CVE-2021-41771: ImportedSymbols in debug/macho (for Open or OpenFat)
  accesses a memory location after the end of a buffer

* CVE-2021-41772: archive/zip Reader.Open panic via a crafted ZIP
  archive containing an invalid name or an empty filename field

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2021-11-19 03:40:17 +08:00
Jeffery To 7d3f28f970 golang: Update to 1.17.2
Includes fix for CVE-2021-38297 (passing very large arguments to WASM
module functions can cause portions of the module to be overwritten).

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2021-10-10 18:27:37 -07:00
Jeffery To aa96b8408f
golang: Update to 1.17.1
Includes fix for CVE-2021-39293 (archive/zip: overflow in preallocation
check can cause OOM panic).

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2021-09-13 05:24:58 +08:00
Jeffery To d0aab6b8bc
golang: Update to 1.17
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2021-08-23 00:37:25 +08:00
Jeffery To 4d7a71a7cb
golang: Update to 1.16.7
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2021-08-09 17:51:43 +08:00
Jeffery To c0c62227bd
golang: Update to 1.16.6
Includes fix for CVE-2021-34558 (crypto/tls: clients can panic when
provided a certificate of the wrong type for the negotiated parameters).

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2021-07-19 06:44:52 +08:00
Jeffery To fe3c49fe07
golang: Update to 1.16.5
1.16.1 included fixes for:

* CVE-2021-27918 - encoding/xml: infinite loop when using
  xml.NewTokenDecoder with a custom TokenReader
* CVE-2021-27919 - archive/zip: can panic when calling Reader.Open

1.16.4 included fixes for:

* CVE-2021-31525 - net/http: ReadRequest can stack overflow due to
  recursion with very large headers

1.16.5 includes fixes for:

* CVE-2021-33195 - net: Lookup functions may return invalid host names
* CVE-2021-33196 - archive/zip: malformed archive may cause panic or
  memory exhaustion
* CVE-2021-33197 - net/http/httputil: ReverseProxy forwards Connection
  headers if first one is empty

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2021-06-11 16:26:56 +08:00
Jeffery To dc587eccb7
golang: Update to 1.16
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2021-02-22 17:01:56 +08:00
Jeffery To ded955be9b
golang: Update to 1.15.8
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2021-02-08 02:40:18 +08:00
Jeffery To c0fb05d670
golang: Update to 1.15.7
This includes fixes for:
* CVE-2021-3114: crypto/elliptic: incorrect operations on the P-224
  curve
* CVE-2021-3115: cmd/go: packages using cgo can cause arbitrary code
  execution on Windows

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2021-01-25 17:22:25 +08:00
Jeffery To b1db2761b2
golang: Update to 1.15.6
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-12-07 05:30:32 +08:00
Jeffery To bd38850609 golang: Update to 1.15.5
This includes security fixes for:
* CVE-2020-28362: panic during recursive division of very large numbers
* CVE-2020-28366: arbitrary code can be injected into cgo generated
  files
* CVE-2020-28367: improper validation of cgo flags can lead to remote
  code execution at build time

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-11-15 21:43:07 +02:00
Jeffery To 4404e0716e
golang: Update to 1.15.4
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-11-09 17:53:43 +08:00
Jeffery To d276c81ea8
golang: Update to 1.15.3
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-10-20 07:01:44 +08:00
Jeffery To d5dc30fe80
golang: Add option to enable Spectre mitigations
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-10-06 16:34:41 +08:00
Jeffery To 4773c288cd
golang: Quote variables passed to the shell
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-10-06 16:34:40 +08:00
Jeffery To a95afd67df
golang: Use external linking for target Go
In Go 1.15, the linker now defaults to internal linking mode for
-buildmode=pie on amd64 and arm64[1], however this results in go tool
binaries with the wrong dynamic linker/interpreter.

External linking is still used when PIE is enabled for other platforms,
whereas internal linking is used when PIE is not enabled.

This changes target Go to always use external linking, to fix PIE
binaries for amd64/arm64 and for consistency.

[1]: https://golang.org/doc/go1.15#linker

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-10-06 16:28:08 +08:00
Jeffery To 93ee27edb8
golang: Simplify target compile
* Reuse GO_PKG_ENABLE_PIE from golang-package.mk
* Replace $(if ...) with $(or ...) to get default values
* Refactor vars common to each compile stage into variable

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-10-06 16:28:08 +08:00
Jeffery To 03a1f87549
golang: Use GO_LDFLAGS to set buildmode=pie for host Go
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-10-06 16:28:07 +08:00
Jeffery To 66eabf18f5
golang: Refactor vars common to each host compile stage into variable
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-10-06 16:28:07 +08:00
Jeffery To 4fb4ec963f
golang: Simplify bootstrap stage
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-10-06 16:28:07 +08:00
Jeffery To 40bff64ad3
golang: Group variables by stage (bootstrap/host/target)
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-10-06 16:28:06 +08:00
Jeffery To 9074dbd917
golang: Share build cache across package builds
This also adds a config option GOLANG_BUILD_CACHE_DIR to customize the
location of the build cache directory.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-10-06 16:28:06 +08:00
Jeffery To 4674564e42
golang: Move config option into separate file
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-10-05 00:25:28 +08:00
Jeffery To fc7cf379e3
golang: Update to 1.15.2
1.15.1 includes a fix for CVE-2020-24553:
net/http/cgi,net/http/fcgi: Cross-Site Scripting (XSS) when Content-Type
is not specified

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-10-05 00:25:18 +08:00
Jeffery To 8433270034
golang: Update to 1.14.7
This includes a fix for CVE-2020-16845 (encoding/binary: ReadUvarint and
ReadVarint can read an unlimited number of bytes from invalid inputs).

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-08-12 04:38:38 +08:00
Jeffery To adb43f7643
golang: Update to 1.14.6
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-07-20 03:10:57 +08:00
Jeffery To 4ea95b49a2
golang: Update to 1.14.4
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-06-08 16:06:53 +08:00
Jeffery To 2b8f9b7349 golang: Update to 1.14.3
This also removes a (useless) test for PKG_GO_ZBOOTSTRAP_MODS (it is
always non-empty).

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-05-17 03:37:45 +08:00
Jeffery To da3fb97b9c golang: Set/reset default platform options for target Go compiler
Because the first stage for building target Go is actually a host build,
the default platform options (GO386, GOARM, etc.) are detected from the
host. These values are written to a source file and kept when building
the second stage.

This modifies this source file to set the appropriate values for the
target platform, and reset values for other platforms to their
cross-compiling / most compatible defaults.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-05-14 17:45:18 +08:00
Jeffery To 46017682f4 golang: Set buildid and enable stripping for Go compiler
Doing both should make the compiler reproducible.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-05-13 16:07:27 +08:00
Jeffery To d2f5e6966b golang: Rename GoPackage/Environment to GO_PKG_VARS
The variable is a list of shell variables; the new name is more in-line
with other parts the build system (CONFIGURE_VARS, MAKE_VARS, etc.).

GoPackage/Environment is kept (for now) in case other feeds are using
it.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-05-13 16:07:20 +08:00
Jeffery To 49a2ff493b golang: Add option to use external bootstrap Go
The default bootstrap Go (Go 1.4) can only be compiled on a limited
number of platforms compared to newer versions of Go.

This adds a config option to use an external bootstrap Go, e.g.
installed through the build system's package manager or downloaded from
golang.org.

See: https://github.com/openwrt/packages/issues/11731

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-05-12 17:42:48 +08:00
Jeffery To a00a0230b4 golang: Update to 1.14.2
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-04-23 02:40:50 +08:00
Jeffery To 5f392c62a5 golang: Update to 1.14.1
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-03-23 21:25:52 +08:00
Jeffery To 074b417c67 golang: Update to 1.14
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-03-05 02:53:44 +08:00
Jeffery To 1772267747 golang: Update to 1.13.8
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-02-18 17:57:55 +08:00
Jeffery To bddd1ec588 golang: Update files installed
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-02-05 14:19:34 +08:00
Jeffery To 89d3f0ab54 golang: Reorganize GoPackage/Environment and Makefile variables
* Move more environment variables into GoPackage/Environment
* Split GoPackage/Environment into target and build sections
* Do not set GOROOT_FINAL for Go packages (setting it should only affect
  the Go compiler and not Go packages)
* Set CGO_LDFLAGS to $(TARGET_LDFLAGS)
* Move GO_TARGET_* variables from golang-values.mk, and GO_VERSION_*
  variables from golang-version.mk, into golang/Makefile

This also updates runc, containerd, and docker-ce to reflect the changes
in GoPackage/Environment.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-02-05 14:19:34 +08:00
Jeffery To 3b5f1c73fb golang: Improve build isolation from user environment
* Set GOENV=off when building Go compiler and packages, to ignore user's
  environment configuration file
* Set GOCACHE when building host Go
* Unset GOTMPDIR, to use the buildroot temp directory instead of temp
  directories in build_dir

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-02-04 04:05:29 +08:00
Jeffery To 0dc4fa6efb golang: Update to 1.13.7, add PKG_CPE_ID to Makefile
This update includes fixes for[1]:
* CVE-2020-7919 - doesn't appear to be published publicly yet
* CVE-2020-0601 - a Windows-related issue

[1]: https://github.com/golang/go/issues?q=milestone%3AGo1.13.7+label%3ACherryPickApproved

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-02-03 04:58:58 +08:00
Jeffery To b621d1b0f3 golang: Update for ASLR PIE tristate option change
The ASLR PIE option was changed to a tristate option
(openwrt/openwrt@19cbac7d26). This updates
the Go compiler package and golang-package.mk to account for this
change.

This also adds warning messages for when the user has selected PIE but
Go does not have PIE support for the chosen target.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-01-15 19:36:09 +08:00
Jeffery To 7459757039 golang: Update to 1.13.6
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-01-14 22:34:07 +08:00
Jeffery To c377576734 golang: Add support for ASLR/PIE for host and target Go
This adds support to compile host and target Go as position-independent
executables.

Host Go will have PIE enabled if Go supports PIE on the host platform.

Target Go will have PIE enabled if Go supports PIE on the target
platform and CONFIG_PKG_ASLR_PIE is selected.

Go 1.13 supports PIE for x86 and arm targets; mips support is in
progress[1].

[1]: https://github.com/golang/go/issues/21222#issuecomment-542064462

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-01-08 19:29:54 +08:00
Jeffery To 12812d328f golang: Update valid os/arch combinations for host Go
The list is updated for Go 1.13.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-01-08 19:29:54 +08:00
Josef Schlehofer 802e8bf3f0
golang: Update to 1.13.5
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2019-12-09 23:27:24 +01:00
Jeffery To e239dba400 golang: Update to 1.13.4
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2019-11-04 22:54:57 +08:00
Josef Schlehofer 10d55f63d6
golang: Update to version 1.13.3
Fixes CVE-2019-17596

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2019-10-19 22:53:25 +02:00
Josef Schlehofer 65b7bd6cc0
golang: Update to version 1.13.1
Fixes CVE-2019-16276

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2019-09-29 00:53:05 +02:00
Xingwang Liao 0849e32659 golang: Update to 1.13
Signed-off-by: Xingwang Liao <kuoruan@gmail.com>
2019-09-06 11:59:04 +08:00