CVE-2026-99803 in Linuxinfo

Summary

by MITRE • 11/20/2026

In the Linux kernel, the following vulnerability has been resolved:

io_uring/net: mask socket type with SOCK_TYPE_MASK in io_socket_bpf_populate()

When an IORING_OP_SOCKET request is prepared in io_socket_prep(), sock->type retains creation flags such as SOCK_CLOEXEC and SOCK_NONBLOCK until __sys_socket_file() masks them off with SOCK_TYPE_MASK during execution.

However, io_socket_bpf_populate() copies sock->type into bctx->socket.type without masking off ~SOCK_TYPE_MASK. As a result, a cBPF filter inspecting bctx->socket.type against socket types such as SOCK_DGRAM or SOCK_STREAM can be bypassed by ORing SOCK_CLOEXEC or SOCK_NONBLOCK into the socket type.

Mask sock->type with SOCK_TYPE_MASK when populating bctx->socket.type.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 11/20/2026

The Linux kernel's io_uring subsystem provides a powerful interface for asynchronous I/O operations, allowing applications to submit requests that are processed by the kernel without returning control to user space immediately. A critical aspect of this system is its integration with Berkeley Packet Filter (bpf) capabilities, which allow userspace programs to attach eBPF filters to various kernel events and data structures for monitoring or enforcement purposes. Within this framework, the io_socket_bpf_populate function plays a role in populating bpf context information related to socket operations initiated via IORING_OP_SOCKET requests. This integration is vital for security tools that rely on accurate visibility into network activity types to enforce policies or detect anomalies.

A specific vulnerability exists within the handling of socket type attributes during this population process. When an application prepares an IORING_OP_SOCKET request, the initial preparation phase in io_socket_prep leaves creation flags such as SOCK_CLOEXEC and SOCK_NONBLOCK embedded directly within the sock->type field alongside the actual protocol family or socket type indicators. While the standard execution path eventually calls __sys_socket_file(), which correctly masks these extra bits using SOCK_TYPE_MASK to isolate the pure socket type, this masking step is bypassed in the bpf population logic. The io_socket_bpf_populate function copies the raw sock->type value into the bctx->socket.type structure without applying the necessary bitwise AND operation with SOCK_TYPE_MASK. This oversight means that auxiliary flags remain visible within the context data exposed to eBPF programs.

This technical flaw creates a significant security gap by enabling an attacker or malicious userspace process to bypass cBPF filters designed to inspect socket types. For instance, if a security policy relies on an eBPF filter to allow only SOCK_STREAM connections while blocking others, an adversary can construct their IORING_OP_SOCKET request with the SOCK_CLOEXEC flag set in addition to the desired stream type. Because io_socket_bpf_populate does not mask out these flags, the bctx->socket.type value will reflect a composite integer that includes both the socket type and the creation flags. When this unmasked value is evaluated against strict equality checks for SOCK_STREAM or similar constants, it may fail to match due to the presence of extra bits, effectively allowing the operation to proceed if the filter logic is not robust enough to handle bitwise variations, or conversely causing legitimate traffic to be misclassified depending on the specific filter implementation. More critically, in contexts where filters are used for access control rather than just monitoring, this discrepancy can lead to policy evasion where operations intended to be restricted slip through because their type identifier does not match the expected constant exactly due to the presence of non-type bits.

The operational impact of this vulnerability is primarily related to the integrity of security enforcement mechanisms that depend on accurate socket classification within the io_uring subsystem. Organizations utilizing eBPF-based network monitoring or intrusion detection systems may find these tools providing incomplete or misleading data, potentially leading to blind spots in their defense-in-depth strategy. Attackers with local access could exploit this inconsistency to perform restricted network operations under the guise of permitted ones, undermining audit trails and compliance reporting that rely on precise categorization of socket activities. Although the actual underlying socket creation is still governed by correct kernel logic after execution begins, the visibility layer remains compromised, which affects any tooling dependent on pre-execution or context-based inspection rather than post-creation state analysis.

To mitigate this issue, it is essential to apply the SOCK_TYPE_MASK when populating bctx->socket.type within io_socket_bpf_populate(). This ensures that only the relevant socket type bits are exposed to eBPF programs, aligning the visibility layer with the actual operational semantics of the kernel's networking stack. Developers and system administrators should ensure their systems are updated with patches addressing this specific logic error in the io_uring net code path. Furthermore, security teams reviewing existing eBPF filters for socket inspection should consider implementing more resilient matching logic that accounts for potential flag variations or explicitly masks inputs before comparison to prevent similar bypasses arising from other sources of metadata contamination. This vulnerability is classified under CWE-20 Improper Input Validation as the kernel fails to properly sanitize input data intended for security-critical context structures, and it relates to ATT&CK techniques involving evasion through obfuscation or manipulation of system call parameters to avoid detection by monitoring tools.

Responsible

Linux

Reservation

09/25/2026

Disclosure

11/20/2026

Moderation

accepted

CPE

ready

EPSS

0.00318

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!