---
id: CVE-2024-4418
title: 'Libvirt: stack use-after-free in virnetclientioeventloop()'
summary: >-
  A race condition leading to a stack use-after-free flaw was found in libvirt.
  Due to a bad assumption in the virNetClientIOEventLoop() method, the `data`
  pointer to a stack-allocated virNetClientIOEventData structure ended up being
  used …
severity: medium
cvss: 6.2
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'
cvssSource: cna
cwe:
  - CWE-562
vendor: Red Hat
product: libvirt
affected:
  - libvirt < 10.4.0
  - 'virt-devel:rhel (all versions)'
  - 'virt:rhel (all versions)'
  - libvirt (all versions)
  - libvirt (all versions)
  - libvirt
  - libvirt
  - 'virt:av/libvirt (all versions)'
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2024-05-08T15:25:15.415508Z'
published: '2024-05-08'
updated: '2026-11-05'
sourceUpdated: '2026-11-05T13:59:16.098Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2024-4418'
references:
  - url: 'https://access.redhat.com/errata/RHSA-2024:4351'
    label: 'RHSA-2024:4351'
  - url: 'https://access.redhat.com/errata/RHSA-2024:4432'
    label: 'RHSA-2024:4432'
  - url: 'https://access.redhat.com/errata/RHSA-2024:4757'
    label: 'RHSA-2024:4757'
  - url: 'https://access.redhat.com/security/cve/CVE-2024-4418'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2278616'
    label: RHBZ#2278616
tags:
  - cve.org
epss: 0.00486
epssPercentile: 0.42091
ingestedAt: '2026-11-05T21:36:00.854Z'
---

## Overview

A race condition leading to a stack use-after-free flaw was found in libvirt. Due to a bad assumption in the virNetClientIOEventLoop() method, the `data` pointer to a stack-allocated virNetClientIOEventData structure ended up being used in the virNetClientIOEventFD callback while the data pointer's stack frame was concurrently being "freed" when returning from virNetClientIOEventLoop(). The 'virtproxyd' daemon can be used to trigger requests. If libvirt is configured with fine-grained access control, this issue, in theory, allows a user to escape their otherwise limited access. This flaw allows a local, unprivileged user to access virtproxyd without authenticating. Remote users would need to authenticate before they could access it.

## Affected

- `libvirt < 10.4.0`
- `virt-devel:rhel (all versions)`
- `virt:rhel (all versions)`
- `libvirt (all versions)`
- `libvirt (all versions)`
- `libvirt`
- `libvirt`
- `virt:av/libvirt (all versions)`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
