# CVE-2024-46738: VMCI: Fix use-after-free when removing resource in vmci\_resource\_remove()

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; 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.33% (percentile 18, 2026-11-28)
- **CWE:** CWE-416
- **Published:** 2024-09-18T07:12:00.131Z
- **Modified:** 2026-08-05T11:38:14.929Z

## Who should check

- Anyone running Linux \>= bc63dedb7d46a7d690c6b6edf69136b88af06cc6, \< f6365931bf7c07b2b397dbb06a4f6573cc9fae73; \>= bc63dedb7d46a7d690c6b6edf69136b88af06cc6, \< b243d52b5f6f59f9d39e69b191fb3d58b94a43b1; \>= bc63dedb7d46a7d690c6b6edf69136b88af06cc6, \< 6c563a29857aa8053b67ee141191f69757f27f6e; \>= bc63dedb7d46a7d690c6b6edf69136b88af06cc6, \< ef5f4d0c5ee22d4f873116fec844ff6edaf3fa7d; \>= bc63dedb7d46a7d690c6b6edf69136b88af06cc6, \< b9efdf333174468651be40390cbc79c9f55d9cce; \>= bc63dedb7d46a7d690c6b6edf69136b88af06cc6, \< 39e7e593418ccdbd151f2925fa6be1a616d16c96; \>= bc63dedb7d46a7d690c6b6edf69136b88af06cc6, \< 00fe5292f081f8d773e572df8e03bf6e1855fe49; \>= bc63dedb7d46a7d690c6b6edf69136b88af06cc6, \< 48b9a8dabcc3cf5f961b2ebcd8933bf9204babb7
- Anyone running Linux 3.9

## Description

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

VMCI: Fix use-after-free when removing resource in vmci\_resource\_remove()

When removing a resource from vmci\_resource\_table in
vmci\_resource\_remove(), the search is performed using the resource
handle by comparing context and resource fields.

It is possible though to create two resources with different types
but same handle (same context and resource fields).

When trying to remove one of the resources, vmci\_resource\_remove()
may not remove the intended one, but the object will still be freed
as in the case of the datagram type in vmci\_datagram\_destroy\_handle().
vmci\_resource\_table will still hold a pointer to this freed resource
leading to a use-after-free vulnerability.

BUG: KASAN: use-after-free in vmci\_handle\_is\_equal include/linux/vmw\_vmci\_defs.h:142 \[inline\]
BUG: KASAN: use-after-free in vmci\_resource\_remove+0x3a1/0x410 drivers/misc/vmw\_vmci/vmci\_resource.c:147
Read of size 4 at addr ffff88801c16d800 by task syz-executor197/1592
Call Trace:
 \<TASK\>
 \_\_dump\_stack lib/dump\_stack.c:88 \[inline\]
 dump\_stack\_lvl+0x82/0xa9 lib/dump\_stack.c:106
 print\_address\_description.constprop.0+0x21/0x366 mm/kasan/report.c:239
 \_\_kasan\_report.cold+0x7f/0x132 mm/kasan/report.c:425
 kasan\_report+0x38/0x51 mm/kasan/report.c:442
 vmci\_handle\_is\_equal include/linux/vmw\_vmci\_defs.h:142 \[inline\]
 vmci\_resource\_remove+0x3a1/0x410 drivers/misc/vmw\_vmci/vmci\_resource.c:147
 vmci\_qp\_broker\_detach+0x89a/0x11b9 drivers/misc/vmw\_vmci/vmci\_queue\_pair.c:2182
 ctx\_free\_ctx+0x473/0xbe1 drivers/misc/vmw\_vmci/vmci\_context.c:444
 kref\_put include/linux/kref.h:65 \[inline\]
 vmci\_ctx\_put drivers/misc/vmw\_vmci/vmci\_context.c:497 \[inline\]
 vmci\_ctx\_destroy+0x170/0x1d6 drivers/misc/vmw\_vmci/vmci\_context.c:195
 vmci\_host\_close+0x125/0x1ac drivers/misc/vmw\_vmci/vmci\_host.c:143
 \_\_fput+0x261/0xa34 fs/file\_table.c:282
 task\_work\_run+0xf0/0x194 kernel/task\_work.c:164
 tracehook\_notify\_resume include/linux/tracehook.h:189 \[inline\]
 exit\_to\_user\_mode\_loop+0x184/0x189 kernel/entry/common.c:187
 exit\_to\_user\_mode\_prepare+0x11b/0x123 kernel/entry/common.c:220
 \_\_syscall\_exit\_to\_user\_mode\_work kernel/entry/common.c:302 \[inline\]
 syscall\_exit\_to\_user\_mode+0x18/0x42 kernel/entry/common.c:313
 do\_syscall\_64+0x41/0x85 arch/x86/entry/common.c:86
 entry\_SYSCALL\_64\_after\_hwframe+0x6e/0x0

This change ensures the type is also checked when removing
the resource from vmci\_resource\_table in vmci\_resource\_remove().

## Affected and fixed versions

