HIGH Introduced in 7.2
io_uring ConnectFilter Bypass
CVE-2026-99042
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N
KernelScan AI7.1HIGH
01Description
In the Linux kernel, the following vulnerability has been resolved: io_uring/net: populate CONNECT filter fields for 24-byte sockaddr_in6 io_connect_bpf_populate() fills connect.port and connect.v6_addr for AF_INET6 only when addr_len >= sizeof(struct sockaddr_in6), i.e. 28 bytes. The IPv6 connect paths accept SIN6_LEN_RFC2133 (24 bytes), which already holds sin6_port and sin6_addr. io_connect() passes addr_len to the socket layer unchanged. At addr_len 24 the filter sees family AF_INET6 with port and address zero, while the kernel connects to the real destination. A filter that denies an IPv6 port or address is bypassed. Denying connect.port == P rejects [::1]:P with -EACCES at addr_len 28 but connects at addr_len 24. Use SIN6_LEN_RFC2133 as the threshold. sin6_scope_id stays zero when absent. The threshold mismatch was found by an AI coding assistant (Claude Code) comparing this hook against the net/ipv6 length checks on my instructions; it also drafted the reproducer and this patch. I verified the bypass and the fix in a VM on 7.3-rc6 and that 7.2 has the same code.
02KernelScan AI Analysis
Risk summary
A local unprivileged user can bypass io_uring connect filters that restrict IPv6 connections by port or address. The filter logic incorrectly requires a 28-byte sockaddr_in6 to populate port and address fields, but the kernel accepts 24-byte RFC 2133 structures containing the same data. This allows container workloads or local users to connect to blocked destinations, undermining network policy enforcement.
Vulnerability analysis
The io_uring connect filter only records the target port and address when the provided IPv6 socket address is at least 28 bytes long. However, the kernel's IPv6 stack also accepts a shorter 24-byte format that already contains the port and address. When this shorter format is used, the filter sees an IPv6 connection with zeroed port and address fields, while the actual connection proceeds to the real destination. This allows a filter rule that blocks a specific port or address to be circumvented. The fix adjusts the length check to accept the 24-byte format so the filter always sees the correct destination. Any local user with access to the io_uring interface, including unprivileged container workloads, can exploit this by issuing a connect operation with a 24-byte IPv6 address structure.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 7.2 | 7.2 | 7.2.11 | 596a955d2d01 |
| mainline | 7.2 | 7.3 | aa5d5f8e5023 |