Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-98643 Overview
CVE-2026-98643 is an out-of-bounds read vulnerability in the Linux kernel's BPF sock_ops implementation. A sockops BPF program reading skops->rtt_min performs no socket type check. On the tcp_conn_request() path, sock_ops->sk points to a request_sock (a non-full socket), but the context rewrite casts it to a tcp_sock and reads rtt_min past the end of the request_sock structure. This returns adjacent kernel memory to the BPF program. Observed reads have returned values such as rtt_min=0xffff8881, representing the high half of a leaked kernel pointer. The flaw affects kernel address space layout randomization (KASLR) assumptions and exposes sensitive kernel memory contents to unprivileged BPF program authors with appropriate capabilities.
Critical Impact
Local attackers with BPF program loading privileges can leak adjacent kernel memory, including kernel pointers, defeating KASLR and enabling subsequent exploitation.
Affected Products
- Linux kernel versions containing the sock_ops BPF rtt_min context field
- Multiple stable branches as referenced by the kernel.org commit backports
- Distributions shipping affected kernel versions prior to patch integration
Discovery Timeline
- 2026-10-18 - CVE-2026-98643 published to NVD
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-98643
Vulnerability Analysis
The Linux kernel exposes TCP socket state to BPF sockops programs through a context rewrite mechanism. When a BPF program accesses skops->rtt_min, the verifier translates the field access into a direct memory load at a hand-computed offset within a tcp_sock structure. The SOCK_OPS_GET_FIELD() macro, used for every other tcp_sock field in sock_ops, inserts a runtime check (is_locked_tcp_sock) that returns 0 when the underlying socket is not a locked full socket. The rtt_min accessor was open-coded and bypassed this guard. During the tcp_conn_request() code path, sock_ops->sk references a request_sock, which is smaller than a full tcp_sock. The unchecked cast and subsequent read at the tcp_sockrtt_min offset dereferences memory past the end of the request_sock allocation.
Root Cause
The root cause is a missing socket type validation in the BPF context rewrite path for the rtt_min field. Unlike other TCP fields that use SOCK_OPS_GET_FIELD() with its is_locked_tcp_sock guard, rtt_min was accessed via a manually computed offset: offsetof(struct tcp_sock, rtt_min) + sizeof_field(struct minmax_sample, t). This produces an out-of-bounds read [CWE-125] when the socket is a request_sock rather than a tcp_sock.
Attack Vector
Exploitation requires the ability to load a BPF sockops program, which typically needs CAP_BPF or CAP_SYS_ADMIN. The attacker attaches a program that reads skops->rtt_min during BPF_SOCK_OPS_RWND_INIT or similar events reachable through the tcp_conn_request() path. The resulting 32-bit read returns adjacent slab memory, which may contain kernel pointers, credentials, or other sensitive data. Refer to the kernel commit fd6bf27 for the authoritative patch and the vulnerable code path description.
Detection Methods for CVE-2026-98643
Indicators of Compromise
- Unexpected loading of BPF sockops programs by non-system processes or unprivileged workloads
- BPF programs that reference the rtt_min field in bpf_sock_ops context
- Kernel audit records showing bpf() syscalls with BPF_PROG_LOAD for BPF_PROG_TYPE_SOCK_OPS from unexpected UIDs
Detection Strategies
- Audit all loaded BPF programs using bpftool prog list and inspect their types and attach points
- Review eBPF program bytecode for reads from offset +2324 or references to rtt_min on bpf_sock_ops contexts
- Correlate BPF program loads with process ancestry to flag unexpected unprivileged callers
Monitoring Recommendations
- Enable Linux audit rules for bpf syscalls and alert on BPF_PROG_LOAD events outside baseline
- Monitor kernel logs for anomalous sockops cgroup attachments
- Track container workloads granted CAP_BPF or CAP_SYS_ADMIN and review their BPF usage
How to Mitigate CVE-2026-98643
Immediate Actions Required
- Apply the upstream kernel patch or vendor-supplied update that routes rtt_min reads through SOCK_OPS_GET_FIELD()
- Inventory workloads with BPF program loading privileges and restrict CAP_BPF/CAP_SYS_ADMIN to trusted services
- Disable or restrict sockops cgroup attachments in multi-tenant hosts until patching is complete
Patch Information
The fix routes rtt_min reads through SOCK_OPS_GET_FIELD(), inserting the is_locked_tcp_sock runtime guard that returns 0 when sock_ops->sk is not a locked full socket. The patch passes rtt_min.s[0].v to preserve the loaded field layout while adding the full-socket check. See the kernel commits: 0c796ef, 3a46f14, 6785313, 75f8cf2, a8a9bec, cba54d1, fc9d0e6, and fd6bf27.
Workarounds
- Revoke CAP_BPF and CAP_SYS_ADMIN from untrusted users, containers, and service accounts
- Set kernel.unprivileged_bpf_disabled=1 via sysctl to prevent unprivileged BPF program loading
- Use Linux Security Modules (SELinux, AppArmor) to confine processes able to attach BPF sockops programs to cgroups
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

