s390/vfio-ap: Fix dereference matrix_mdev->kvm without checking for NULL
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 m
CVE-2026-89958
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: cve:CVE-2026-89958
Linux
Source reference: /containers/cna/affected/0/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Linux
Source reference: /containers/cna/affected/1/product
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"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"
}
],
"programFiles": [
"drivers/s390/crypto/vfio_ap_ops.c"
],
"defaultStatus": "unaffected"
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"product": "Linux",
"versions": [
{
"status": "affected",
"version": "6.0"
},
{
"status": "unaffected",
"version": "0",
"lessThan": "6.0",
"versionType": "semver"
},
{
"status": "unaffected",
"version": "6.6.157",
"versionType": "semver",
"lessThanOrEqual": "6.6.*"
},
{
"status": "unaffected",
"version": "6.12.110",
"versionType": "semver",
"lessThanOrEqual": "6.12.*"
},
{
"status": "unaffected",
"version": "6.18.51",
"versionType": "semver",
"lessThanOrEqual": "6.18.*"
},
{
"status": "unaffected",
"version": "7.2.5",
"versionType": "semver",
"lessThanOrEqual": "7.2.*"
},
{
"status": "unaffected",
"version": "7.3",
"versionType": "original_commit_for_fix",
"lessThanOrEqual": "*"
}
],
"programFiles": [
"drivers/s390/crypto/vfio_ap_ops.c"
],
"defaultStatus": "affected"
}
]- Related CVEs
- CVE-2026-89958
Source reference:
/cveMetadata/cveId
Publisher severity
No explicit severity was provided.
- Event
- #36399 · Revision 1
- Added to Heist Feed
- Publisher date