]> Cypherpunks repositories - gostls13.git/commit
os: don't follow symlinks on Windows when O_CREATE|O_EXCL
authorDamien Neil <dneil@google.com>
Tue, 13 May 2025 22:35:19 +0000 (15:35 -0700)
committerGopher Robot <gobot@golang.org>
Wed, 14 May 2025 19:32:33 +0000 (12:32 -0700)
commitadcad7bea9f6933a219c7b05d8173cf8a4586092
tree01fdd799ed3f1ce3f38c5368b02f2e366e701b54
parent14fc54fc5735163abf7694b4efa2b7998c6696e2
os: don't follow symlinks on Windows when O_CREATE|O_EXCL

Match standard Unix behavior: Symlinks are not followed when
O_CREATE|O_EXCL is passed to open.

Thanks to Junyoung Park and Dong-uk Kim of KAIST Hacking Lab
for discovering this issue.

Fixes #73702
Fixes CVE-2025-0913

Change-Id: Ieb46a6780c5e9a6090b09cd34290f04a8e3b0ca5
Reviewed-on: https://go-review.googlesource.com/c/go/+/672396
Auto-Submit: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
src/internal/syscall/windows/at_windows.go
src/os/os_test.go
src/syscall/syscall_windows.go