# CVE-2025-21977: fbdev: hyperv\_fb: Fix hang in kdump kernel when on Hyper-V Gen 2 VMs

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; 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.28% (percentile 13, 2026-11-26)
- **Published:** 2025-04-01T15:47:07.642Z
- **Modified:** 2026-06-17T08:44:45.317Z

## Who should check

- Anyone running Linux \>= c25a19afb81cfd73dab494ba64f9a434cf1a4499, \< cfffe46a994ac6d5de3b119917680ea1e9a96125; \>= c25a19afb81cfd73dab494ba64f9a434cf1a4499, \< 2924802d35e00a36b1503a4e786f1926b2fdc1d0; \>= c25a19afb81cfd73dab494ba64f9a434cf1a4499, \< 304386373007aaca9236a3f36afac0bbedcd2bf0
- Anyone running Linux 6.8

## Description

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

fbdev: hyperv\_fb: Fix hang in kdump kernel when on Hyper-V Gen 2 VMs

Gen 2 Hyper-V VMs boot via EFI and have a standard EFI framebuffer
device. When the kdump kernel runs in such a VM, loading the efifb
driver may hang because of accessing the framebuffer at the wrong
memory address.

The scenario occurs when the hyperv\_fb driver in the original kernel
moves the framebuffer to a different MMIO address because of conflicts
with an already-running efifb or simplefb driver. The hyperv\_fb driver
then informs Hyper-V of the change, which is allowed by the Hyper-V FB
VMBus device protocol. However, when the kexec command loads the kdump
kernel into crash memory via the kexec\_file\_load() system call, the
system call doesn't know the framebuffer has moved, and it sets up the
kdump screen\_info using the original framebuffer address. The transition
to the kdump kernel does not go through the Hyper-V host, so Hyper-V
does not reset the framebuffer address like it would do on a reboot.
When efifb tries to run, it accesses a non-existent framebuffer
address, which traps to the Hyper-V host. After many such accesses,
the Hyper-V host thinks the guest is being malicious, and throttles
the guest to the point that it runs very slowly or appears to have hung.

When the kdump kernel is loaded into crash memory via the kexec\_load()
system call, the problem does not occur. In this case, the kexec command
builds the screen\_info table itself in user space from data returned
by the FBIOGET\_FSCREENINFO ioctl against /dev/fb0, which gives it the
new framebuffer location.

This problem was originally reported in 2020 \[1\], resulting in commit
3cb73bc3fa2a ("hyperv\_fb: Update screen\_info after removing old
framebuffer"). This commit solved the problem by setting orig\_video\_isVGA
to 0, so the kdump kernel was unaware of the EFI framebuffer. The efifb
driver did not try to load, and no hang occurred. But in 2024, commit
c25a19afb81c ("fbdev/hyperv\_fb: Do not clear global screen\_info")
effectively reverted 3cb73bc3fa2a. Commit c25a19afb81c has no reference
to 3cb73bc3fa2a, so perhaps it was done without knowing the implications
that were reported with 3cb73bc3fa2a. In any case, as of commit
c25a19afb81c, the original problem came back again.

Interestingly, the hyperv\_drm driver does not have this problem because
it never moves the framebuffer. The difference is that the hyperv\_drm
driver removes any conflicting framebuffers \*before\* allocating an MMIO
address, while the hyperv\_fb drivers removes conflicting framebuffers
\*after\* allocating an MMIO address. With the "after" ordering, hyperv\_fb
may encounter a conflict and move the framebuffer to a different MMIO
address. But the conflict is essentially bogus because it is removed
a few lines of code later.

Rather than fix the problem with the approach from 2020 in commit
3cb73bc3fa2a, instead slightly reorder the steps in hyperv\_fb so
conflicting framebuffers are removed before allocating an MMIO address.
Then the default framebuffer MMIO address should always be available, and
there's never any confusion about which framebuffer address the kdump
kernel should use -- it's always the original address provided by
the Hyper-V host. This approach is already used by the hyperv\_drm
driver, and is consistent with the usage guidelines at the head of
the module with the function aperture\_remove\_conflicting\_devices().

This approach also solves a related minor problem when kexec\_load()
is used to load the kdump kernel. With current code, unbinding and
rebinding the hyperv\_fb driver could result in the framebuffer moving
back to the default framebuffer address, because on the rebind there
are no conflicts. If such a move is done after the kdump kernel is
loaded with the new framebuffer address, at kdump time it could again
have the wrong address.

This problem and fix are described in terms of the kdump kernel, but
it can also occur
---truncated---

## Affected and fixed versions

- Linux: \>= c25a19afb81cfd73dab494ba64f9a434cf1a4499, \< cfffe46a994ac6d5de3b119917680ea1e9a96125; \>= c25a19afb81cfd73dab494ba64f9a434cf1a4499, \< 2924802d35e00a36b1503a4e786f1926b2fdc1d0; \>= c25a19afb81cfd73dab494ba64f9a434cf1a4499, \< 304386373007aaca9236a3f36afac0bbedcd2bf0 (cvelist)
- Linux: 6.8 (cvelist)

## Mitigation

- Upgrade Linux to 304386373007aaca9236a3f36afac0bbedcd2bf0 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-21977.md
Affected: Linux >= c25a19afb81cfd73dab494ba64f9a434cf1a4499, < cfffe46a994ac6d5de3b119917680ea1e9a96125; >= c25a19afb81cfd73dab494ba64f9a434cf1a4499, < 2924802d35e00a36b1503a4e786f1926b2fdc1d0; >= c25a19afb81cfd73dab494ba64f9a434cf1a4499, < 304386373007aaca9236a3f36afac0bbedcd2bf0; Linux 6.8
Fixed in: Linux 2924802d35e00a36b1503a4e786f1926b2fdc1d0, Linux 304386373007aaca9236a3f36afac0bbedcd2bf0

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-2025-21977 being exploited?

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

### How serious is CVE-2025-21977?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-21977?

Linux \>= c25a19afb81cfd73dab494ba64f9a434cf1a4499, \< cfffe46a994ac6d5de3b119917680ea1e9a96125; \>= c25a19afb81cfd73dab494ba64f9a434cf1a4499, \< 2924802d35e00a36b1503a4e786f1926b2fdc1d0; \>= c25a19afb81cfd73dab494ba64f9a434cf1a4499, \< 304386373007aaca9236a3f36afac0bbedcd2bf0; Linux 6.8.

### Is there a fix for CVE-2025-21977?

Yes. Fixed in Linux 2924802d35e00a36b1503a4e786f1926b2fdc1d0, Linux 304386373007aaca9236a3f36afac0bbedcd2bf0. Upgrade Linux to 304386373007aaca9236a3f36afac0bbedcd2bf0 or later.

### How do I check if I'm affected by CVE-2025-21977?

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

- patch: <https://git.kernel.org/stable/c/cfffe46a994ac6d5de3b119917680ea1e9a96125>
- patch: <https://git.kernel.org/stable/c/2924802d35e00a36b1503a4e786f1926b2fdc1d0>
- patch: <https://git.kernel.org/stable/c/304386373007aaca9236a3f36afac0bbedcd2bf0>

## 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-2025-21977>

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