Add flag to compile Swoole 6.x without io_uring support #1044
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a flag to optionally compile Swoole without enabling io_uring support.
(I am not sure if this is the best way to implement this in the script)
Security experts generally believe io_uring to be unsafe. In fact Google ChromeOS and Android have turned it off, plus all Google production servers turn it off. Based on the blog published by Google below it seems like a bunch of vulnerabilities related to io_uring can be exploited to breakout of the container. Google Security Blog
Other security reaserchers also hold this opinion: see the Blackhat Presentation on io_uring exploits.
Impact on IPE:
Secure defaults on many container runtimes and operating systems limit
io_uring
syscalls to privileged users holdingCAP_SYS_ADMIN
. If Swoole is compiled with io_uring support enabled, and the resulting container is run as a non-privileged/non-root user with these secure defaults, the installation will crash with an io_uring permissions error when using any filesystem function hooked by Swoole in a Coroutine.There does not appear to be a mechanism to disable this behavior at Swoole runtime.