CVE-2026-99803: io_uring/net: mask socket type with SOCK_TYPE_MASK in io_socket_bpf_populate()
In the Linux kernel, the following vulnerability has been resolved:
iouring/net: mask socket type with SOCKTYPEMASK in iosocketbpfpopulate()
When an IORINGOPSOCKET request is prepared in iosocketprep(), sock->type retains creation flags such as SOCKCLOEXEC and SOCKNONBLOCK until syssocketfile() masks them off with SOCKTYPEMASK during execution.
However, iosocketbpfpopulate() copies sock->type into bctx->socket.type without masking off ~SOCKTYPEMASK. As a result, a cBPF filter inspecting bctx->socket.type against socket types such as SOCKDGRAM or SOCKSTREAM can be bypassed by ORing SOCKCLOEXEC or SOCKNONBLOCK into the socket type.
Mask sock->type with SOCKTYPEMASK when populating bctx->socket.type.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.2 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.3-1 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.1.176-1Fixed in 6.1.192-2Fixed in 6.12.107-1Fixed in 6.12.117-1Fixed in 7.3.4-1Fixed in 7.3.5-1 - Compensating control
Mask sock->type with SOCK_TYPE_MASK when populating bctx->socket.type in io_socket_bpf_populate().
Frequently Asked Questions
Who is exposed to this issue?
Systems using io_uring socket creation with cBPF filtering that inspects the socket type are exposed. The bypass applies when the filter compares the populated socket type to values such as SOCK_DGRAM or SOCK_STREAM.
What does an attacker need to do to bypass the filter?
An attacker needs to submit an IORING_OP_SOCKET request and include SOCK_CLOEXEC or SOCK_NONBLOCK in the requested socket type. Before the fix, these creation flags remain in the value presented to the cBPF filter, preventing an exact comparison against the base socket type from matching.
Are default configurations affected?
The issue depends on use of cBPF filters that examine bctx->socket.type for io_uring socket requests. The provided information does not establish whether such filtering is enabled or used by default.
How can I determine whether a system has the fix?
Verify that the installed kernel includes the change that masks sock->type with SOCK_TYPE_MASK when io_socket_bpf_populate() sets bctx->socket.type. The referenced stable-kernel commits provide the upstream fix locations.