# CVE-2026-89777: vfio/pci: clear vdev-\>msi\_perm after freeing it on init failure

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

- **Severity:** HIGH 8.8
- **CVSS:** 8.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Changed (impact reaches other components); Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.17% (percentile 4, 2026-11-28)
- **Published:** 2026-09-16T08:48:17.754Z
- **Modified:** 2026-10-19T09:18:20.933Z

## Who should check

- Anyone running Linux \>= 30ea32ab1951c80c6113f300fce2c70cd12659e4, \< eb84cd81040e58dd05ac190f561f2115e3367249; \>= 30ea32ab1951c80c6113f300fce2c70cd12659e4, \< f0eea8f9013676b42289ec35941e848b8a543e19; \>= 30ea32ab1951c80c6113f300fce2c70cd12659e4, \< d665a1688af7f8fefd7c0eb04f2a37122ce007f4; \>= 30ea32ab1951c80c6113f300fce2c70cd12659e4, \< 25cdd2a492d868cff1e519a60fe282909c52d385; \>= 30ea32ab1951c80c6113f300fce2c70cd12659e4, \< 812f1db7f0755a19ef16ecdc5cec51bcabc5eda5; \>= 30ea32ab1951c80c6113f300fce2c70cd12659e4, \< 533d0c5feef85ee6404b9f41d5564fac6971a008; \>= 30ea32ab1951c80c6113f300fce2c70cd12659e4, \< fda8fb7e8179561693a786a7af593f6b944a21c1; \>= 30ea32ab1951c80c6113f300fce2c70cd12659e4, \< dc77acfeb979dded39b247b60fef0399536bfa77; ac370e3d1f3b01519d2705cd5815d1c9d0a8812b; be363e27ec3c3a99793da2be6c07eafb95709c6b; …
- Anyone running Linux 4.20

## Description

In the Linux kernel, the following vulnerability has been resolved:

vfio/pci: clear vdev-\>msi\_perm after freeing it on init failure

vfio\_msi\_cap\_len() lazily allocates the per-device MSI permission table:

	vdev-\>msi\_perm = kmalloc\_obj(struct perm\_bits, GFP\_KERNEL\_ACCOUNT);
	if (!vdev-\>msi\_perm)
		return -ENOMEM;

	ret = init\_pci\_cap\_msi\_perm(vdev-\>msi\_perm, len, flags);
	if (ret) {
		kfree(vdev-\>msi\_perm);
		return ret;		/\* vdev-\>msi\_perm left dangling \*/
	}

When init\_pci\_cap\_msi\_perm() -\> alloc\_perm\_bits() fails with -ENOMEM, the
error path frees vdev-\>msi\_perm but leaves the freed pointer stored in
it. vdev-\>msi\_perm is not re-zeroed later because struct
vfio\_pci\_core\_device is per-device and persists across open/close cycles,
and the vfio\_config\_init() error path returns without calling
vfio\_config\_free(). So the dangling pointer outlives the failed open.

That leads to two use-after-frees on the same device:

1. Reuse. The next vfio\_config\_init() sees the stale pointer at
   "if (vdev-\>msi\_perm) return len;" and reuses the freed object. MSI
   config accesses in vfio\_pci\_config\_rw\_single() then dereference and
   call the freed perm-\>readfn / perm-\>writefn function pointers.

2. Double free. A later vfio\_config\_free() runs free\_perm\_bits() and
   kfree() on the already-freed object.

Fix it by NULLing vdev-\>msi\_perm after the kfree(), matching the
NULL-after-free discipline already used in free\_perm\_bits() and
vfio\_config\_free().

  BUG: KASAN: slab-use-after-free in vfio\_pci\_config\_rw\_single (drivers/vfio/pci/vfio\_pci\_config.c:1961)
  Read of size 8 at addr ffff88800fcc88d0 by task exploit/143
  Call Trace:
   ...
   kasan\_report (mm/kasan/report.c:595)
   vfio\_pci\_config\_rw\_single (drivers/vfio/pci/vfio\_pci\_config.c:1961)
   vfio\_pci\_config\_rw (drivers/vfio/pci/vfio\_pci\_config.c:1986)
   vfio\_pci\_rw (drivers/vfio/pci/vfio\_pci\_core.c:1599)
   vfs\_read (fs/read\_write.c:572)
   \_\_x64\_sys\_pread64 (fs/read\_write.c:764)
   do\_syscall\_64 (arch/x86/entry/syscall\_64.c:94)
   ...

