# CVE-2024-47744: KVM: Use dedicated mutex to protect kvm\_usage\_count to avoid deadlock

> 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.23% (percentile 8, 2026-11-26)
- **CWE:** CWE-667
- **Published:** 2024-10-21T12:14:11.830Z
- **Modified:** 2026-06-17T07:57:40.393Z

## Who should check

- Anyone running Linux \>= 0bf50497f03b3d892c470c7d1a10a3e9c3c95821, \< 4777225ec89f52bb9ca16a33cfb44c189f1b7b47; \>= 0bf50497f03b3d892c470c7d1a10a3e9c3c95821, \< a2764afce521fd9fd7a5ff6ed52ac2095873128a; \>= 0bf50497f03b3d892c470c7d1a10a3e9c3c95821, \< 760a196e6dcb29580e468b44b5400171dae184d8; \>= 0bf50497f03b3d892c470c7d1a10a3e9c3c95821, \< 44d17459626052a2390457e550a12cb973506b2f
- Anyone running Linux 6.3

## Description

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

KVM: Use dedicated mutex to protect kvm\_usage\_count to avoid deadlock

Use a dedicated mutex to guard kvm\_usage\_count to fix a potential deadlock
on x86 due to a chain of locks and SRCU synchronizations.  Translating the
below lockdep splat, CPU1 \#6 will wait on CPU0 \#1, CPU0 \#8 will wait on
CPU2 \#3, and CPU2 \#7 will wait on CPU1 \#4 (if there's a writer, due to the
fairness of r/w semaphores).

    CPU0                     CPU1                     CPU2
1   lock(&kvm-\>slots\_lock);
2                                                     lock(&vcpu-\>mutex);
3                                                     lock(&kvm-\>srcu);
4                            lock(cpu\_hotplug\_lock);
5                            lock(kvm\_lock);
6                            lock(&kvm-\>slots\_lock);
7                                                     lock(cpu\_hotplug\_lock);
8   sync(&kvm-\>srcu);

Note, there are likely more potential deadlocks in KVM x86, e.g. the same
pattern of taking cpu\_hotplug\_lock outside of kvm\_lock likely exists with
\_\_kvmclock\_cpufreq\_notifier():

  cpuhp\_cpufreq\_online()
  \|
  -\> cpufreq\_online()
     \|
     -\> cpufreq\_gov\_performance\_limits()
        \|
        -\> \_\_cpufreq\_driver\_target()
           \|
           -\> \_\_target\_index()
              \|
              -\> cpufreq\_freq\_transition\_begin()
                 \|
                 -\> cpufreq\_notify\_transition()
                    \|
                    -\> ... \_\_kvmclock\_cpufreq\_notifier()

But, actually triggering such deadlocks is beyond rare due to the
combination of dependencies and timings involved.  E.g. the cpufreq
notifier is only used on older CPUs without a constant TSC, mucking with
the NX hugepage mitigation while VMs are running is very uncommon, and
doing so while also onlining/offlining a CPU (necessary to generate
contention on cpu\_hotplug\_lock) would be even more unusual.

The most robust solution to the general cpu\_hotplug\_lock issue is likely
to switch vm\_list to be an RCU-protected list, e.g. so that x86's cpufreq
notifier doesn't to take kvm\_lock.  For now, settle for fixing the most
blatant deadlock, as switching to an RCU-protected list is a much more
involved change, but add a comment in locking.rst to call out that care
needs to be taken when walking holding kvm\_lock and walking vm\_list.

  ======================================================
  WARNING: possible circular locking dependency detected
  6.10.0-smp--c257535a0c9d-pip \#330 Tainted: G S         O
  ------------------------------------------------------
  tee/35048 is trying to acquire lock:
  ff6a80eced71e0a8 (&kvm-\>slots\_lock){+.+.}-{3:3}, at: set\_nx\_huge\_pages+0x179/0x1e0 \[kvm\]

  but task is already holding lock:
  ffffffffc07abb08 (kvm\_lock){+.+.}-{3:3}, at: set\_nx\_huge\_pages+0x14a/0x1e0 \[kvm\]

  which lock already depends on the new lock.

   the existing dependency chain (in reverse order) is:

  -\> \#3 (kvm\_lock){+.+.}-{3:3}:
         \_\_mutex\_lock+0x6a/0xb40
         mutex\_lock\_nested+0x1f/0x30
         kvm\_dev\_ioctl+0x4fb/0xe50 \[kvm\]
         \_\_se\_sys\_ioctl+0x7b/0xd0
         \_\_x64\_sys\_ioctl+0x21/0x30
         x64\_sys\_call+0x15d0/0x2e60
         do\_syscall\_64+0x83/0x160
         entry\_SYSCALL\_64\_after\_hwframe+0x76/0x7e

  -\> \#2 (cpu\_hotplug\_lock){++++}-{0:0}:
         cpus\_read\_lock+0x2e/0xb0
         static\_key\_slow\_inc+0x16/0x30
         kvm\_lapic\_set\_base+0x6a/0x1c0 \[kvm\]
         kvm\_set\_apic\_base+0x8f/0xe0 \[kvm\]
         kvm\_set\_msr\_common+0x9ae/0xf80 \[kvm\]
         vmx\_set\_msr+0xa54/0xbe0 \[kvm\_intel\]
         \_\_kvm\_set\_msr+0xb6/0x1a0 \[kvm\]
         kvm\_arch\_vcpu\_ioctl+0xeca/0x10c0 \[kvm\]
         kvm\_vcpu\_ioctl+0x485/0x5b0 \[kvm\]
         \_\_se\_sys\_ioctl+0x7b/0xd0
         \_\_x64\_sys\_ioctl+0x21/0x30
         x64\_sys\_call+0x15d0/0x2e60
         do\_syscall\_64+0x83/0x160
         entry\_SYSCALL\_64\_after\_hwframe+0x76/0x7e

  -\> \#1 (&kvm-\>srcu){.+.+}-{0:0}:
         \_\_synchronize\_srcu+0x44/0x1a0
      