- Linux: \>= bc63dedb7d46a7d690c6b6edf69136b88af06cc6, \< f6365931bf7c07b2b397dbb06a4f6573cc9fae73; \>= bc63dedb7d46a7d690c6b6edf69136b88af06cc6, \< b243d52b5f6f59f9d39e69b191fb3d58b94a43b1; \>= bc63dedb7d46a7d690c6b6edf69136b88af06cc6, \< 6c563a29857aa8053b67ee141191f69757f27f6e; \>= bc63dedb7d46a7d690c6b6edf69136b88af06cc6, \< ef5f4d0c5ee22d4f873116fec844ff6edaf3fa7d; \>= bc63dedb7d46a7d690c6b6edf69136b88af06cc6, \< b9efdf333174468651be40390cbc79c9f55d9cce; \>= bc63dedb7d46a7d690c6b6edf69136b88af06cc6, \< 39e7e593418ccdbd151f2925fa6be1a616d16c96; \>= bc63dedb7d46a7d690c6b6edf69136b88af06cc6, \< 00fe5292f081f8d773e572df8e03bf6e1855fe49; \>= bc63dedb7d46a7d690c6b6edf69136b88af06cc6, \< 48b9a8dabcc3cf5f961b2ebcd8933bf9204babb7 (cvelist)
- Linux: 3.9 (cvelist)

## Mitigation

- Upgrade Linux to 48b9a8dabcc3cf5f961b2ebcd8933bf9204babb7 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-46738. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-46738.md
Affected: Linux >= bc63dedb7d46a7d690c6b6edf69136b88af06cc6, < f6365931bf7c07b2b397dbb06a4f6573cc9fae73; >= bc63dedb7d46a7d690c6b6edf69136b88af06cc6, < b243d52b5f6f59f9d39e69b191fb3d58b94a43b1; >= bc63dedb7d46a7d690c6b6edf69136b88af06cc6, < 6c563a29857aa8053b67ee141191f69757f27f6e; >= bc63dedb7d46a7d690c6b6e…
Fixed in: Linux 6c563a29857aa8053b67ee141191f69757f27f6e, Linux 39e7e593418ccdbd151f2925fa6be1a616d16c96, Linux 00fe5292f081f8d773e572df8e03bf6e1855fe49, Linux 48b9a8dabcc3cf5f961b2ebcd8933bf9204babb7

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

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

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

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

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

Linux \>= bc63dedb7d46a7d690c6b6edf69136b88af06cc6, \< f6365931bf7c07b2b397dbb06a4f6573cc9fae73; \>= bc63dedb7d46a7d690c6b6edf69136b88af06cc6, \< b243d52b5f6f59f9d39e69b191fb3d58b94a43b1; \>= bc63dedb7d46a7d690c6b6edf69136b88af06cc6, \< 6c563a29857aa8053b67ee141191f69757f27f6e; \>= bc63dedb7d46a7d690c6b6edf69136b88af06cc6, \< ef5f4d0c5ee22d4f873116fec844ff6edaf3fa7d; \>= bc63dedb7d46a7d690c6b6edf69136b88af06cc6, \< b9efdf333174468651be40390cbc79c9f55d9cce; \>= bc63dedb7d46a7d690c6b6edf69136b88af06cc6, \< 39e7e593418ccdbd151f2925fa6be1a616d16c96; \>= bc63dedb7d46a7d690c6b6edf69136b88af06cc6, \< 00fe5292f081f8d773e572df8e03bf6e1855fe49; \>= bc63dedb7d46a7d690c6b6edf69136b88af06cc6, \< 48b9a8dabcc3cf5f961b2ebcd8933bf9204babb7; Linux 3.9.

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

Yes. Fixed in Linux 6c563a29857aa8053b67ee141191f69757f27f6e, Linux 39e7e593418ccdbd151f2925fa6be1a616d16c96, Linux 00fe5292f081f8d773e572df8e03bf6e1855fe49, Linux 48b9a8dabcc3cf5f961b2ebcd8933bf9204babb7. Upgrade Linux to 48b9a8dabcc3cf5f961b2ebcd8933bf9204babb7 or later.

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

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/f6365931bf7c07b2b397dbb06a4f6573cc9fae73>
- patch: <https://git.kernel.org/stable/c/b243d52b5f6f59f9d39e69b191fb3d58b94a43b1>
- patch: <https://git.kernel.org/stable/c/6c563a29857aa8053b67ee141191f69757f27f6e>
- patch: <https://git.kernel.org/stable/c/ef5f4d0c5ee22d4f873116fec844ff6edaf3fa7d>
- patch: <https://git.kernel.org/stable/c/b9efdf333174468651be40390cbc79c9f55d9cce>
- patch: <https://git.kernel.org/stable/c/39e7e593418ccdbd151f2925fa6be1a616d16c96>
- patch: <https://git.kernel.org/stable/c/00fe5292f081f8d773e572df8e03bf6e1855fe49>
- patch: <https://git.kernel.org/stable/c/48b9a8dabcc3cf5f961b2ebcd8933bf9204babb7>
- other: <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>
- other: <https://lists.debian.org/debian-lts-announce/2024/10/msg00003.html>

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

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