Followed on device close by a double free of the same object:

  Oops: general protection fault, probably for non-canonical address
    0x1f63e0e8000008: 0000 \[\#1\] SMP KASAN NOPTI
  RIP: 0010:kfree (mm/slub.c:6711)
  Call Trace:
   vfio\_config\_free (drivers/vfio/pci/vfio\_pci\_config.c:1861)
   vfio\_pci\_core\_disable (drivers/vfio/pci/vfio\_pci\_core.c:685)
   vfio\_pci\_core\_close\_device (drivers/vfio/pci/vfio\_pci\_core.c:777)
   vfio\_df\_close (drivers/vfio/vfio\_main.c:602)
   vfio\_device\_fops\_release (drivers/vfio/vfio\_main.c:648)
   \_\_fput (fs/file\_table.c:512)
   \_\_x64\_sys\_close (fs/open.c:1496)
   do\_syscall\_64 (arch/x86/entry/syscall\_64.c:94)
   ...
  Kernel panic - not syncing: Fatal exception

## Affected and fixed versions

- Linux: \>= 30ea32ab1951c80c6113f300fce2c70cd12659e4, \< eb84cd81040e58dd05ac190f561f2115e3367249; \>= 30ea32ab1951c80c6113f300fce2c70cd12659e4, \< f0eea8f9013676b42289ec35941e848b8a543e19; \>= 30ea32ab1951c80c6113f300fce2c70cd12659e4, \< d665a1688af7f8fefd7c0eb04f2a37122ce007f4; \>= 30ea32ab1951c80c6113f300fce2c70cd12659e4, \< 25cdd2a492d868cff1e519a60fe282909c52d385; \>= 30ea32ab1951c80c6113f300fce2c70cd12659e4, \< 812f1db7f0755a19ef16ecdc5cec51bcabc5eda5; \>= 30ea32ab1951c80c6113f300fce2c70cd12659e4, \< 533d0c5feef85ee6404b9f41d5564fac6971a008; \>= 30ea32ab1951c80c6113f300fce2c70cd12659e4, \< fda8fb7e8179561693a786a7af593f6b944a21c1; \>= 30ea32ab1951c80c6113f300fce2c70cd12659e4, \< dc77acfeb979dded39b247b60fef0399536bfa77; ac370e3d1f3b01519d2705cd5815d1c9d0a8812b; be363e27ec3c3a99793da2be6c07eafb95709c6b; … (cvelist)
- Linux: 4.20 (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-89777. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-89777.md
Affected: Linux >= 30ea32ab1951c80c6113f300fce2c70cd12659e4, < eb84cd81040e58dd05ac190f561f2115e3367249; >= 30ea32ab1951c80c6113f300fce2c70cd12659e4, < f0eea8f9013676b42289ec35941e848b8a543e19; >= 30ea32ab1951c80c6113f300fce2c70cd12659e4, < d665a1688af7f8fefd7c0eb04f2a37122ce007f4; >= 30ea32ab1951c80c6113f30…
Fixed in: Linux 25cdd2a492d868cff1e519a60fe282909c52d385, Linux 812f1db7f0755a19ef16ecdc5cec51bcabc5eda5, Linux 533d0c5feef85ee6404b9f41d5564fac6971a008

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-89777 being exploited?

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

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

High: CVSS 8.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= 30ea32ab1951c80c6113f300fce2c70cd12659e4, \< eb84cd81040e58dd05ac190f561f2115e3367249; \>= 30ea32ab1951c80c6113f300fce2c70cd12659e4, \< f0eea8f9013676b42289ec35941e848b8a543e19; \>= 30ea32ab1951c80c6113f300fce2c70cd12659e4, \< d665a1688af7f8fefd7c0eb04f2a37122ce007f4; \>= 30ea32ab1951c80c6113f300fce2c70cd12659e4, \< 25cdd2a492d868cff1e519a60fe282909c52d385; \>= 30ea32ab1951c80c6113f300fce2c70cd12659e4, \< 812f1db7f0755a19ef16ecdc5cec51bcabc5eda5; \>= 30ea32ab1951c80c6113f300fce2c70cd12659e4, \< 533d0c5feef85ee6404b9f41d5564fac6971a008; \>= 30ea32ab1951c80c6113f300fce2c70cd12659e4, \< fda8fb7e8179561693a786a7af593f6b944a21c1; \>= 30ea32ab1951c80c6113f300fce2c70cd12659e4, \< dc77acfeb979dded39b247b60fef0399536bfa77; ac370e3d1f3b01519d2705cd5815d1c9d0a8812b; be363e27ec3c3a99793da2be6c07eafb95709c6b; …; Linux 4.20.

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

Yes. Fixed in Linux 25cdd2a492d868cff1e519a60fe282909c52d385, Linux 812f1db7f0755a19ef16ecdc5cec51bcabc5eda5, Linux 533d0c5feef85ee6404b9f41d5564fac6971a008. No fix listed yet: follow the vendor advisory.

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

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/eb84cd81040e58dd05ac190f561f2115e3367249>
- other: <https://git.kernel.org/stable/c/f0eea8f9013676b42289ec35941e848b8a543e19>
- other: <https://git.kernel.org/stable/c/d665a1688af7f8fefd7c0eb04f2a37122ce007f4>
- other: <https://git.kernel.org/stable/c/25cdd2a492d868cff1e519a60fe282909c52d385>
- other: <https://git.kernel.org/stable/c/812f1db7f0755a19ef16ecdc5cec51bcabc5eda5>
- other: <https://git.kernel.org/stable/c/533d0c5feef85ee6404b9f41d5564fac6971a008>
- other: <https://git.kernel.org/stable/c/fda8fb7e8179561693a786a7af593f6b944a21c1>
- other: <https://git.kernel.org/stable/c/dc77acfeb979dded39b247b60fef0399536bfa77>

## 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-89777>

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