-
Notifications
You must be signed in to change notification settings - Fork 582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unix: use libc stubs for OpenBSD pledge+unveil #146
Conversation
This PR (HEAD: c8da038) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/sys/+/468095 to see it. Tip: You can toggle comments from me using the |
Message from Gopher Robot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
Message from Ian Lance Taylor: Patch Set 1: (4 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
This PR (HEAD: 24ba2a1) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/sys/+/468095 to see it. Tip: You can toggle comments from me using the |
This PR (HEAD: 6063f10) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/sys/+/468095 to see it. Tip: You can toggle comments from me using the |
Message from Josh Rickmar: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
Message from Josh Rickmar: Patch Set 4: (4 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
This PR (HEAD: df13fe5) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/sys/+/468095 to see it. Tip: You can toggle comments from me using the |
Message from Josh Rickmar: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
This PR (HEAD: e9d6a00) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/sys/+/468095 to see it. Tip: You can toggle comments from me using the |
e9d6a00
to
3317d7f
Compare
This PR (HEAD: 3317d7f) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/sys/+/468095. Important tips:
|
Message from Josh Rickmar: Patch Set 7: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
Message from Joel Sing: Patch Set 7: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
Message from Josh Rickmar: Patch Set 7: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
3317d7f
to
f4acfd1
Compare
This PR (HEAD: f4acfd1) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/sys/+/468095. Important tips:
|
Message from Josh Rickmar: Patch Set 8: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
This PR (HEAD: a06a685) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/sys/+/468095. Important tips:
|
Message from Joel Sing: Patch Set 10: Code-Review+2 Run-TryBot+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
Message from Gopher Robot: Patch Set 10: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
Message from Gopher Robot: Patch Set 10: TryBot-Result+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
Message from Tobias Klauser: Patch Set 10: Code-Review+2 Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
Message from Aaron Bieber: Patch Set 10: Code-Review+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
Message from Cherry Mui: Patch Set 10: Code-Review+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
This PR (HEAD: 26b3bfc) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/sys/+/468095. Important tips:
|
Message from Josh Rickmar: Patch Set 10: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
Message from Cherry Mui: Patch Set 11: Code-Review+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
Message from Josh Rickmar: Patch Set 11: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
Message from Cherry Mui: Patch Set 11: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
This PR (HEAD: cec5852) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/sys/+/468095. Important tips:
|
This PR (HEAD: f868e74) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/sys/+/468095. Important tips:
|
For both compatibility and security concerns, it is preferrable to perform system calls through the libc stubs rather than syscall(2). Besides making programs resilient to changing system call numbers, it removes an unnecessary use of the syscall(2) call which, if found by an attacker, could be abused to perform any system call. As OpenBSD 6.2 is the oldest supported version of OpenBSD, remove the handling of pledge on versions prior to this release. PledgeExecpromises is no longer usable on 6.2, as the execpromises is treated as required (unlike Pledge, where on 6.2 it is allowed but must be empty). The empty execpromises string is no longer converted to a nil pointer on 6.2. This fixes an out-of-bounds read where, on 6.2, an empty string would be passed to the deprecated pledge(2) API, which would interpret the pointer as an array of strings.
f868e74
to
ebc0461
Compare
Message from Joel Sing: Patch Set 13: -Code-Review Hold+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
This PR (HEAD: ebc0461) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/sys/+/468095. Important tips:
|
Message from Josh Rickmar: Patch Set 14: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
Message from Mauri de Souza Meneguzzo: Patch Set 14: Code-Review+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
Message from Joel Sing: Patch Set 14: -Hold Code-Review+2 Run-TryBot+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
Message from Gopher Robot: Patch Set 14: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
Message from Gopher Robot: Patch Set 14: TryBot-Result+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
Message from Joel Sing: Patch Set 14: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
Message from Josh Rickmar: Patch Set 15: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
Message from Bryan Mills: Patch Set 15: Code-Review+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/468095. |
Future OpenBSD releases will remove the syscall(2) interface. This converts the Pledge and Unveil calls to use pledge(2) and unveil(2) from libc, rather than indirectly through syscall(2). Updates golang/go#63900. Change-Id: I61e22d8f52f16c8f5e4c0717acae0d5bf4271503 GitHub-Last-Rev: ebc0461 GitHub-Pull-Request: #146 Reviewed-on: https://go-review.googlesource.com/c/sys/+/468095 Reviewed-by: Cherry Mui <[email protected]> Reviewed-by: Mauri de Souza Meneguzzo <[email protected]> Reviewed-by: Joel Sing <[email protected]> Reviewed-by: Tobias Klauser <[email protected]> Run-TryBot: Joel Sing <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Aaron Bieber <[email protected]> Reviewed-by: Bryan Mills <[email protected]>
This PR is being closed because golang.org/cl/468095 has been merged. |
Future OpenBSD releases will remove the syscall(2) interface.
This converts the Pledge and Unveil calls to use pledge(2) and
unveil(2) from libc, rather than indirectly through syscall(2).
Updates golang/go#63900.