---truncated---

## Affected and fixed versions

- Linux: \>= 0bf50497f03b3d892c470c7d1a10a3e9c3c95821, \< 4777225ec89f52bb9ca16a33cfb44c189f1b7b47; \>= 0bf50497f03b3d892c470c7d1a10a3e9c3c95821, \< a2764afce521fd9fd7a5ff6ed52ac2095873128a; \>= 0bf50497f03b3d892c470c7d1a10a3e9c3c95821, \< 760a196e6dcb29580e468b44b5400171dae184d8; \>= 0bf50497f03b3d892c470c7d1a10a3e9c3c95821, \< 44d17459626052a2390457e550a12cb973506b2f (cvelist)
- Linux: 6.3 (cvelist)

## Mitigation

- Upgrade Linux to 44d17459626052a2390457e550a12cb973506b2f or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2024-47744.md
Affected: Linux >= 0bf50497f03b3d892c470c7d1a10a3e9c3c95821, < 4777225ec89f52bb9ca16a33cfb44c189f1b7b47; >= 0bf50497f03b3d892c470c7d1a10a3e9c3c95821, < a2764afce521fd9fd7a5ff6ed52ac2095873128a; >= 0bf50497f03b3d892c470c7d1a10a3e9c3c95821, < 760a196e6dcb29580e468b44b5400171dae184d8; >= 0bf50497f03b3d892c470c7…
Fixed in: Linux 4777225ec89f52bb9ca16a33cfb44c189f1b7b47, Linux 760a196e6dcb29580e468b44b5400171dae184d8, Linux 44d17459626052a2390457e550a12cb973506b2f

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-2024-47744 being exploited?

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

### How serious is CVE-2024-47744?

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

### Which versions are affected by CVE-2024-47744?

Linux \>= 0bf50497f03b3d892c470c7d1a10a3e9c3c95821, \< 4777225ec89f52bb9ca16a33cfb44c189f1b7b47; \>= 0bf50497f03b3d892c470c7d1a10a3e9c3c95821, \< a2764afce521fd9fd7a5ff6ed52ac2095873128a; \>= 0bf50497f03b3d892c470c7d1a10a3e9c3c95821, \< 760a196e6dcb29580e468b44b5400171dae184d8; \>= 0bf50497f03b3d892c470c7d1a10a3e9c3c95821, \< 44d17459626052a2390457e550a12cb973506b2f; Linux 6.3.

### Is there a fix for CVE-2024-47744?

Yes. Fixed in Linux 4777225ec89f52bb9ca16a33cfb44c189f1b7b47, Linux 760a196e6dcb29580e468b44b5400171dae184d8, Linux 44d17459626052a2390457e550a12cb973506b2f. Upgrade Linux to 44d17459626052a2390457e550a12cb973506b2f or later.

### How do I check if I'm affected by CVE-2024-47744?

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/4777225ec89f52bb9ca16a33cfb44c189f1b7b47>
- patch: <https://git.kernel.org/stable/c/a2764afce521fd9fd7a5ff6ed52ac2095873128a>
- patch: <https://git.kernel.org/stable/c/760a196e6dcb29580e468b44b5400171dae184d8>
- patch: <https://git.kernel.org/stable/c/44d17459626052a2390457e550a12cb973506b2f>

## 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-2024-47744>

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