{"id":24434,"date":"2026-09-16T20:32:18","date_gmt":"2026-09-16T12:32:18","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-89777"},"modified":"2026-09-16T20:32:18","modified_gmt":"2026-09-16T12:32:18","slug":"cve-2026-89777","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-89777","title":{"rendered":"CVE-2026-89777 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nvfio\/pci: clear vdev-"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>vfio\/pci: clear vdev-&gt;msi_perm after freeing it on init failure<\/p>\n<p>vfio_msi_cap_len() lazily allocates the per-device MSI permission table:<\/p>\n<p>\tvdev-&gt;msi_perm = kmalloc_obj(struct perm_bits, GFP_KERNEL_ACCOUNT);<br \/>\n\tif (!vdev-&gt;msi_perm)<br \/>\n\t\treturn -ENOMEM;<\/p>\n<p>\tret = init_pci_cap_msi_perm(vdev-&gt;msi_perm, len, flags);<br \/>\n\tif (ret) {<br \/>\n\t\tkfree(vdev-&gt;msi_perm);<br \/>\n\t\treturn ret;\t\t\/* vdev-&gt;msi_perm left dangling *\/<br \/>\n\t}<\/p>\n<p>When init_pci_cap_msi_perm() -&gt; alloc_perm_bits() fails with -ENOMEM, the<br \/>\nerror path frees vdev-&gt;msi_perm but leaves the freed pointer stored in<br \/>\nit. vdev-&gt;msi_perm is not re-zeroed later because struct<br \/>\nvfio_pci_core_device is per-device and persists across open\/close cycles,<br \/>\nand the vfio_config_init() error path returns without calling<br \/>\nvfio_config_free(). So the dangling pointer outlives the failed open.<\/p>\n<p>That leads to two use-after-frees on the same device:<\/p>\n<p>1. Reuse. The next vfio_config_init() sees the stale pointer at<br \/>\n   &#8220;if (vdev-&gt;msi_perm) return len;&#8221; and reuses the freed object. MSI<br \/>\n   config accesses in vfio_pci_config_rw_single() then dereference and<br \/>\n   call the freed perm-&gt;readfn \/ perm-&gt;writefn function pointers.<\/p>\n<p>2. Double free. A later vfio_config_free() runs free_perm_bits() and<br \/>\n   kfree() on the already-freed object.<\/p>\n<p>Fix it by NULLing vdev-&gt;msi_perm after the kfree(), matching the<br \/>\nNULL-after-free discipline already used in free_perm_bits() and<br \/>\nvfio_config_free().<\/p>\n<p>  BUG: KASAN: slab-use-after-free in vfio_pci_config_rw_single (drivers\/vfio\/pci\/vfio_pci_config.c:1961)<br \/>\n  Read of size 8 at addr ffff88800fcc88d0 by task exploit\/143<br \/>\n  Call Trace:<br \/>\n   &#8230;<br \/>\n   kasan_report (mm\/kasan\/report.c:595)<br \/>\n   vfio_pci_config_rw_single (drivers\/vfio\/pci\/vfio_pci_config.c:1961)<br \/>\n   vfio_pci_config_rw (drivers\/vfio\/pci\/vfio_pci_config.c:1986)<br \/>\n   vfio_pci_rw (drivers\/vfio\/pci\/vfio_pci_core.c:1599)<br \/>\n   vfs_read (fs\/read_write.c:572)<br \/>\n   __x64_sys_pread64 (fs\/read_write.c:764)<br \/>\n   do_syscall_64 (arch\/x86\/entry\/syscall_64.c:94)<br \/>\n   &#8230;<\/p>\n<p>Followed on device close by a double free of the same object:<\/p>\n<p>  Oops: general protection fault, probably for non-canonical address<br \/>\n    0x1f63e0e8000008: 0000 [#1] SMP KASAN NOPTI<br \/>\n  RIP: 0010:kfree (mm\/slub.c:6711)<br \/>\n  Call Trace:<br \/>\n   vfio_config_free (drivers\/vfio\/pci\/vfio_pci_config.c:1861)<br \/>\n   vfio_pci_core_disable (drivers\/vfio\/pci\/vfio_pci_core.c:685)<br \/>\n   vfio_pci_core_close_device (drivers\/vfio\/pci\/vfio_pci_core.c:777)<br \/>\n   vfio_df_close (drivers\/vfio\/vfio_main.c:602)<br \/>\n   vfio_device_fops_release (drivers\/vfio\/vfio_main.c:648)<br \/>\n   __fput (fs\/file_table.c:512)<br \/>\n   __x64_sys_close (fs\/open.c:1496)<br \/>\n   do_syscall_64 (arch\/x86\/entry\/syscall_64.c:94)<br \/>\n   &#8230;<br \/>\n  Kernel panic &#8211; not syncing: Fatal exception<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>vfio\/pci: clear vdev-&gt;msi_perm after freeing it on init failure<\/p>\n<p>vfio_msi_cap_len() lazily allocates the per-device MSI permission <\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-24434","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/24434","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=24434"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=24434"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=24434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}