---
id: "CVE-2026-98631"
kind: "vulnerability"
aliases: ["CVE-2026-98631"]
title: "Linux kernel: AF_XDP map lookup skips bounds check, reads past array"
severity: "unknown"
cvss: null
epss: null
exploited: false
status: "open"
category: "infrastructure"
products: []
ecosystems: []
tags: ["af-xdp", "bpf", "infrastructure", "kernel", "linux", "self-hosted"]
not_affected_if: ["no-af-xdp", "no-xskmap"]
published_at: "2026-10-18T16:17:16+00:00"
first_seen_at: "2026-10-23T21:57:16+00:00"
updated_at: "2026-10-25T05:21:05+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-98631", "first_seen_at": "2026-10-23T21:57:16+00:00"}]
---

# Linux kernel: AF_XDP map lookup skips bounds check, reads past array

The Linux kernel's AF_XDP socket map lookup code compares a 32-bit index against the map size using a sign-extended 64-bit immediate, so a map with 0x80000000 or more entries lets an out-of-range index skip the bounds check. The generated lookup then reads memory past the end of the xsk_map array.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Run `uname -r` and compare against the fixed kernel builds listed by the distribution or the upstream commit.
- Check whether AF_XDP (XDP sockets with XSKMAP) is in use, for example with `bpftool map show` listing xskmap entries.

## Fix

- Update the Linux kernel to a build that includes the upstream fix 'xsk: Use a 32-bit compare in xsk_map_gen_lookup'; the exact fixed version is unknown from the sources.
- Reboot into the patched kernel.

## Timeline

- 2026-10-23T21:57:16+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-98631

## From the sources

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

xsk: Use a 32-bit compare in xsk_map_gen_lookup

xsk_map_gen_lookup() loads a u32 key and compares it with max_entries
using BPF_JMP_IMM. BPF immediates are sign-extended to 64 bits, so a
max_entries value of 0x80000000 or higher becomes a threshold larger
than every zero-extended 32-bit key. An out-of-range index then skips
the bounds check and the generated lookup reads past xsk_map[].

Compare with BPF_JMP32_IMM so the check stays in 32-bit unsigned range.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
