aboutsummaryrefslogtreecommitdiff
path: root/src/syscall/syscall_linux_arm64.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2021-12-08 18:05:11 -0500
committerFilippo Valsorda <filippo@golang.org>2021-12-09 12:28:55 +0000
commit44a3fb49d99cc8a4de4925b69650f97bb07faf1d (patch)
tree51c33fb654e88ceb47477a8d085d65b5622ba065 /src/syscall/syscall_linux_arm64.go
parentcaced3b213e879b2af0508f5f6a2d3bb3d6ef2a9 (diff)
downloadgo-44a3fb49d99cc8a4de4925b69650f97bb07faf1d.tar.gz
go-44a3fb49d99cc8a4de4925b69650f97bb07faf1d.zip
[release-branch.go1.16] syscall: fix ForkLock spurious close(0) on pipe failure
Pipe (and therefore forkLockPipe) does not make any guarantees about the state of p after a failed Pipe(p). Avoid that assumption and the too-clever goto, so that we don't accidentally Close a real fd if the failed pipe leaves p[0] or p[1] set >= 0. Updates #50057 Fixes CVE-2021-44717 Change-Id: Iff8e19a6efbba0c73cc8b13ecfae381c87600bb4 Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1291270 Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-on: https://go-review.googlesource.com/c/go/+/370514 Trust: Filippo Valsorda <filippo@golang.org> Run-TryBot: Filippo Valsorda <filippo@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Alex Rakoczy <alex@golang.org>
Diffstat (limited to 'src/syscall/syscall_linux_arm64.go')
0 files changed, 0 insertions, 0 deletions