Bug 2278616 (CVE-2024-4418) - CVE-2024-4418 libvirt: stack use-after-free in virNetClientIOEventLoop()
Summary: CVE-2024-4418 libvirt: stack use-after-free in virNetClientIOEventLoop()
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2024-4418
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2278618
Blocks: 2278620
TreeView+ depends on / blocked
 
Reported: 2024-05-02 12:29 UTC by Mauro Matteo Cascella
Modified: 2024-09-29 05:27 UTC (History)
12 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-09-29 05:27:56 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2024:4351 0 None None None 2024-07-08 02:45:24 UTC
Red Hat Product Errata RHSA-2024:4432 0 None None None 2024-07-09 12:52:43 UTC
Red Hat Product Errata RHSA-2024:4757 0 None None None 2024-07-23 16:22:47 UTC

Description Mauro Matteo Cascella 2024-05-02 12:29:32 UTC
A race condition leading to a stack use-after-free bug 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 virNetClientIOEventFD callback while the data pointer's stack frame was concurrently being "freed" when returning from virNetClientIOEventLoop().

Quoting libvirt maintainer Daniel P. Berrangé: The 'virtproxyd' daemon can be used to trigger requests which could potentially exercise the bug. If libvirt is configured with fine grained access control, this could in theory let a user escape their otherwise limited access. A local unprivileged user can access virtproxyd without authenticating. Remote users would need to authenticate before they could exercise it.

Comment 1 Mauro Matteo Cascella 2024-05-02 12:31:33 UTC
Red Hat would like to thank Martin Širokov for reporting this issue.

Comment 2 Mauro Matteo Cascella 2024-05-02 12:33:37 UTC
Created libvirt tracking bugs for this issue:

Affects: fedora-all [bug 2278618]

Comment 4 Mauro Matteo Cascella 2024-05-06 09:35:54 UTC
Upstream fix:
https://gitlab.com/libvirt/libvirt/-/commit/8074d64dc2eca846d6a61efe1a9b7428a0ce1dd1

Comment 5 errata-xmlrpc 2024-07-08 02:45:22 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2024:4351 https://access.redhat.com/errata/RHSA-2024:4351

Comment 6 errata-xmlrpc 2024-07-09 12:52:41 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.2 Extended Update Support

Via RHSA-2024:4432 https://access.redhat.com/errata/RHSA-2024:4432

Comment 7 errata-xmlrpc 2024-07-23 16:22:45 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2024:4757 https://access.redhat.com/errata/RHSA-2024:4757


Note You need to log in before you can comment on or make changes to this bug.