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-98611 Overview
CVE-2026-98611 is an out-of-bounds read vulnerability in the Linux kernel's BPF subsystem. The flaw resides in bpf_crypto_ctx_create(), a kfunc that accepts a user-supplied buffer and its size through the __sz annotation. The function reads params->reserved[0] and params->reserved[1] at offsets 14 and 15 before validating params__sz against sizeof(struct bpf_crypto_params). A BPF program can submit a buffer smaller than the structure and cause the kernel to read past the validated region. The fix moves the size check in front of the reserved field reads.
Critical Impact
A BPF program loaded by a privileged user can trigger an out-of-bounds kernel memory read, potentially leaking adjacent memory contents or destabilizing the kernel.
Affected Products
- Linux kernel versions containing the bpf_crypto_ctx_create() kfunc prior to the fix
- Distributions shipping stable kernels before the referenced upstream commits
- Systems that permit loading of BPF programs invoking the crypto kfunc API
Discovery Timeline
- 2026-10-18 - CVE-2026-98611 published to the National Vulnerability Database (NVD)
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-98611
Vulnerability Analysis
The BPF subsystem exposes bpf_crypto_ctx_create() as a kernel function (kfunc) callable from BPF programs. Its second parameter carries the __sz annotation, which instructs the BPF verifier to validate only params__sz bytes of the caller-supplied params buffer. Any access beyond that byte count is unverified kernel memory access.
The original implementation dereferenced params->reserved[0] and params->reserved[1], located at offsets 14 and 15 within struct bpf_crypto_params, before comparing params__sz to sizeof(struct bpf_crypto_params). A BPF program could pass a params__sz smaller than 16 bytes while still satisfying the verifier for the bytes it declared valid. The kernel would then read two bytes beyond the verified region. This classifies as an out-of-bounds read [CWE-125] and a time-of-check ordering defect in input validation.
Root Cause
The root cause is incorrect ordering of input validation. The size comparison that gates safe access to the full bpf_crypto_params layout executed after the reserved-field reads instead of before them. The verifier's __sz contract was therefore violated by the kfunc itself, not by the BPF program.
Attack Vector
Exploitation requires the ability to load a BPF program that invokes bpf_crypto_ctx_create(). On most distributions this requires CAP_BPF or CAP_SYS_ADMIN. A crafted program passes a short buffer and a params__sz value smaller than the structure size. The kernel reads adjacent memory while evaluating the reserved fields, which can yield information disclosure or trigger faults depending on allocator state and adjacent page mappings. The upstream fix repositions the size check before any dereference of reserved fields. See the patch at Kernel Git Commit 86a0e94 for technical details.
Detection Methods for CVE-2026-98611
Indicators of Compromise
- Unexpected BPF program loads that call the crypto kfunc API from non-standard workloads
- Kernel log entries referencing BPF verifier anomalies, KASAN out-of-bounds read reports, or faults inside bpf_crypto_ctx_create()
- New or unknown processes holding CAP_BPF or CAP_SYS_ADMIN that enumerate kfunc symbols
Detection Strategies
- Enable KASAN on test and staging kernels to surface out-of-bounds reads originating from BPF kfunc paths
- Audit bpf() syscall telemetry via auditd rules targeting BPF_PROG_LOAD operations
- Correlate BPF program loads with the invoking process, user, and container context in the security data lake
Monitoring Recommendations
- Track installed kernel package versions against the patched builds referenced in the kernel.org commits
- Alert on any process that acquires CAP_BPF outside sanctioned observability or networking tools
- Baseline normal BPF kfunc usage per host so unexpected calls to crypto-related kfuncs trigger investigation
How to Mitigate CVE-2026-98611
Immediate Actions Required
- Inventory Linux hosts and identify kernels that include bpf_crypto_ctx_create() without the ordering fix
- Apply vendor-supplied stable kernel updates that incorporate the referenced upstream commits
- Restrict CAP_BPF and CAP_SYS_ADMIN to trusted system components and operators
Patch Information
The upstream fix moves the params__sz size check in front of the reserved-field reads inside bpf_crypto_ctx_create(). Patches are available in the stable tree at Kernel Git Commit 86a0e94, Kernel Git Commit a112129, Kernel Git Commit cd12d3e, and Kernel Git Commit e03253f. Rebuild or install distribution kernels that pull these commits into their stable branches.
Workarounds
- Disable unprivileged BPF where feasible by setting kernel.unprivileged_bpf_disabled=1 via sysctl
- Remove CAP_BPF from workloads that do not require loading BPF programs, including container runtimes with permissive defaults
- Use Linux Security Modules such as SELinux or AppArmor to confine processes able to invoke the bpf() syscall
# Configuration example
# Disable unprivileged BPF program loading
sysctl -w kernel.unprivileged_bpf_disabled=1
echo 'kernel.unprivileged_bpf_disabled=1' >> /etc/sysctl.d/99-bpf-hardening.conf
# Verify installed kernel version against patched builds
uname -r
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

