commit d80d9a98f7e3a8f9b3a82d2c6079f84eb1101d46 [browse]
Author: Gopher Robot
Date: 2026-07-07 12:22:15 -07:00
[release-branch.go1.25] go1.25.12
Change-Id: Ie3ced7f6cf7301d878818c6ec858b659bb5f04df
Reviewed-on: https://go-review.googlesource.com/c/go/+/797760
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: Gopher Robot <gobot@golang.org>
TryBot-Bypass: Gopher Robot <gobot@golang.org>
commit c94048f5638bbcaa22102bade5e9774e0d485315 [browse]
Author: Damien Neil
Date: 2026-05-26 13:59:05 -07:00
[release-branch.go1.25] os: properly handle trailing slashes in paths in Root
This change fixes a significant mechanism by which
operations in a Root can escape the root.
The implementation of Root on platforms supporting the openat
family of functions assumed that openat(parent, "f/", O_NOFOLLOW)
would not resolve symlinks in "f". This is not correct; the
trailing slash causes f to be resolved.
This permits Root operations to escape when the target filename
ends in a slash and the target is a symlink to a directory outside the
root. This does not permit directly accessing non-directory files
outside a root, since the trailing slash adds a requirement that the
target be a directory. However, under some circumstances an attacker
might exploit this flaw to access non-directory files outside
a root, for example by first renaming a directory outside the root
to a location within it and then accessing files within that directory.
This change adjusts Root's handling of slash-terminated paths.
Trailing slashes are removed from the path at the start of an
operation, and the presence of slashes is tracked as a boolean.
Slashes are never reattached to a path component.
In addition, the doInRoot helper function now automatically
handles trailing slashes in a POSIX-compatible fashion.
When a path ends in one or more slashes:
- symlinks in the final component are resolved; and
- the final path component after symlink resolutions
must reference a directory.
This change also adds a new sets of tests to exercise Root's
behavior in a wider variety of circumstances. These tests
run through a matrix of file configurations, such as:
- path "target", a regular file
- path "dir/../target", a directory
- path "target/", a symlink to "dir/../target/", which does not exist
- etc.
These tests execute Root operations and the corresponding unrooted
operation, validate specific expected results for some configurations,
and verify that the rooted and unrooted versions of the operation
produce the same result.
Thanks to Mundur (https://github.com/M0nd0R) for reporting this issue.
Fixes #79005
Fixes CVE-2026-39822
Change-Id: I34072ab63f2367baf236592f11143f4e6a6a6964
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/4740
Reviewed-by: Neal Patel <nealpatel@google.com>
Reviewed-by: Roland Shoemaker <bracewell@google.com>
Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/4860
Commit-Queue: Damien Neil <dneil@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/797660
Auto-Submit: Gopher Robot <gobot@golang.org>
TryBot-Bypass: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
commit fc9f821bb660c1dcb9e57868b62f62bf3afb5842 [browse]
Author: Roland Shoemaker
Date: 2026-05-08 09:22:41 -07:00
[release-branch.go1.25] crypto/tls: omit PSK in ECH outer client hello
When using ECH, do not include the PSK extension in the outer hello.
Including the PSK extension allows for a degradation in privacy, as an
on-path attacker can harvest outer client hellos, and then construct new
hellos using the PSK extension and arbitrary guessed SNI values,
replaying them to the target server. If the server rejects the PSK, the
handshake will continue, but if the PSK is accepted, the binder check
will fail.
Thanks to Coia Prant (github.com/rbqvq) for
reporting this issue.
Fixes CVE-2026-42505
Updates #79282
Fixes #80174
Change-Id: Ib3a3c948106a57c1b07b9e61a58cbf757848be18
Reviewed-on: https://go-review.googlesource.com/c/go/+/775960
Auto-Submit: Roland Shoemaker <roland@golang.org>
TryBot-Bypass: Roland Shoemaker <roland@golang.org>
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
Reviewed-by: Carlos Amedee <carlos@golang.org>
(cherry picked from commit 137b8065ab5b485bbde0ed430dd89841c0602bb2)
Reviewed-on: https://go-review.googlesource.com/c/go/+/794920
Auto-Submit: Junyang Shao <shaojunyang@google.com>
TryBot-Bypass: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
commit 75d4e8af418c8df306cd33e90c8d53dbb758c253 [browse]
Author: Nicholas S. Husin
Date: 2026-06-30 16:18:33 -04:00
[release-branch.go1.25] net: fix TestLookupCNAME
The CNAME record for www.iana.org seems to have been changed, causing
test failures.
Change the test to just use www.golang.org, so we have more control and
awareness of such changes in the future.
For #80212
Fixes #80216
Change-Id: I7b11bb8f90fe366db019dab1f8d9a1cf6a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/795842
Reviewed-by: Nicholas Husin <husin@google.com>
Auto-Submit: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
commit dd5597dd29b2183aab5e062b1b4bc867959a0391 [browse]
Author: Jorropo
Date: 2026-05-04 23:38:34 +02:00
[release-branch.go1.25] cmd/compile,sync/atomic: make Add And & Or SQCST on PPC64
Updates #79186
Fixes #79878
Change-Id: If7e298270ac6252b092371725d6a96aa871bf919
Reviewed-on: https://go-review.googlesource.com/c/go/+/774020
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Jayanth Krishnamurthy <jayanth.krishnamurthy@ibm.com>
Auto-Submit: Jorropo <jorropo.pgm@gmail.com>
Reviewed-by: Paul Murphy <paumurph@redhat.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/793881
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
clone the repository to get more history