From mboxrd@z Thu Jan 1 00:00:00 1970 From: AL-KERNEL To: kernel-cve@kernelcve.org Subject: [CVE-2026-98216][MODERATE REGULAR] IB/hfi1: Fix the PIO_CRED credit-return mmap Date: Fri, 09 Oct 2026 06:51:04 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-AL-KERNEL-CVE: CVE-2026-98216 X-AL-KERNEL-Priority: MODERATE REGULAR X-AL-KERNEL-Severity: MODERATE REGULAR X-AL-KERNEL-Base-Severity: MODERATE X-AL-KERNEL-KPANIC: NO X-AL-KERNEL-ActionableScore: 1 X-AL-KERNEL-ActionableScore-Lower: unknown X-AL-KERNEL-Commit: 535530bb2ea5254e1e9f55280143d262dd065204 List-Id: CVE: CVE-2026-98216 Priority: MODERATE REGULAR AL-KERNEL base severity: MODERATE KPANIC flag: NO Patch: IB/hfi1: Fix the PIO_CRED credit-return mmap Commit: 535530bb2ea5254e1e9f55280143d262dd065204 Upstream patch: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=535530bb2ea5254e1e9f55280143d262dd065204 Original CVE announcement: https://lore.kernel.org/linux-cve-announce/?q=CVE-2026-98216 Analysis date: Fri, 09 Oct 2026 06:51:04 -0400 ActionableScore: 1 ActionableScore lower bound: unknown Actionable bucket: Borderline / manual review recommended Manual review required: YES Summary: No one-sentence report phrase was found. ====================================================================== ABOUT THIS REPORT ====================================================================== The original Linux kernel CVE announcement for CVE-2026-98216 is available here: https://lore.kernel.org/linux-cve-announce/?q=CVE-2026-98216 The original announcement does not normally provide a security severity estimate, CVSS assessment, or enough information to determine whether the reported kernel bug represents a practically relevant security issue. This report was generated by AL-KERNEL, an AI-assisted Linux kernel vulnerability analysis system developed by Alexander Larkin. It combines an autonomous classifier with LLM-assisted technical analysis and a separate ActionableScore mechanism. The purpose of this report is to prioritize Linux kernel CVEs before manual review, identify cases that require prompt investigation, and support automatic closure of issues that are unlikely to have meaningful security impact. Published priority for this report: MODERATE REGULAR Manual review required: YES A detailed explanation of the methodology and priority rules is included at the end of this message. ====================================================================== AL-KERNEL CLASSIFICATION RESULT ====================================================================== CVE-2026-98216 MODERATE https://www.kernelcve.org/list/?q=CVE-2026-98216 CHECK WITH IMPACT FROM ORIG NN LOW | AEGIS IMPACT MODERATE_KPANIC AEGIS_AS=3 LEGACY=MODERATE RESULT=DIFF (independent Legacy and Aegis differ; FINAL: MODERATE, Aegis: MODERATE_KPANIC) Maybe valid. Check manually. Hints by AL-KERNEL: The best (paranoid) CVSS is 'AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:H';CWE-468;CWE-823;*CWE-200;Other CVSS 'AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H';BEST CVSS score: '5.3';DESCR 'An incorrect offset calculation in hfi1_file_mmap() treats a byte offset as an array index for struct credit_return. For hardware send context indexes at or above 64 or 128, the resulting CPU address can point 256 KiB or 512 KiB beyond the coherent credit return allocation. With an IOMMU, dma_mmap_coherent() can then derive an invalid PFN and install a corrupted user page table entry, causing a Bad pagetable Oops when the mapping is first read. A second mapping error can expose the first credit return page instead of the page assigned to the current context, causing incorrect credit accounting and an indefinite send PIO stall. For the CVSS the PR:L value is used because a local user or service must have permission to open the hfi1 device, allocate a context, and invoke mmap. The issue is not directly network reachable and cannot be triggered only by sending RDMA traffic. The demonstrated impact is local denial of service through a kernel crash or persistent PIO hang. A limited confidentiality impact is retained in the paranoid score because an out of range vmalloc address could potentially resolve to an unrelated existing allocation and expose a read only page, although this behavior is not demonstrated by the report.';YES REQUIRES MANUAL CHECK; ,and ActionableScore result is Borderline / manual review recommended (with actual score 1) MAYBE READ OOB INIT NETWORK DMAorINTERRUPT HARDWARE LINUS MEMORY DECREASED_TO_MODERATE_REGULAR_FROM_MODERATE7_BASED_ON_GUESSCVSS_AND_CIANNH - - checked ====================================================================== ACTIONABLESCORE ANALYSIS ====================================================================== ActionableScore=1 PrimitiveClass=CLASS_C RealUAF=NO HostAdminRequired=UNKNOWN NamespaceScopedPrivilege=UNKNOWN ImportantCandidate=NO ManualReview=RECOMMENDED AutoDowngradeAllowed=YES 1. ActionableScore * Raw conservative score: 1 * Conservative score: 1 * Raw paranoid score: 1 * Paranoid score: 1 * No floor or cap was applied. * Final recommended bucket: **Borderline / manual review recommended**:: 2. Signal breakdown * +1 Privileged kernel/device-management MMU corruption path. The erroneous pointer arithmetic causes `remap_pfn_range()` to install an invalid PFN above `MAXPHYADDR`. * +1 Reliable kernel crash. The first userspace read of the malformed mapping produces a documented Bad pagetable Oops. * +1 Distinct availability effect. Independently, selecting the first credit-return page supplies credits for the wrong context and can stall send PIO indefinitely. * -2 Physical-only or rare hardware requirement. Reaching this driver path requires uncommon physical Intel Omni-Path HFI1 hardware and an allocated hardware send context. * No local-unprivileged bonus. Access below host-admin privilege is plausible but device-node permissions and the complete context-allocation requirements are not supplied. * No confidentiality point. Mapping an unrelated vmalloc page is only a theoretical layout-dependent possibility. The demonstrated path installs an invalid PFN and faults. * No integrity point. The attacker cannot select an arbitrary page-table target, PFN, or write payload, and the VMA is read-only. * No remote-reachability point. RDMA traffic alone does not invoke the vulnerable `mmap` operation. * No UAF, controlled reclaim, arbitrary write, callback influence, or privilege-escalation primitive is established. * B5-R does not apply. There is no heap or slab OOB write, retry-accumulated index, attacker-influenced retry sequence, or later consumption of retry-corrupted heap state. 3. Reachability analysis A local process must open the HFI1 device, obtain an HFI1 userspace context, and request the `PIO_CRED` mapping. The faulty nonzero offset occurs when the hardware send context index reaches at least 64 or 128. The demonstrated Bad pagetable path additionally depends on an IOMMU-backed coherent allocation. The supplied evidence does not establish whether an ordinary user, a delegated HPC service account, or a host administrator can complete device opening and context allocation. Therefore `HostAdminRequired` and namespace-scoped privilege remain unknown. An administrator must provision the physical HFI1 adapter and driver, but that does not prove that each triggering process requires host-admin privilege. This is not a race and does not require retry timing. Remote RDMA traffic cannot independently trigger the faulty mapping. 4. Primitive and severity interpretation The exact primitive is incorrect byte-offset pointer arithmetic followed by misuse of the coherent DMA mmap API. The first defect produces an address 256 KiB or 512 KiB beyond a 10240-byte allocation. On the documented IOMMU path this becomes an invalid PFN in a userspace page-table entry and causes an Oops when accessed. The second defect maps the first credit-return page instead of selecting the page for the current hardware context. Its demonstrated consequence is incorrect credit accounting and a persistent send PIO stall. This is neither stale storage nor an active-object UAF. It is constrained invalid mapping and corrupted-state behavior, classified as `CLASS_C`. There is no confirmed heap OOB write, arbitrary page selection, controlled kernel write, disclosure, or post-lifetime operation. The B5-R Important-preservation profile is therefore not established. `ImportantCandidate=NO` because the demonstrated effects are a constrained kernel crash and device data-path hang on specialized hardware. `AutoDowngradeAllowed=YES` because no unresolved Class A or Class B primitive remains. Manual review is still recommended to verify device access permissions and whether any affected allocator layout can map an existing unrelated vmalloc page instead of faulting. 5. One-sentence report phrase Incorrect PIO credit-return offset handling in HFI1 can install an invalid userspace PFN and crash the kernel or map the wrong credit page and stall send PIO, but no heap OOB write, UAF, arbitrary mapping, or confirmed disclosure is established. 6. Manual review recommendation MANUAL CHECK RECOMMENDED Confirm HFI1 device-node reachability and whether the out-of-range vmalloc address can ever resolve to an existing allocation, although current evidence supports constrained crash and device-hang impact rather than Important-grade corruption. 7. Call-site confidence Call-site confidence: high ====================================================================== UPSTREAM PATCH SUMMARY ====================================================================== Patch: IB/hfi1: Fix the PIO_CRED credit-return mmap Commit: 535530bb2ea5254e1e9f55280143d262dd065204 Upstream URL: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=535530bb2ea5254e1e9f55280143d262dd065204 Commit description: 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. Fixes: 1ec8231 ("IB/hfi1: Use dma_mmap_coherent for matching buffers") Cc: stable@vger.kernel.org Signed-off-by: Shuhei Takeshita Link: https://patch.msgid.link/20260809032743.2671579-3-jyohuku.alterego@gmail.com Signed-off-by: Leon Romanovsky Signed-off-by: Greg Kroah-Hartman Changed files: drivers/infiniband/hw/hfi1/file_ops.c Diff excerpt: Not included in this email. See the upstream URL for the full patch. Full patch: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=535530bb2ea5254e1e9f55280143d262dd065204 ====================================================================== DETAILED REPORT METHODOLOGY ====================================================================== The original Linux kernel CVE announcement for CVE-2026-98216 can be found here: https://lore.kernel.org/linux-cve-announce/?q=CVE-2026-98216 The original CVE announcement normally does not include a security-level estimate. In particular, it may not contain a CVSS assessment, an impact level, or enough information to determine whether the reported bug is a practically relevant security issue. One purpose of this parallel CVE list is to provide that missing technical and prioritization information. The original goal of the AL-KERNEL project was to prioritize Linux kernel CVE analysis automatically before manual review. The system can also help identify non-security issues that may be suitable for automatic closure. This report was generated by AL-KERNEL, an AI-assisted Linux kernel vulnerability analysis system developed by Alexander Larkin. The first analysis stage combines an autonomous classifier with additional LLM-based analysis. The autonomous classifier runs locally on a CPU and is based on a backpropagation neural network. Together, these mechanisms produce a technical vulnerability description, identify likely weakness types, estimate CVSS severity, and provide input for ActionableScore. Two CVSS estimates are retained because incomplete kernel vulnerability information often permits more than one defensible interpretation: Conservative CVSS vector: AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H The Best / paranoid CVSS vector: AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:H The Best / paranoid CVSS score: 5.3 The conservative vector represents a lower-impact interpretation. The Best/paranoid vector intentionally represents a plausible upper-bound interpretation and should not automatically be treated as demonstrated real-world impact. CVSS may also need to be adjusted for a particular Linux deployment, because actual reachability, privileges, enabled kernel configuration, hardware, namespaces, exposed device nodes, and other environmental conditions can differ significantly between systems. A separate ActionableScore mechanism evaluates practical remediation urgency. Its analysis may include reachability, attack prerequisites, subsystem exposure, memory-corruption characteristics, denial-of-service reliability, and possible confidentiality, integrity, or privilege-escalation impact. Conservative ActionableScore: unknown Paranoid ActionableScore: 1 The final base severity is taken directly from the second tab-separated field of the AL-KERNEL classification result. ActionableScore does not replace or independently override that final AL-KERNEL decision, and if ActionableScore adjusted impact level of ALKERNEL, then you would see self-readable flags above like INCREASED_TO_HIGH_BASED_ON_ACTIONABLESCOREHIGHEREQTHAN7. For an AL-KERNEL result of MODERATE, this report uses the following additional presentation split: ActionableScore below 5 -> MODERATE REGULAR ActionableScore 5 or more -> MODERATE 7.0 The distinction between MODERATE REGULAR and MODERATE 7.0 makes it possible to identify Moderate issues that should receive manual analysis and fixes before lower-priority MODERATE REGULAR issues. In many cases, MODERATE REGULAR fixes may wait for a later rebase or routine update. There is one override in which MODERATE REGULAR becomes MODERATE 7.0 even when the ActionableScore is below 5. When the AL-KERNEL result contains the KPANIC flag, a MODERATE result is always presented as MODERATE 7.0. The KPANIC flag selected with few regexps without usage of AI at all, so it helps to detect cases when Kernel Crash happens and similar (to filter False-Negative results from the LLM usage). KPANIC indicates that a reliable kernel crash, kernel panic, or similarly serious kernel availability impact was identified by the classification workflow. AL-KERNEL base severity for this report: MODERATE KPANIC detected for this report: NO Published priority for this report (same as in Subject): MODERATE REGULAR These results are intended to support engineering triage. They are machine-generated estimates, and cases marked for manual review should be validated by a human security engineer before final disposition. For more info read docs linked from here: https://kernelcve.org/ (and you can submit you own patch there to generate such a report for non-existant CVE-id yet). Note that in many cases this AI tool selects higher severity, than real is (means you can expect Importants instead of Moderate 7.0 or Moderates 7.0 instead of regular Moderates). If you see such cases, please use reply email interface to add additional manual analyses info to this particular CVE. And please, please, let me know when you see Lows instead of Importants or Important instead of Low (because particular for such cases I need to tune this AI tool to make it better for this one and next similar). My contact email for such notifications is alexanjelausa@gmail.com (and both send reply to CVE record itself too and see "reply" button below for howto reply).