Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8413E4F55DA for ; Wed, 16 Sep 2026 10:40:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789555275; cv=none; b=VDBZ3iHLR0ey8q986LRtP82BQLAoLUUsZLeSJMn6FJUJbclz4SHj16BXS+W5DxNl5Mf7dMfW4fho06Xq5N56ewcJ3lFHVcCZxQAD8ddzwtcN8YjdNsM/Z+wP5AL3CttrXBOkVPX8wBnoit6ts9L0/XeP8acW6U263yxUpienLpQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789555275; c=relaxed/simple; bh=h95yI/AikZCyHLrsVClgyfowLB0zwi30GRwEzW16ML0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=C9K6Yd2U2A82pXo4nw7etX/SDSsNw3ugN276qJj9Sj47zTxAsOrr2jm97tbnGemBPJVclRquDgqFKJFsxCvPWs8YXRYI0Czr3mFQ3DsQMUiG88qUSCa8BKfyCfPbRSbIKvfmCyaWo4R+6JnPWde+samDeR0T32kCOBTLw4HllrA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ra0TuGwp; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ra0TuGwp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2EFC31F008A3; Wed, 16 Sep 2026 10:40:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789555256; bh=YSGmF/3iK5t5ptSyuep2b04mSOmQzOzfyic839lgUEU=; h=From:To:Cc:Subject:Date:Reply-To; b=ra0TuGwpCGHiQrMzVKR4qMd6Iwoe+tYgKbnfDYLFj4YOddcHulpDcBv/VVlzvElwQ ZUKqdc1rInYd1xQ4WFwqA70Khli9P9Ng266yGzfcExy2cTA+TsyIoFWfPzCaWjzKyx sFiwuTuxz23i83CP5P90OFB4F8pc5a+0YletFBFc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-89956: s390/vfio-ap: Fix missing lock required to access list of ap_matrix_mdev objects Date: Wed, 16 Sep 2026 11:31:26 +0100 Message-ID: <2026091650-CVE-2026-89956-1682@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4306; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=sL9JXMzguhFtcV9JscM6tDLXrFzsXVcP6LmCYpRBgQY=; b=owGbwMvMwCRo6H6F97bub03G02pJDFmr8uetqV3CYRCVmxq5/ukvHh7R49OdCw+HtudYvZ3rV 505kY2/I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACZyfTPDgmYVRj/+YMGKY/Uu LqXeLRcdhNZXM8zh+SqXzSUas4k7tbO8remfd3PS59cA X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: s390/vfio-ap: Fix missing lock required to access list of ap_matrix_mdev objects In order to traverse or add/remove ap_matrix_mdev objects in the matrix_dev->mdev_list, the matrix_dev->guests_lock mutex must be held. There are two functions that access the list without holding the mutex: vfio_ap_mdev_probe function ~~~~~~~~~~~~~~~~~~~~~~~~~~~ The vfio_ap_mdev_probe function uses the matrix_dev->mdevs_lock mutex to guard the add of a newly created ap_matrix_mdev object to the matrix_dev->mdev_list. This mutex does not protect list access; its purpose is to guard against concurrent access to fields contained in an ap_matrix_mdev object. This could lead to kernel memory corruption or use-after-free if another mdev is created or removed concurrently. The adding of an ap_matrix_mdev object to matrix_dev->mdev_list is now guarded by the matrix_dev->guests_lock which is the correct way to protect against concurrent mdev_list access. Also removed the following two lines of code because the matrix_mdev is allocated via vfio_alloc_device macro which uses kzalloc, so req_trigger and cfg_chg_trigger are already zero-initialised when the struct is allocated before the call to vfio_register_emulated_iommu_dev. This prevents a window whereby these triggers are set to NULL after the device is exposed to userspace. matrix_mdev->req_trigger = NULL; matrix_mdev->cfg_chg_trigger = NULL; vfio_ap_mdev_for_queue function ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The status_show function that supports display of the status attribute of the devices in /sys/bus/ap/devices calls the vfio_ap_mdev_for_queue function which iterates the matrix_dev->mdev_list to find the object representing the queue device whose status is to be displayed. In order to traverse this list, the matrix_dev->guests_lock mutex must be held. To fix this, the guests_lock mutex is taken prior to taking the matrix_dev->mdevs_lock mutex in the status_show function. It is taken there rather than the vfio_ap_mdev_for_queue function - where it is needed - because it must be taken prior to the mdevs_lock mutex in order to adhere to the proper locking order and prevent a lockdep splat; also because the mdevs_lock is needed there to access fields within the matrix_mdev object in that function. See the vfio-ap-locking.rst in the linux kernel tree. The Linux kernel CVE team has assigned CVE-2026-89956 to this issue. Affected and fixed versions =========================== Issue introduced in 6.0 with commit 2c1ee8983aa377fef4f725162f4f3aa5f9575d4a and fixed in 6.18.51 with commit 647916988272fe5ecb4bb30cd02b51af9960618a Issue introduced in 6.0 with commit 2c1ee8983aa377fef4f725162f4f3aa5f9575d4a and fixed in 7.2.5 with commit 0fd74477d05743d4cd9b25a3b667daa278d53b93 Issue introduced in 6.0 with commit 2c1ee8983aa377fef4f725162f4f3aa5f9575d4a and fixed in 7.3-rc1 with commit 7fa61c29850d05e40ca9ed41bfdf57673023f581 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-89956 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/s390/crypto/vfio_ap_ops.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/647916988272fe5ecb4bb30cd02b51af9960618a https://git.kernel.org/stable/c/0fd74477d05743d4cd9b25a3b667daa278d53b93 https://git.kernel.org/stable/c/7fa61c29850d05e40ca9ed41bfdf57673023f581