Sceawere

Vulnerability Detail

CVE-2026-98216UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV

Linux Kernel HFI1 PIO_CRED Memory Mapping Vulnerability

Vulnerability Metadata

Severity
High
Score / CVSS
7.1
Creation Date
1d ago
Vendor
Linux
Product
Linux
Attack Type
N/A
Vector String
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
Attack Complexity
LOW

Narrative and Response

Description

In the Linux kernel, the following vulnerability has been resolved: IB/hfi1: Fix the PIO_CRED credit-return mmap hfi1_file_mmap()'s PIO_CRED case must hand user space the single credit-return page that holds this context's entry. That page is the second or third page of the per-node credit-return allocation once the hardware send context index reaches 64 or 128, so the failure below is intermittent: when the entry lands on the first page the offset is zero and everything works. Two things are wrong. First, cr_page_offset is a byte offset but .va is a struct credit_return *, so adding it is pointer arithmetic and scales the offset by sizeof(struct credit_return) == 64. memvirt then lands 256 KiB or 512 KiB past a 10240-byte allocation. With an IOMMU translating, that address is inside the vmalloc range but in no vm_area, so dma_mmap_coherent() -> iommu_dma_mmap() finds no pages, vmalloc_to_pfn() returns page_to_pfn(NULL), and remap_pfn_range() installs a frame above MAXPHYADDR. The first user read then takes: psm2_ep_open_pr: Corrupted page table at address 7a14d007e000 PGD 800000013886a067 P4D 800000013886a067 PUD 13886b067 PMD 13886c067 PTE 800049168e911235 Oops: Bad pagetable: 000d [#1] SMP PTI Second, and still wrong once the arithmetic is corrected, dma_mmap_coherent() describes a whole coherent buffer and selects the page within it with vma->vm_pgoff. Offsetting cpu_addr has no effect: for a vmap'd allocation iommu_dma_mmap() uses cpu_addr only to locate the vm_area and then maps pages[vm_pgoff], which hfi1_file_mmap() has just set to 0. User space therefore always receives the first credit-return page, every credit read is for the wrong context, and send PIO stalls forever. Use the DMA API as intended: pass the base of the allocation with its full length and select the page with vm_pgoff. A separate length is needed because memlen must keep describing the VMA for the existing size check. The dma-direct path stays correct as well, since dma_direct_mmap() adds the same vm_pgoff to the base pfn. Tested on a Dell T7610 (Xeon E5-2650 v2, Intel IOMMU in DMA-FQ mode) against a Threadripper PRO 3995WX peer, both Omni-Path 100. Before this change psm2_ep_open() Oopses the kernel; with only the arithmetic corrected psm2_ep_open() succeeds but any transfer that uses send PIO hangs, PSM2_SDMA=2 (send PIO disabled) completing normally while PSM2_SDMA=0 (send PIO only) hangs every time. With this change send PIO, send DMA and the default mixed mode all work.

Executive Summary

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Executive Summary Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Technical Details

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Detailed Technical Analysis Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Mitigations

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Remediation & Mitigations Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

References

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Intelligence References Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Additional Metadata

{
  "score": "7.1",
  "pubDate": "2026-10-06T09:18:08.260Z",
  "pubdate": "2026-10-06T09:18:08.260Z",
  "executiveSummary": "A memory mapping vulnerability exists in the Linux kernel hfi1 driver (Omni-Path architecture), specifically within the PIO_CRED credit-return mmap handling logic.\nThe vulnerability arises from incorrect pointer arithmetic and improper use of the dma_mmap_coherent API, resulting in out-of-bounds memory access or the mapping of incorrect memory pages.\nThe issue manifests as an intermittent kernel crash (Oops) when memory references occur outside allocated bounds, or as a functional failure where user-space receives incorrect credit-return data.\nSuccessful exploitation or triggered failure leads to kernel-level memory corruption or denial of service through send PIO stalls, causing communications to hang.\nAttackers with access to the HFI1 device interface could potentially leverage this flaw to trigger system instability or bypass expected memory constraints, depending on how the driver maps the user-space address space.\nThe vulnerability is localized to the hfi1_file_mmap function and affects systems configured with hardware send contexts beyond the initial index thresholds.",
  "technicalDetails": "The vulnerability is rooted in two distinct flaws within the hfi1_file_mmap() function responsible for mapping the PIO_CRED credit-return buffer for user-space consumption.\nFirst, an arithmetic error occurs because cr_page_offset—a byte-based offset—is added directly to a pointer of type struct credit_return *. Since the pointer type has a size of 64 bytes, the compiler treats the addition as an index increase (offset * 64), leading to an incorrect, massive jump in memory addresses. When this calculated address lands outside valid memory, the kernel attempts to access non-existent mappings. During IOMMU translation, dma_mmap_coherent() fails to resolve the address, leading to a corrupt page table assignment that results in a kernel Oops (Bad pagetable) upon user-space read attempts.\nSecond, even if the arithmetic is rectified, the implementation fails to use the DMA API correctly. The code attempts to offset the cpu_addr before passing it to dma_mmap_coherent(). For vmap'd allocations, dma_mmap_coherent() effectively ignores the base address offset and relies on vm_pgoff to locate the specific page within the buffer. Because the driver sets vm_pgoff to 0, user-space processes are consistently mapped to the first credit-return page regardless of the actual context required. This results in context confusion where a process reads credit-return data belonging to the wrong hardware context, causing send PIO operations to hang indefinitely.\nThe attack flow involves a local user or process with access to the hfi1 device file calling mmap() on the PIO_CRED region. By reaching a state where the hardware send context index exceeds 64 or 128, the driver triggers the problematic code path. The failure state is intermittent based on the context index; however, once the corruption occurs, the process forces a kernel-level memory access violation. Subsequent send operations fail because the hardware credit state machine becomes desynchronized due to the incorrect memory mapping, effectively blocking high-speed network traffic through the HFI1 hardware."
}
CVE-2026-98216: Linux Kernel HFI1 PIO_CRED Memory Mapping Vulnerability (HIGH Severity, CVSS: 7.1) | Sceawere