GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration

CVE-2026-89958 (GCVE-0-2026-89958)

Vulnerability from cvelistv5 – Published: 2026-09-16 10:32 – Updated: 2026-09-16 10:32
VLAI
Title
s390/vfio-ap: Fix dereference matrix_mdev->kvm without checking for NULL
Summary
In the Linux kernel, the following vulnerability has been resolved: s390/vfio-ap: Fix dereference matrix_mdev->kvm without checking for NULL The ap_driver structure has two fields which are function pointers to callbacks: * .on_config_changed: called at the start of the AP bus scan function to notify the device driver that the host AP configuration has changed and the associated AP devices will be added or removed accordingly. This gives the implementor a chance to evaluate the configuration changes and respond to them before the associated devices are added or removed. * .on_scan_complete: Called at the end of the AP bus scan function to notify the device driver that the host AP configuration has changed and the AP devices have been added or removed accordingly. This gives the implementor the opportunity to respond to the changes after the associated devices are added or removed. These two callbacks are implemented in the vfio_ap device driver via the vfio_ap_on_cfg_changed and vfio_ap_on_scan_complete functions respectively. Within the call stack of these two callback functions the matrix_mdev->kvm->lock mutex is taken without checking whether matrix_mdev->kvm is NULL or not. If matrix_mdev->kvm has never been set, trying to take the lock will trigger a NULL pointer dereference. This patch adds checks for matrix_mdev->kvm == NULL before taking the matrix_mdev->kvm->lock mutex. Note that the matrix_mdev->kvm->lock mutex taken in the vfio_ap_mdev_hot_plug_config function is moved to the calling function along with the matrix_dev->mdevs_lock which is needed there to access the fields of the matrix_mdev. It makes little sense to make the change the check for matrix_mdev->kvm there before taking the kvm->lock mutex only to have to move it out via another patch, so it is done in this patch. It is important to make note of the following: 1. The matrix_dev->guests_lock is acquired at the start of both callback functions. This ensures that matrix_mdev will not be removed via the vfio_ap_mdev_remove function because it too takes matrix_dev_guests_lock before removing the object; so, matrix_mdev will be available for the duration of the callback functions. 2. The matrix_dev->mdevs_lock mutex must be taken in order to access fields within the matrix_mdev structure 3. matrix_mdev->kvm->lock mutex must be taken before the matrix_dev->mdevs_lock to prevent a lockdep splat. 4: The kvm->lock must be held while plugging the guest's AP configuration into its SIE state description via the vfio_ap_mdev_update_guest_apcb function. 5. The vfio_ap_mdev_update_guest_apcb checks matrix_mdev->kvm to verify it is not NULL before doing the hot plug of the guest's AP configuration.
Severity
No CVSS data available.
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: eeb386aeb5b7c8d2dae6a3ba49255d8a97803182 , < 5e932abfcce6189d067fffb0eb8214443bc04374 (git)
Affected: eeb386aeb5b7c8d2dae6a3ba49255d8a97803182 , < 334b435b951353f934d5110c4630e0cb58d2f9a7 (git)
Affected: eeb386aeb5b7c8d2dae6a3ba49255d8a97803182 , < 178ea7a1c2c3c0c01d14b8f60aa35f1e0cdc6b78 (git)
Affected: eeb386aeb5b7c8d2dae6a3ba49255d8a97803182 , < 4f7e869d0db24ae07b4c888fd3bc21554eef775d (git)
Affected: eeb386aeb5b7c8d2dae6a3ba49255d8a97803182 , < d50346801b4f144e42b49cd4f1496010498ab114 (git)
guessed Create a notification for this product.
Linux Linux Affected: 6.0
Unaffected: 0 , < 6.0 (semver)
Unaffected: 6.6.157 , ≤ 6.6.* (semver)
Unaffected: 6.12.110 , ≤ 6.12.* (semver)
Unaffected: 6.18.51 , ≤ 6.18.* (semver)
Unaffected: 7.2.5 , ≤ 7.2.* (semver)
Unaffected: 7.3-rc1 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/s390/crypto/vfio_ap_ops.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "5e932abfcce6189d067fffb0eb8214443bc04374",
              "status": "affected",
              "version": "eeb386aeb5b7c8d2dae6a3ba49255d8a97803182",
              "versionType": "git"
            },
            {
              "lessThan": "334b435b951353f934d5110c4630e0cb58d2f9a7",
              "status": "affected",
              "version": "eeb386aeb5b7c8d2dae6a3ba49255d8a97803182",
              "versionType": "git"
            },
            {
              "lessThan": "178ea7a1c2c3c0c01d14b8f60aa35f1e0cdc6b78",
              "status": "affected",
              "version": "eeb386aeb5b7c8d2dae6a3ba49255d8a97803182",
              "versionType": "git"
            },
            {
              "lessThan": "4f7e869d0db24ae07b4c888fd3bc21554eef775d",
              "status": "affected",
              "version": "eeb386aeb5b7c8d2dae6a3ba49255d8a97803182",
              "versionType": "git"
            },
            {
              "lessThan": "d50346801b4f144e42b49cd4f1496010498ab114",
              "status": "affected",
              "version": "eeb386aeb5b7c8d2dae6a3ba49255d8a97803182",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/s390/crypto/vfio_ap_ops.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.0"
            },
            {
              "lessThan": "6.0",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.157",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.110",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.51",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.2.*",
              "status": "unaffected",
              "version": "7.2.5",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.3-rc1",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.6.157",
                  "versionStartIncluding": "6.0",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.110",
                  "versionStartIncluding": "6.0",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.51",
                  "versionStartIncluding": "6.0",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.2.5",
                  "versionStartIncluding": "6.0",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.3-rc1",
                  "versionStartIncluding": "6.0",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ns390/vfio-ap: Fix dereference matrix_mdev-\u003ekvm without checking for NULL\n\nThe ap_driver structure has two fields which are function pointers to\ncallbacks:\n\n* .on_config_changed: called at the start of the AP bus scan function to\n                      notify the device driver that the host AP\n                      configuration has changed and the associated AP\n                      devices will be added or removed accordingly. This\n                      gives the implementor a chance to evaluate the\n                      configuration changes and respond to them before\n                      the associated devices are added or removed.\n\n* .on_scan_complete:  Called at the end of the AP bus scan function to\n                      notify the device driver that the host AP\n                      configuration has changed and the AP devices have\n                      been added or removed accordingly. This gives the\n                      implementor the opportunity to respond to the\n                      changes after the associated devices are added or\n                      removed.\n\nThese two callbacks are implemented in the vfio_ap device driver via the\nvfio_ap_on_cfg_changed and vfio_ap_on_scan_complete functions respectively.\n\nWithin the call stack of these two callback functions the\nmatrix_mdev-\u003ekvm-\u003elock mutex is taken without checking whether\nmatrix_mdev-\u003ekvm is NULL or not. If matrix_mdev-\u003ekvm has never been set,\ntrying to take the lock will trigger a NULL pointer dereference. This patch\nadds checks for matrix_mdev-\u003ekvm == NULL before taking the\nmatrix_mdev-\u003ekvm-\u003elock mutex.\n\nNote that the matrix_mdev-\u003ekvm-\u003elock mutex taken in the\nvfio_ap_mdev_hot_plug_config function is moved to the calling function\nalong with the matrix_dev-\u003emdevs_lock which is needed there to access\nthe fields of the matrix_mdev. It makes little sense to make the change\nthe check for matrix_mdev-\u003ekvm there before taking the kvm-\u003elock\nmutex only to have to move it out via another patch, so it is done in\nthis patch.\n\nIt is important to make note of the following:\n1. The matrix_dev-\u003eguests_lock is acquired at the start of both callback\n   functions. This ensures that matrix_mdev will not be removed via the\n   vfio_ap_mdev_remove function because it too takes matrix_dev_guests_lock\n   before removing the object; so, matrix_mdev will be available for the\n   duration of the callback functions.\n\n2. The matrix_dev-\u003emdevs_lock mutex must be taken in order to access\n   fields within the matrix_mdev structure\n\n3. matrix_mdev-\u003ekvm-\u003elock mutex must be taken before the\n   matrix_dev-\u003emdevs_lock to prevent a lockdep splat.\n\n4: The kvm-\u003elock must be held while plugging the guest\u0027s AP configuration\n   into its SIE state description via the vfio_ap_mdev_update_guest_apcb\n   function.\n\n5. The vfio_ap_mdev_update_guest_apcb checks matrix_mdev-\u003ekvm to verify it\n   is not NULL before doing the hot plug of the guest\u0027s AP configuration."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-09-16T10:32:41.239Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/5e932abfcce6189d067fffb0eb8214443bc04374"
        },
        {
          "url": "https://git.kernel.org/stable/c/334b435b951353f934d5110c4630e0cb58d2f9a7"
        },
        {
          "url": "https://git.kernel.org/stable/c/178ea7a1c2c3c0c01d14b8f60aa35f1e0cdc6b78"
        },
        {
          "url": "https://git.kernel.org/stable/c/4f7e869d0db24ae07b4c888fd3bc21554eef775d"
        },
        {
          "url": "https://git.kernel.org/stable/c/d50346801b4f144e42b49cd4f1496010498ab114"
        }
      ],
      "title": "s390/vfio-ap: Fix dereference matrix_mdev-\u003ekvm without checking for NULL",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-89958",
    "datePublished": "2026-09-16T10:32:41.239Z",
    "dateReserved": "2026-09-11T19:38:34.778Z",
    "dateUpdated": "2026-09-16T10:32:41.239Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2026-89958\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2026-09-16T11:17:06.177\",\"lastModified\":\"2026-09-16T11:17:06.177\",\"vulnStatus\":\"Received\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\ns390/vfio-ap: Fix dereference matrix_mdev-\u003ekvm without checking for NULL\\n\\nThe ap_driver structure has two fields which are function pointers to\\ncallbacks:\\n\\n* .on_config_changed: called at the start of the AP bus scan function to\\n                      notify the device driver that the host AP\\n                      configuration has changed and the associated AP\\n                      devices will be added or removed accordingly. This\\n                      gives the implementor a chance to evaluate the\\n                      configuration changes and respond to them before\\n                      the associated devices are added or removed.\\n\\n* .on_scan_complete:  Called at the end of the AP bus scan function to\\n                      notify the device driver that the host AP\\n                      configuration has changed and the AP devices have\\n                      been added or removed accordingly. This gives the\\n                      implementor the opportunity to respond to the\\n                      changes after the associated devices are added or\\n                      removed.\\n\\nThese two callbacks are implemented in the vfio_ap device driver via the\\nvfio_ap_on_cfg_changed and vfio_ap_on_scan_complete functions respectively.\\n\\nWithin the call stack of these two callback functions the\\nmatrix_mdev-\u003ekvm-\u003elock mutex is taken without checking whether\\nmatrix_mdev-\u003ekvm is NULL or not. If matrix_mdev-\u003ekvm has never been set,\\ntrying to take the lock will trigger a NULL pointer dereference. This patch\\nadds checks for matrix_mdev-\u003ekvm == NULL before taking the\\nmatrix_mdev-\u003ekvm-\u003elock mutex.\\n\\nNote that the matrix_mdev-\u003ekvm-\u003elock mutex taken in the\\nvfio_ap_mdev_hot_plug_config function is moved to the calling function\\nalong with the matrix_dev-\u003emdevs_lock which is needed there to access\\nthe fields of the matrix_mdev. It makes little sense to make the change\\nthe check for matrix_mdev-\u003ekvm there before taking the kvm-\u003elock\\nmutex only to have to move it out via another patch, so it is done in\\nthis patch.\\n\\nIt is important to make note of the following:\\n1. The matrix_dev-\u003eguests_lock is acquired at the start of both callback\\n   functions. This ensures that matrix_mdev will not be removed via the\\n   vfio_ap_mdev_remove function because it too takes matrix_dev_guests_lock\\n   before removing the object; so, matrix_mdev will be available for the\\n   duration of the callback functions.\\n\\n2. The matrix_dev-\u003emdevs_lock mutex must be taken in order to access\\n   fields within the matrix_mdev structure\\n\\n3. matrix_mdev-\u003ekvm-\u003elock mutex must be taken before the\\n   matrix_dev-\u003emdevs_lock to prevent a lockdep splat.\\n\\n4: The kvm-\u003elock must be held while plugging the guest\u0027s AP configuration\\n   into its SIE state description via the vfio_ap_mdev_update_guest_apcb\\n   function.\\n\\n5. The vfio_ap_mdev_update_guest_apcb checks matrix_mdev-\u003ekvm to verify it\\n   is not NULL before doing the hot plug of the guest\u0027s AP configuration.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"drivers/s390/crypto/vfio_ap_ops.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"eeb386aeb5b7c8d2dae6a3ba49255d8a97803182\",\"lessThan\":\"5e932abfcce6189d067fffb0eb8214443bc04374\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"eeb386aeb5b7c8d2dae6a3ba49255d8a97803182\",\"lessThan\":\"334b435b951353f934d5110c4630e0cb58d2f9a7\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"eeb386aeb5b7c8d2dae6a3ba49255d8a97803182\",\"lessThan\":\"178ea7a1c2c3c0c01d14b8f60aa35f1e0cdc6b78\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"eeb386aeb5b7c8d2dae6a3ba49255d8a97803182\",\"lessThan\":\"4f7e869d0db24ae07b4c888fd3bc21554eef775d\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"eeb386aeb5b7c8d2dae6a3ba49255d8a97803182\",\"lessThan\":\"d50346801b4f144e42b49cd4f1496010498ab114\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"drivers/s390/crypto/vfio_ap_ops.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"6.0\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"6.0\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.6.157\",\"lessThanOrEqual\":\"6.6.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.12.110\",\"lessThanOrEqual\":\"6.12.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.18.51\",\"lessThanOrEqual\":\"6.18.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"7.2.5\",\"lessThanOrEqual\":\"7.2.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"7.3-rc1\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/178ea7a1c2c3c0c01d14b8f60aa35f1e0cdc6b78\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/334b435b951353f934d5110c4630e0cb58d2f9a7\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/4f7e869d0db24ae07b4c888fd3bc21554eef775d\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/5e932abfcce6189d067fffb0eb8214443bc04374\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/d50346801b4f144e42b49cd4f1496010498ab114\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…