The solution here is to add the noexecstack cgo LD flag to go-webrtc:
#cgo LDFLAGS: -L${SRCDIR}/lib -z noexecstack
However, this will currently throw an error because of golang's whitelist on linker and compiler options. This can be solved by setting the environment variable CGO_LDFLAGS_ALLOW to a regex that recognizes the -z noexecstack option.
I've also attached a patch to this ticket, we'll have to wait until the above pull request is accepted before we can test if it works so I'll leave this as assigned until then.
This seems to be something to review for us? Setting the respective keyword. So, is this just a Linux issue or not? comment:4 seems to suggest so, but the patch touches non-Linux parts as well (like in the go config file) which confuses me.
Trac: Keywords: N/Adeleted, TorBrowserTeam201905R added Status: needs_review to needs_information
This seems to be something to review for us? Setting the respective keyword. So, is this just a Linux issue or not? comment:4 seems to suggest so, but the patch touches non-Linux parts as well (like in the go config file) which confuses me.
That was my bad, I forgot to make the environment variable change for linux only. I uploaded a new version of the patch that should fix this.
Per chat with cohosh: I'd take the patch if there is an upcoming release anyway but I'd prefer if we can get the fix merged upstream as any additional patch we need in tor-browser-build is a bug we should try to fix. I heard there are folks in Cc to this ticket who are able to review and push the pull request. Let's try to go that route first with a new patch that just updates the go-webrtc commit once the patch landed.
Trac: Status: needs_review to needs_revision Keywords: TorBrowserTeam201905R deleted, TorBrowserTeam201905 added
It turns out there's an easier way to handle this by putting the cgo directives into an environment variable. I attached a new version of the patch to this ticket.
My reasoning for putting this in projects/go/config as opposed to just projects/go-webrtc/config is that this problem will occur in all go projects that use cgo, and it also allows us to use the template build script projects/go/var/build_go_lib in go-webrtc.
It turns out there's an easier way to handle this by putting the cgo directives into an environment variable. I attached a new version of the patch to this ticket.
My reasoning for putting this in projects/go/config as opposed to just projects/go-webrtc/config is that this problem will occur in all go projects that use cgo, and it also allows us to use the template build script projects/go/var/build_go_lib in go-webrtc.
Nice! Looks good to me. Applied to tor-browser-build's master (commit 24f585bf1851bfa022128a5b587b7c0940ec775c).
Trac: Status: needs_review to closed Resolution: N/Ato fixed