# CVE-2026-89958: s390/vfio-ap: Fix dereference matrix\_mdev-\>kvm without checking for NULL

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.21% (percentile 7, 2026-11-26)
- **Published:** 2026-09-16T10:32:41.239Z
- **Modified:** 2026-10-30T13:20:36.943Z

## Who should check

- Anyone running Linux \>= eeb386aeb5b7c8d2dae6a3ba49255d8a97803182, \< 2fbe430fe40bc5adb7e439d0136d2c5fe34613ba; \>= eeb386aeb5b7c8d2dae6a3ba49255d8a97803182, \< 5e932abfcce6189d067fffb0eb8214443bc04374; \>= eeb386aeb5b7c8d2dae6a3ba49255d8a97803182, \< 334b435b951353f934d5110c4630e0cb58d2f9a7; \>= eeb386aeb5b7c8d2dae6a3ba49255d8a97803182, \< 178ea7a1c2c3c0c01d14b8f60aa35f1e0cdc6b78; \>= eeb386aeb5b7c8d2dae6a3ba49255d8a97803182, \< 4f7e869d0db24ae07b4c888fd3bc21554eef775d; \>= eeb386aeb5b7c8d2dae6a3ba49255d8a97803182, \< d50346801b4f144e42b49cd4f1496010498ab114
- Anyone running Linux 6.0

## Description

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.

## Affected and fixed versions

- Linux: \>= eeb386aeb5b7c8d2dae6a3ba49255d8a97803182, \< 2fbe430fe40bc5adb7e439d0136d2c5fe34613ba; \>= eeb386aeb5b7c8d2dae6a3ba49255d8a97803182, \< 5e932abfcce6189d067fffb0eb8214443bc04374; \>= eeb386aeb5b7c8d2dae6a3ba49255d8a97803182, \< 334b435b951353f934d5110c4630e0cb58d2f9a7; \>= eeb386aeb5b7c8d2dae6a3ba49255d8a97803182, \< 178ea7a1c2c3c0c01d14b8f60aa35f1e0cdc6b78; \>= eeb386aeb5b7c8d2dae6a3ba49255d8a97803182, \< 4f7e869d0db24ae07b4c888fd3bc21554eef775d; \>= eeb386aeb5b7c8d2dae6a3ba49255d8a97803182, \< d50346801b4f144e42b49cd4f1496010498ab114 (cvelist)
- Linux: 6.0 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-89958. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-89958.md
Affected: Linux >= eeb386aeb5b7c8d2dae6a3ba49255d8a97803182, < 2fbe430fe40bc5adb7e439d0136d2c5fe34613ba; >= eeb386aeb5b7c8d2dae6a3ba49255d8a97803182, < 5e932abfcce6189d067fffb0eb8214443bc04374; >= eeb386aeb5b7c8d2dae6a3ba49255d8a97803182, < 334b435b951353f934d5110c4630e0cb58d2f9a7; >= eeb386aeb5b7c8d2dae6a3b…
Fixed in: Linux 2fbe430fe40bc5adb7e439d0136d2c5fe34613ba, Linux 5e932abfcce6189d067fffb0eb8214443bc04374, Linux 334b435b951353f934d5110c4630e0cb58d2f9a7, Linux 178ea7a1c2c3c0c01d14b8f60aa35f1e0cdc6b78, Linux 4f7e869d0db24ae07b4c888fd3bc21554eef775d

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-89958 being exploited?

There is no confirmed exploitation: CVE-2026-89958 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.21% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-89958?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2026-89958?

Linux \>= eeb386aeb5b7c8d2dae6a3ba49255d8a97803182, \< 2fbe430fe40bc5adb7e439d0136d2c5fe34613ba; \>= eeb386aeb5b7c8d2dae6a3ba49255d8a97803182, \< 5e932abfcce6189d067fffb0eb8214443bc04374; \>= eeb386aeb5b7c8d2dae6a3ba49255d8a97803182, \< 334b435b951353f934d5110c4630e0cb58d2f9a7; \>= eeb386aeb5b7c8d2dae6a3ba49255d8a97803182, \< 178ea7a1c2c3c0c01d14b8f60aa35f1e0cdc6b78; \>= eeb386aeb5b7c8d2dae6a3ba49255d8a97803182, \< 4f7e869d0db24ae07b4c888fd3bc21554eef775d; \>= eeb386aeb5b7c8d2dae6a3ba49255d8a97803182, \< d50346801b4f144e42b49cd4f1496010498ab114; Linux 6.0.

### Is there a fix for CVE-2026-89958?

Yes. Fixed in Linux 2fbe430fe40bc5adb7e439d0136d2c5fe34613ba, Linux 5e932abfcce6189d067fffb0eb8214443bc04374, Linux 334b435b951353f934d5110c4630e0cb58d2f9a7, Linux 178ea7a1c2c3c0c01d14b8f60aa35f1e0cdc6b78, Linux 4f7e869d0db24ae07b4c888fd3bc21554eef775d. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2026-89958?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/2fbe430fe40bc5adb7e439d0136d2c5fe34613ba>
- other: <https://git.kernel.org/stable/c/5e932abfcce6189d067fffb0eb8214443bc04374>
- other: <https://git.kernel.org/stable/c/334b435b951353f934d5110c4630e0cb58d2f9a7>
- other: <https://git.kernel.org/stable/c/178ea7a1c2c3c0c01d14b8f60aa35f1e0cdc6b78>
- other: <https://git.kernel.org/stable/c/4f7e869d0db24ae07b4c888fd3bc21554eef775d>
- other: <https://git.kernel.org/stable/c/d50346801b4f144e42b49cd4f1496010498ab114>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-89958>

HTML: <https://flawdb.com/CVE-2026-89958> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-89958>
