{"id":24643,"date":"2026-09-16T20:32:35","date_gmt":"2026-09-16T12:32:35","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-89956"},"modified":"2026-09-16T20:32:35","modified_gmt":"2026-09-16T12:32:35","slug":"cve-2026-89956","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-89956","title":{"rendered":"CVE-2026-89956 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\ns390\/vfio-ap: Fix mis"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>s390\/vfio-ap: Fix missing lock required to access list of ap_matrix_mdev objects<\/p>\n<p>In order to traverse or add\/remove ap_matrix_mdev objects in the<br \/>\nmatrix_dev-&gt;mdev_list, the matrix_dev-&gt;guests_lock mutex must be held.<br \/>\nThere are two functions that access the list without holding the mutex:<\/p>\n<p>vfio_ap_mdev_probe function<br \/>\n~~~~~~~~~~~~~~~~~~~~~~~~~~~<br \/>\nThe vfio_ap_mdev_probe function uses the matrix_dev-&gt;mdevs_lock<br \/>\nmutex to guard the add of a newly created ap_matrix_mdev object to the<br \/>\nmatrix_dev-&gt;mdev_list. This mutex does not protect list access; its purpose<br \/>\nis to guard against concurrent access to fields contained in an<br \/>\nap_matrix_mdev object. This could lead to kernel memory corruption or<br \/>\nuse-after-free if another mdev is created or removed concurrently.<\/p>\n<p>The adding of an ap_matrix_mdev object to matrix_dev-&gt;mdev_list<br \/>\nis now guarded by the matrix_dev-&gt;guests_lock which is the correct<br \/>\nway to protect against concurrent mdev_list access.<\/p>\n<p>Also removed the following two lines of code because the matrix_mdev is<br \/>\nallocated via vfio_alloc_device macro which uses kzalloc, so req_trigger<br \/>\nand cfg_chg_trigger are already zero-initialised when the struct is<br \/>\nallocated before the call to vfio_register_emulated_iommu_dev. This<br \/>\nprevents a window whereby these triggers are set to NULL after<br \/>\nthe device is exposed to userspace.<\/p>\n<p>matrix_mdev-&gt;req_trigger = NULL;<br \/>\nmatrix_mdev-&gt;cfg_chg_trigger = NULL;<\/p>\n<p>vfio_ap_mdev_for_queue function<br \/>\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br \/>\nThe status_show function that supports display of the status attribute of<br \/>\nthe devices in \/sys\/bus\/ap\/devices calls the vfio_ap_mdev_for_queue<br \/>\nfunction which iterates the matrix_dev-&gt;mdev_list to find the object<br \/>\nrepresenting the queue device whose status is to be displayed. In order to<br \/>\ntraverse this list, the matrix_dev-&gt;guests_lock mutex must be held.<\/p>\n<p>To fix this, the guests_lock mutex is taken prior to taking the<br \/>\nmatrix_dev-&gt;mdevs_lock mutex in the status_show function. It is taken<br \/>\nthere rather than the vfio_ap_mdev_for_queue function &#8211; where it is<br \/>\nneeded &#8211; because it must be taken prior to the mdevs_lock mutex in order to<br \/>\nadhere to the proper locking order and prevent a lockdep splat; also<br \/>\nbecause the mdevs_lock is needed there to access fields within<br \/>\nthe matrix_mdev object in that function.<\/p>\n<p>See the vfio-ap-locking.rst in the linux kernel tree.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>s390\/vfio-ap: Fix missing lock required to access list of ap_matrix_mdev objects<\/p>\n<p>In order to traverse or add\/remove ap_matrix_mdev<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-24643","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/24643","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=24643"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=24643"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=24643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}