Skip to main content
Vulnerability Database/CVE-2026-98821

CVE-2026-98821: Linux Kernel Use-After-Free Vulnerability

CVE-2026-98821 is a use-after-free flaw in the Linux kernel that occurs when polled direct I/O is combined with user integrity metadata, potentially causing system crashes. This article covers technical details, impact analysis, and mitigation strategies.

Published:

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-98821 Overview

CVE-2026-98821 is a Linux kernel vulnerability in the block layer. The flaw occurs when polled direct I/O (IOCB_HIPRI) is combined with user integrity metadata (IOCB_HAS_METADATA). The iocb->private field holds a uio_meta structure, but iocb_bio_iopoll() expects a bio pointer. This type mismatch causes a null pointer dereference inside bio_poll() when the kernel attempts to poll completion.

The issue was introduced by commit 2729a60bbfb9, which routed metadata I/O exclusively through __blkdev_direct_IO(). That path never publishes the bio for polling. KASAN reports a general protection fault during io_uring IOPOLL operations against integrity-enabled devices.

Critical Impact

Local users with access to an integrity-enabled block device can trigger a kernel null pointer dereference, causing a denial of service through a kernel oops.

Affected Products

  • Linux kernel versions containing commit 2729a60bbfb9 in the block layer direct I/O path
  • Systems exposing block devices with Data Integrity Field (DIF) and Data Integrity Extension (DIX) support
  • Workloads using io_uring IOPOLL combined with Protection Information (PI) attributes

Discovery Timeline

  • 2026-10-18 - CVE-2026-98821 published to NVD
  • 2026-10-19 - Last updated in NVD database

Technical Details for CVE-2026-98821

Vulnerability Analysis

The vulnerability resides in the Linux kernel block layer path that handles polled direct I/O. When userspace submits an io_uring request with the IOCB_HIPRI flag and attaches Protection Information through IOCB_HAS_METADATA, the kernel stores a uio_meta structure in iocb->private. The I/O polling path, however, assumes iocb->private points to a struct bio.

When io_do_iopoll() calls iocb_bio_iopoll(), which in turn calls bio_poll(), the function dereferences the uio_meta as if it were a bio. This produces a kernel address access at a non-canonical offset, triggering a general protection fault. KASAN flags this as a null pointer dereference in the range [0x20-0x27].

The affected call chain is: __do_sys_io_uring_enter → io_iopoll_check → io_do_iopoll → io_uring_classic_poll → iocb_bio_iopoll → bio_poll.

Root Cause

The root cause is a semantic conflict in the use of iocb->private. Commit 2729a60bbfb9 changed metadata I/O to always use __blkdev_direct_IO(), which stores metadata context in iocb->private instead of a bio reference. The polling path was not updated to detect this condition. The fix rejects the combination by returning -EOPNOTSUPP when HIPRI is requested together with user metadata.

Attack Vector

Exploitation requires local access and the ability to open a block device that exposes integrity metadata. The reproducer uses scsi_debug with dif=1 dix=1 to create a virtual integrity-capable device. An attacker then issues an io_uring submission with both IOPOLL and a PI attribute attached to the operation. The resulting kernel oops disrupts the affected process and can destabilize the system.

No arbitrary code execution has been demonstrated. The impact is limited to a kernel-level denial of service through type confusion between the uio_meta and bio structures. See the upstream commits linked in Patch Information for the exact source changes.

Detection Methods for CVE-2026-98821

Indicators of Compromise

  • Kernel oops messages referencing bio_poll+0x9d/0x4b0 or iocb_bio_iopoll+0x5b/0x80 in dmesg or /var/log/kern.log
  • KASAN reports showing null pointer dereference in the address range [0x0000000000000020-0x0000000000000027]
  • General protection fault entries citing non-canonical address 0xdffffc0000000004
  • Call traces including io_do_iopoll and io_uring_classic_poll immediately preceding a crash

Detection Strategies

  • Monitor kernel ring buffer output for recurring crashes tied to the io_uring_enter syscall against integrity devices
  • Audit io_uring usage patterns to identify processes submitting IOPOLL requests with metadata attributes
  • Enable KASAN on test and staging kernels to surface the type confusion before production exposure
  • Correlate block device inventory with /sys/block/*/integrity/ attributes to locate at-risk targets

Monitoring Recommendations

  • Forward kernel crash telemetry and kdump reports to a centralized log platform for pattern analysis
  • Track io_uring syscall telemetry on hosts running database, storage, or NVMe workloads
  • Alert on unexpected process terminations accompanied by kernel panic signatures from the block layer

How to Mitigate CVE-2026-98821

Immediate Actions Required

  • Apply the upstream kernel patch that returns -EOPNOTSUPP when HIPRI is combined with IOCB_HAS_METADATA
  • Inventory hosts exposing DIF or DIX integrity metadata through SCSI, NVMe, or scsi_debug and prioritize their patching
  • Restrict local access on multi-tenant systems that cannot be patched immediately

Patch Information

The fix is available in the stable kernel tree through the following commits: commit 2a42e6fe1293, commit c97ef13ad96b, and commit dd33c03cefcc. The patch adds a check in the direct I/O submission path that returns -EOPNOTSUPP for the unsupported flag combination. Distribution-maintained kernels should pick up the backport in their next stable release.

Workarounds

  • Disable Protection Information on affected block devices where the integrity feature is not required
  • Modify application code to avoid setting IORING_SETUP_IOPOLL on file descriptors backed by integrity-enabled devices
  • Unload the scsi_debug module on test systems if it is loaded with dif=1 dix=1 parameters
bash
# Verify whether a block device exposes integrity metadata
for dev in /sys/block/*/integrity/format; do
  echo "$dev: $(cat $dev 2>/dev/null)"
done

# Confirm the running kernel version includes the fix
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

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.