{"id":33285,"date":"2026-10-06T20:31:41","date_gmt":"2026-10-06T12:31:41","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-98216"},"modified":"2026-10-06T20:31:41","modified_gmt":"2026-10-06T12:31:41","slug":"cve-2026-98216","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-98216","title":{"rendered":"CVE-2026-98216 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nIB\/hfi1: Fix the PIO_"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>IB\/hfi1: Fix the PIO_CRED credit-return mmap<\/p>\n<p>hfi1_file_mmap()&#8217;s PIO_CRED case must hand user space the single<br \/>\ncredit-return page that holds this context&#8217;s entry.  That page is the<br \/>\nsecond or third page of the per-node credit-return allocation once the<br \/>\nhardware send context index reaches 64 or 128, so the failure below is<br \/>\nintermittent: when the entry lands on the first page the offset is zero<br \/>\nand everything works.<\/p>\n<p>Two things are wrong.<\/p>\n<p>First, cr_page_offset is a byte offset but .va is a struct<br \/>\ncredit_return *, so adding it is pointer arithmetic and scales the offset<br \/>\nby sizeof(struct credit_return) == 64.  memvirt then lands 256 KiB or<br \/>\n512 KiB past a 10240-byte allocation.  With an IOMMU translating, that<br \/>\naddress is inside the vmalloc range but in no vm_area, so<br \/>\ndma_mmap_coherent() -&gt; iommu_dma_mmap() finds no pages, vmalloc_to_pfn()<br \/>\nreturns page_to_pfn(NULL), and remap_pfn_range() installs a frame above<br \/>\nMAXPHYADDR.  The first user read then takes:<\/p>\n<p>  psm2_ep_open_pr: Corrupted page table at address 7a14d007e000<br \/>\n  PGD 800000013886a067 P4D 800000013886a067 PUD 13886b067 PMD 13886c067<br \/>\n                                            PTE 800049168e911235<br \/>\n  Oops: Bad pagetable: 000d [#1] SMP PTI<\/p>\n<p>Second, and still wrong once the arithmetic is corrected,<br \/>\ndma_mmap_coherent() describes a whole coherent buffer and selects the<br \/>\npage within it with vma-&gt;vm_pgoff.  Offsetting cpu_addr has no effect:<br \/>\nfor a vmap&#8217;d allocation iommu_dma_mmap() uses cpu_addr only to locate the<br \/>\nvm_area and then maps pages[vm_pgoff], which hfi1_file_mmap() has just<br \/>\nset to 0.  User space therefore always receives the first credit-return<br \/>\npage, every credit read is for the wrong context, and send PIO stalls<br \/>\nforever.<\/p>\n<p>Use the DMA API as intended: pass the base of the allocation with its<br \/>\nfull length and select the page with vm_pgoff.  A separate length is<br \/>\nneeded because memlen must keep describing the VMA for the existing size<br \/>\ncheck.  The dma-direct path stays correct as well, since dma_direct_mmap()<br \/>\nadds the same vm_pgoff to the base pfn.<\/p>\n<p>Tested on a Dell T7610 (Xeon E5-2650 v2, Intel IOMMU in DMA-FQ mode)<br \/>\nagainst a Threadripper PRO 3995WX peer, both Omni-Path 100.  Before this<br \/>\nchange psm2_ep_open() Oopses the kernel; with only the arithmetic<br \/>\ncorrected psm2_ep_open() succeeds but any transfer that uses send PIO<br \/>\nhangs, PSM2_SDMA=2 (send PIO disabled) completing normally while<br \/>\nPSM2_SDMA=0 (send PIO only) hangs every time.  With this change send PIO,<br \/>\nsend DMA and the default mixed mode all work.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>IB\/hfi1: Fix the PIO_CRED credit-return mmap<\/p>\n<p>hfi1_file_mmap()&#8217;s PIO_CRED case must hand user space the single<br \/>\ncredit-return page t<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-33285","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/33285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln"}],"about":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/types\/vuln"}],"wp:attachment":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=33285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=33285"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=33285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}